proxy

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: BSD-3-Clause, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct {
	// contains filtered or unexported fields
}

Conn is a SOCKS5 connection for client to reach server.

func (*Conn) Run

func (c *Conn) Run() error

Run starts the new connection.

type Server

type Server struct {
	// Dialer optionally specifies the dialer to use for outgoing connections.
	// If nil, the net package's standard dialer is used.
	Dialer func(ctx context.Context, network, addr string) (net.Conn, error)

	// Username and Password, if set, are the credential clients must provide.
	Username string
	Password string
}

Server is a SOCKS5 proxy server.

func (*Server) Serve

func (s *Server) Serve(l net.Listener) error

Serve accepts and handles incoming connections on the given listener.

func (*Server) ServeConn

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

Jump to

Keyboard shortcuts

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