gsocks5

package
v0.0.0-...-5d13315 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

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

func NewServer() (*Server, error)

NewServer create new socks5 server. For now, non-tcp socks5 proxy server is not necessary, so there is no "network" param.

func (*Server) ServeAddr

func (s *Server) ServeAddr(listenAddr string) error

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

func (s *Server) ServeConn(conn net.Conn) error

ServeConn takes an external incoming net.Conn and serves it as Socks5 proxy request connection.

func (*Server) ServeListener

func (s *Server) ServeListener(lis net.Listener) error

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.

func (*Server) SetCustomLogger

func (s *Server) SetCustomLogger(log glog.Interface)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL