This is an implementation of the SOCKS Protocol Version 5 as defined in
RFC 1928.
In Wikipedia's words:
SOCKS is an Internet protocol that exchanges network packets between a client
and server through a proxy server. SOCKS5 optionally provides authentication
so only authorized users may access a server. Practically, a SOCKS server
proxies TCP connections to an arbitrary IP address, and provides a means for
UDP packets to be forwarded. A SOCKS server accepts incoming client connection
on TCP port 1080.
BIND and UDP ASSOCIATE messages are not implemented. However the main usage of
SOCKS is implemented.
Destination FQDN. Should comprise only ASCII characters, otherwise
unexpected behaviour will ensure. For FQDN including other Unicode code
points, Punycode encoding should be used.