Documentation ¶
Index ¶
Constants ¶
View Source
const ( // AddrTypeIPv4 is ... AddrTypeIPv4 = 1 // AddrTypeDomain is ... AddrTypeDomain = 3 // AddrTypeIPv6 is ... AddrTypeIPv6 = 4 )
View Source
const ( // CmdConnect is .. CmdConnect = 1 // CmdAssociate is ... CmdAssociate = 3 // AuthNone is ... AuthNone = 0 // AuthUserPass is ... AuthUserPass = 2 )
View Source
const ( // ErrSuccess is ... ErrSuccess = Error(0) // ErrGeneralFailure is ... ErrGeneralFailure = Error(1) // ErrConnectionNotAllowed is ... ErrConnectionNotAllowed = Error(2) // ErrNetworkUnreachable is ... ErrNetworkUnreachable = Error(3) // ErrHostUnreachable is ... ErrHostUnreachable = Error(4) // ErrConnectionRefused is ... ErrConnectionRefused = Error(5) // ErrTTLExpired is ... ErrTTLExpired = Error(6) // ErrCommandNotSupported is ... ErrCommandNotSupported = Error(7) // ErrAddressNotSupported is ... ErrAddressNotSupported = Error(8) )
View Source
const MaxAddrLen = 1 + 1 + 255 + 2
MaxAddrLen is the maximum length of socks.Addr
Variables ¶
View Source
var ( // ErrInvalidAddrType is ... ErrInvalidAddrType = errors.New("invalid address type") // ErrInvalidAddrLen is ... ErrInvalidAddrLen = errors.New("invalid address length") )
Functions ¶
Types ¶
type Addr ¶
type Addr struct {
Addr []byte
}
Addr is ...
func ReadAddrBuffer ¶
ReadAddrBuffer is ...
func ResolveAddrBuffer ¶
ResolveAddrBuffer is ...
type StringAddr ¶
type StringAddr struct {
Addr string
}
func (*StringAddr) Network ¶
func (*StringAddr) Network() string
func (*StringAddr) String ¶
func (addr *StringAddr) String() string
Click to show internal directories.
Click to hide internal directories.