Documentation
¶
Overview ¶
Package socks provides a barebones SOCKSv5 server handshake protocol implementation.
Index ¶
- Constants
- func ComposeUDP(srcaddr, dstaddr Addr, p []byte) (r []byte, err error)
- func DissectUDP(p []byte) (srcaddr Addr, dstaddr Addr, data []byte)
- func Handshake(c net.Conn) (cmd byte, address string, err error)
- func WriteStatus(c net.Conn, status SocksStatus, addr Addr) (int, error)
- type Addr
- type SocksStatus
Constants ¶
View Source
const ( SOCKSv5 = 0x05 CONNECT = 0x01 BIND = 0x02 UDP_ASSOC = 0x03 ADDR_IPV4 = 0x01 ADDR_FQDN = 0x03 ADDR_IPV6 = 0x04 RSV = 0x00 )
Variables ¶
This section is empty.
Functions ¶
func WriteStatus ¶
Types ¶
type SocksStatus ¶
type SocksStatus byte
const ( StatusOK SocksStatus = iota StatusGeneralFailure StatusNotAllowed StatusNetworkUnreachable StatusHostUnreachable StatusConnRefused StatusTTLExpired StatusCommandNotSupported StatusAddressNotSupported )
func (SocksStatus) Error ¶
func (e SocksStatus) Error() string
Click to show internal directories.
Click to hide internal directories.