Documentation ¶
Index ¶
Constants ¶
View Source
const ( AuthTypeNoAuth = byte(0) AuthTypePassword = byte(1) )
Variables ¶
View Source
var ( ErrorUnsupportedSocksCommand = errors.New("Unsupported socks command.") ErrorUnsupportedAuthMethod = errors.New("Unsupported auth method.") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { AuthType byte Accounts map[string]string Address v2net.Address UDPEnabled bool }
func (*Config) HasAccount ¶
type SocksServer ¶
type SocksServer struct {
// contains filtered or unexported fields
}
SocksServer is a SOCKS 5 proxy server
func NewSocksServer ¶
func NewSocksServer(config *Config, packetDispatcher dispatcher.PacketDispatcher) *SocksServer
NewSocksSocks creates a new SocksServer object.
func (*SocksServer) Close ¶
func (this *SocksServer) Close()
Close implements InboundHandler.Close().
func (*SocksServer) Listen ¶
func (this *SocksServer) Listen(port v2net.Port) error
Listen implements InboundHandler.Listen().
func (*SocksServer) Port ¶
func (this *SocksServer) Port() v2net.Port
Port implements InboundHandler.Port().
Click to show internal directories.
Click to hide internal directories.