Documentation
¶
Index ¶
Constants ¶
View Source
const Version = 5
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { Type AddressType IP net.IP Host string Port uint16 }
func UnmarshalAddress ¶
type AddressType ¶
type AddressType = uint8
const ( TypeIPv4 AddressType = 1 TypeIPv6 AddressType = 4 TypeDomain AddressType = 3 )
type Authentication ¶
type ResponseType ¶
type ResponseType = uint8
const ( Success ResponseType = iota ServerFailed ConnNotAllowed NetworkUnreachable ConnRefused TTLExpired CmdNotSupport AddrTypeNotSupport )
type SocksServer ¶
type SocksServer struct { net.Conn Auth Authentication Target Address }
func NewSocks ¶
func NewSocks(conn net.Conn, auth Authentication) (*SocksServer, error)
NewSocks NewSocks will auth socks client and read socks request, if error, conn will be closed
func (*SocksServer) Reply ¶
func (server *SocksServer) Reply(ip net.IP, port uint16, field ResponseType) error
type VersionErr ¶
func (VersionErr) Error ¶
func (e VersionErr) Error() string
Click to show internal directories.
Click to hide internal directories.