Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
NewServer create new socks5 server. For now, non-tcp socks5 proxy server is not necessary, so there is no "network" param.
func (*Server) ServeAddr ¶
ServeAddr listen TCP at `listenAddr` and serves the net.Listener as Socks5 proxy server. This function waits until an error is returned. For now, non-tcp socks5 proxy server is not necessary, so there is no "network" param. listenAddr example: "127.0.0.1:8000"
func (*Server) ServeConn ¶
ServeConn takes an external incoming net.Conn and serves it as Socks5 proxy request connection.
func (*Server) ServeListener ¶
ServeListener takes an external incoming net.Listener and serves it as Socks5 proxy server.
func (*Server) SetCustomDialer ¶
func (s *Server) SetCustomDialer(dialer gnet.DialWithCtxFunc)
SetCustomDialer sets custom dialer for requests, users can customize DNS lookup behavior in 'dialer'. This operation is optional.