Versions in this module Expand all Collapse all v1 v1.24.4 Aug 19, 2016 Changes in this version + const AddrTypeDomain + const AddrTypeIPv4 + const AddrTypeIPv6 + const AuthGssApi + const AuthNoMatchingMethod + const AuthNotRequired + const AuthUserPass + const CmdBind + const CmdConnect + const CmdUdpAssociate + const ErrorAddressTypeNotSupported + const ErrorCommandNotSupported + const ErrorConnectionNotAllowed + const ErrorConnectionRefused + const ErrorGeneralFailure + const ErrorHostUnUnreachable + const ErrorNetworkUnreachable + const ErrorSuccess + const ErrorTTLExpired + const Socks4RequestGranted + const Socks4RequestRejected + var ErrorUnknownAddressType = errors.New("Unknown Address Type.") + var Socks4Downgrade = errors.New("Downgraded to Socks 4.") + func ReadAuthentication(reader io.Reader) (auth Socks5AuthenticationRequest, auth4 Socks4AuthenticationRequest, err error) + func WriteAuthentication(writer io.Writer, r *Socks5AuthenticationResponse) error + func WriteUserPassResponse(writer io.Writer, response Socks5UserPassResponse) error + type Socks4AuthenticationRequest struct + Command byte + IP [4]byte + Port v2net.Port + Version byte + type Socks4AuthenticationResponse struct + func NewSocks4AuthenticationResponse(result byte, port v2net.Port, ip []byte) *Socks4AuthenticationResponse + func (r *Socks4AuthenticationResponse) Write(writer io.Writer) + type Socks5AuthenticationRequest struct + func (request *Socks5AuthenticationRequest) HasAuthMethod(method byte) bool + type Socks5AuthenticationResponse struct + func NewAuthenticationResponse(authMethod byte) *Socks5AuthenticationResponse + type Socks5Request struct + AddrType byte + Command byte + Domain string + IPv4 [4]byte + IPv6 [16]byte + Port v2net.Port + Version byte + func ReadRequest(reader io.Reader) (request *Socks5Request, err error) + func (request *Socks5Request) Destination() v2net.Destination + type Socks5Response struct + AddrType byte + Domain string + Error byte + IPv4 [4]byte + IPv6 [16]byte + Port v2net.Port + Version byte + func NewSocks5Response() *Socks5Response + func (r *Socks5Response) SetDomain(domain string) + func (r *Socks5Response) SetIPv4(ipv4 []byte) + func (r *Socks5Response) SetIPv6(ipv6 []byte) + func (r *Socks5Response) Write(writer io.Writer) + type Socks5UDPRequest struct + Address v2net.Address + Data *alloc.Buffer + Fragment byte + Port v2net.Port + func ReadUDPRequest(packet []byte) (*Socks5UDPRequest, error) + func (request *Socks5UDPRequest) Destination() v2net.Destination + func (request *Socks5UDPRequest) Write(buffer *alloc.Buffer) + type Socks5UserPassRequest struct + func ReadUserPassRequest(reader io.Reader) (request Socks5UserPassRequest, err error) + func (request Socks5UserPassRequest) AuthDetail() string + func (request Socks5UserPassRequest) Password() string + func (request Socks5UserPassRequest) Username() string + type Socks5UserPassResponse struct + func NewSocks5UserPassResponse(status byte) Socks5UserPassResponse