Documentation
¶
Index ¶
Constants ¶
View Source
const ( AuthNone = 0x00 AuthPassword = 0x02 )
SOCKS auth type
View Source
const ( CmdConnect = 0x01 CmdBind = 0x02 CmdUDPAssociate = 0x03 )
SOCKS request commands as defined in RFC 1928 section 4
View Source
const ( ATypIP4 = 0x1 ATypDomain = 0x3 ATypIP6 = 0x4 )
SOCKS address types as defined in RFC 1928 section 4
View Source
const Name = "socks5"
View Source
const Version5 = 0x05
Version is socks5 version number.
Variables ¶
This section is empty.
Functions ¶
func NewSocks5Server ¶
func ParseAddr ¶
ParseAddr parse a address string to bytes in socks5 format.
+------+----------+----------+ | ATYP | DST.ADDR | DST.PORT | +------+----------+----------+ | 1 | Variable | 2 | +------+----------+----------+
func ReadTargetAddr ¶
ReadTargetAddr read bytes from conn and create a proxy.TargetAddr
Types ¶
type PacketConn ¶
type PacketConn struct { // Connection from client net.PacketConn // contains filtered or unexported fields }
func (*PacketConn) GetTargetAddr ¶
func (pc *PacketConn) GetTargetAddr() *proxy.TargetAddr
Click to show internal directories.
Click to hide internal directories.