Package socks implements essential parts of SOCKS protocol.
const ( CmdConnect = 1 CmdBind = 2 CmdUDPAssociate = 3 )
SOCKS request commands as defined in RFC 1928 section 4.
const ( AtypIPv4 = 1 AtypDomainName = 3 AtypIPv6 = 4 )
SOCKS address types as defined in RFC 1928 section 5.
SOCKS errors as defined in RFC 1928 section 6.
const MaxAddrLen = 1 + 1 + 255 + 2
MaxAddrLen is the maximum size of SOCKS address in bytes.
UDPEnabled is the toggle for UDP support
This section is empty.
type Addr byte
Addr represents a SOCKS address as defined in RFC 1928 section 5.
Handshake fast-tracks SOCKS initialization to get target address to connect.
ParseAddr parses the address in string s. Returns nil if failed.
ReadAddr reads just enough bytes from r to get a valid Addr.
SplitAddr slices a SOCKS address from beginning of b. Returns nil if failed.