Documentation
¶
Index ¶
Constants ¶
View Source
const ( SOCKS5_METHOD_NO_AUTH byte = iota SOCKS5_METHOD_GSSAPI SOCKS5_METHOD_USER_PASSWORD SOCKS5_METHOD_NOT_SUPPORT )
View Source
const ( SOCKS5_ATYPE_IPV4 byte SOCKS5_ATYPE_DOMAIN SOCKS5_ATYPE_IPV6 )
View Source
const ( SOCKS5_CMD_CONNECT byte SOCKS5_CMD_BIND SOCKS5_CMD_UDP_FORWARD )
View Source
const ( SOCKS5_REP_SUCCESS byte = iota SOCKS5_REP_CONNECTION_FAILED SOCKS5_REP_NOT_ALLOWED SOCKS5_REP_NETWORK_UNREACHABLE SOCKS5_REP_HOST_UNREACHABLE SOCKS5_REP_CONNECTION_REFUSED SOCKS5_REP_TTL_TIMEOUT SOCKS5_REP_UNSUPPORTED_COMMAND SOCKS5_REP_UNSUPPORTED_ATYPE )
View Source
const (
SOCKS5_VERSION byte = 0x05
)
Variables ¶
View Source
var ErrRemoteNotAllowed = errors.New("request host not allowed")
View Source
var ErrSocks5CommandNotSupported = errors.New("Socks5 command not supported")
View Source
var ErrSocks5MethodNotSupported = errors.New("Socks5 method not supported")
View Source
var ErrSocks5VersionNotSupported = errors.New("Socks5 version not supported")
View Source
var FillRequestMessage = fillRequestMessage
View Source
var IsDomain = isDomain
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Server ¶
type Socks5_RequestMessage ¶
type Socks5_RequestMessage struct {
Ver byte
Cmd byte
Rsv byte
Atype byte
// contains filtered or unexported fields
}
func (*Socks5_RequestMessage) GetHost ¶
func (rm *Socks5_RequestMessage) GetHost() string
func (*Socks5_RequestMessage) GetPort ¶
func (rm *Socks5_RequestMessage) GetPort() int
func (*Socks5_RequestMessage) GetSize ¶
func (rm *Socks5_RequestMessage) GetSize() int
type Socks5_ResponseMessage ¶
type Socks5_ResponseMessage struct {
Ver byte
Rep byte
Rsv byte
Atype byte
// contains filtered or unexported fields
}
func (*Socks5_ResponseMessage) GetSize ¶
func (rm *Socks5_ResponseMessage) GetSize() int
type Socks5_SelectionMessage ¶
type Socks5_UserPassVerify ¶
type Socks5_UserPassVerify struct {
ProtocolVersion byte
}
type Socks5_VersionMessage ¶
type Socks5_VersionMessage struct {
Ver byte
NumMethod byte
// contains filtered or unexported fields
}
func (*Socks5_VersionMessage) GetSize ¶
func (vm *Socks5_VersionMessage) GetSize() int
Click to show internal directories.
Click to hide internal directories.