Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultParseFunc(dataStream <-chan []byte) error
- func SendSocks5Reply(conn net.Conn) error
- type DefaultParser
- type HandshakeHandler
- type InitMsgHandler
- type Parser
- type RelayInfo
- type RelayServer
- type Socks5AuthReply
- type Socks5Init
- type Socks5Proxy
- type Socks5ProxyConfig
- type Socks5Reply
- type Socks5Request
- type TcpRelayServer
- type UdpRelayServer
Constants ¶
View Source
const ( CmdConnect = 0x01 CmdBind = 0x02 CmdUdpASSOCIATE = 0x03 AtypIPV4 = 0x01 AtypDomain = 0x03 AtypIPV6 = 0x04 )
View Source
const (
MethodNoAuth = 0x00
)
View Source
const (
VersionSocks5 = 0x05
)
Variables ¶
Functions ¶
func DefaultParseFunc ¶
func SendSocks5Reply ¶
Types ¶
type DefaultParser ¶
type DefaultParser struct {
// contains filtered or unexported fields
}
func (*DefaultParser) Close ¶
func (p *DefaultParser) Close() error
type HandshakeHandler ¶
type HandshakeHandler struct{}
func NewHandshakeHandler ¶
func NewHandshakeHandler() *HandshakeHandler
type InitMsgHandler ¶
type InitMsgHandler struct{}
func NewInitMsgHandler ¶
func NewInitMsgHandler() *InitMsgHandler
type Parser ¶
type RelayServer ¶
type RelayServer interface {
Relay() error
}
func NewRelayServer ¶
func NewRelayServer(info RelayInfo) RelayServer
type Socks5AuthReply ¶
type Socks5AuthReply struct { // +----+--------+ // |VER | METHOD | // +----+--------+ // | 1 | 1 | // +----+--------+ Ver byte Method byte }
func (*Socks5AuthReply) Encode ¶
func (r *Socks5AuthReply) Encode() []byte
type Socks5Init ¶
type Socks5Proxy ¶
type Socks5Proxy struct { Host string Port string FileHostPort string // contains filtered or unexported fields }
func NewSocks5Proxy ¶
func NewSocks5Proxy(c *Socks5ProxyConfig) *Socks5Proxy
func (*Socks5Proxy) Start ¶
func (p *Socks5Proxy) Start() error
func (*Socks5Proxy) Stop ¶
func (p *Socks5Proxy) Stop() error
type Socks5ProxyConfig ¶
type Socks5Reply ¶
type Socks5Reply struct {
// contains filtered or unexported fields
}
func NewSocksReply ¶
func NewSocksReply() *Socks5Reply
func (*Socks5Reply) Bytes ¶
func (r *Socks5Reply) Bytes() []byte
type Socks5Request ¶
type Socks5Request struct { // +----+-----+-------+------+----------+----------+ // |VER | CMD | RSV | ATYP | DST.ADDR | DST.PORT | // +----+-----+-------+------+----------+----------+ // | 1 | 1 | X'00' | 1 | Variable | 2 | // +----+-----+-------+------+----------+----------+ Ver byte Cmd byte Rsv byte Atyp byte Addr string Port uint16 }
type TcpRelayServer ¶
type TcpRelayServer struct {
// contains filtered or unexported fields
}
func (*TcpRelayServer) Relay ¶
func (s *TcpRelayServer) Relay() error
type UdpRelayServer ¶
type UdpRelayServer struct{}
func (*UdpRelayServer) Relay ¶
func (s *UdpRelayServer) Relay() error
Click to show internal directories.
Click to hide internal directories.