server

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Params added in v1.0.0

type Params struct {
	Addr        string
	Connections int
	Done        chan struct{}
	Sigint      chan os.Signal
	Timeout     time.Duration
	// contains filtered or unexported fields
}

Params is a start parameters for the server.

func (*Params) Ready added in v1.0.0

func (p *Params) Ready()

Ready closes Done channel if it is not closed yet.

type Server

type Server struct {
	S *socks5.Server
	// contains filtered or unexported fields
}

Server is a socks5 server struct.

func New

func New(cfg *socks5.Config, logInfo, logDebug *log.Logger) (*Server, error)

New creates a new socks5 server.

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(p *Params) error

ListenAndServe starts the socks5 server.

Jump to

Keyboard shortcuts

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