gsocks5

package
v0.0.0-...-04ff805 Latest Latest
Warning

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

Go to latest
Published: May 22, 2022 License: MIT 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(listenAddr string) *Server

NewServer create new socks5 server. 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) Listen

func (s *Server) Listen() error

Listen start a tcp listener.

func (*Server) ListenAndServe

func (s *Server) ListenAndServe() error

ListenAndServe start a tcp socks5 proxy server. 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) Serve

func (s *Server) Serve() error

Serve socks5 proxy server and wait until it returns error.

func (*Server) SetCustomDNSResolver

func (s *Server) SetCustomDNSResolver(dnsResolver gnet.LookupIPWithCtxFunc)

SetCustomDNSResolver sets custom DNS resolver for requests. This operation is optional.

func (*Server) SetCustomDialer

func (s *Server) SetCustomDialer(dialer gnet.DialWithCtxFunc)

SetCustomDialer sets custom dialer for requests. 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