Invalid SOCKS5 response to UDP associate request
The attached script sends UDP ASSOCIATE request to tor socks5 server. It gets two bytes in response: $ ./testcase.py
05 03 00 01 08 08 08 08 00 35 << 05 00
As per RFC 1928, this response is invalid. Only 2 bytes out of 10 expected bytes are in response (see Section 6: Replies). Subsection "UDP ASSOCIATE" there says "In the reply to a UDP ASSOCIATE request, the BND.PORT and BND.ADDR fields indicate the port number/address where the client MUST send UDP request messages to be relayed."
Tor sends back only two fields: 05 (version), 00 (Reply field=succeeded), and nothing else. It should either send ip/port in a full reply, or (maybe) 05 01 (error response).