Documentation ¶
Index ¶
- Constants
- Variables
- func ResolveTCPAddr(addr *Addr) (*net.TCPAddr, error)
- func ResolveUDPAddr(addr *Addr) (*net.UDPAddr, error)
- type Addr
- func Handshake(conn net.Conn, tgt net.Addr, cmd byte, auth *proxy.Auth) (*Addr, error)
- func ParseAddr(addr []byte) (*Addr, error)
- func ReadAddr(conn io.Reader) (*Addr, error)
- func ReadAddrBuffer(conn io.Reader, addr []byte) (*Addr, error)
- func ResolveAddr(addr net.Addr) (*Addr, error)
- func ResolveAddrBuffer(addr net.Addr, b []byte) (*Addr, error)
- type Error
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 ...
Click to show internal directories.
Click to hide internal directories.