Documentation ¶
Index ¶
Constants ¶
View Source
const ( AuthNone = 0 AuthPassword = 2 )
SOCKS auth type
View Source
const ( CmdConnect = 1 CmdBind = 2 CmdUDPAssociate = 3 )
SOCKS request commands as defined in RFC 1928 section 4.
View Source
const ( ATypIP4 = 1 ATypDomain = 3 ATypIP6 = 4 )
SOCKS address types as defined in RFC 1928 section 5.
View Source
const MaxAddrLen = 1 + 1 + 255 + 2
MaxAddrLen is the maximum size of SOCKS address in bytes.
Variables ¶
View Source
var Errors = []error{ errors.New(""), errors.New("general failure"), errors.New("connection forbidden"), errors.New("network unreachable"), errors.New("host unreachable"), errors.New("connection refused"), errors.New("TTL expired"), errors.New("command not supported"), errors.New("address type not supported"), errors.New("socks5UDPAssociate"), }
Errors are socks5 errors
Functions ¶
Types ¶
type Addr ¶
type Addr []byte
Addr .
func ReadAddrBuf ¶
ReadAddrBuf reads just enough bytes from r to get a valid Addr.
Click to show internal directories.
Click to hide internal directories.