server

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPServer added in v1.2.0

type HTTPServer struct {
	Tunneler proxy.Tunneler
	Dialer   proxy.Dialer

	Log proxy.Logger
	// contains filtered or unexported fields
}

func (*HTTPServer) ServeHTTP added in v1.2.0

func (s *HTTPServer) ServeHTTP(ctx context.Context, l net.Listener) error

type Option

type Option func(*Server)

func WithDialer added in v1.2.0

func WithDialer(d proxy.Dialer) Option

func WithLogger

func WithLogger(l proxy.Logger) Option

func WithTunneler added in v1.2.0

func WithTunneler(t proxy.Tunneler) Option

type SOCKSServer added in v1.2.0

type SOCKSServer struct {
	Version socks.Version

	Dialer   proxy.Dialer
	Tunneler proxy.Tunneler

	Log proxy.Logger
}

func (*SOCKSServer) ServeSOCKS added in v1.2.0

func (s *SOCKSServer) ServeSOCKS(ctx context.Context, l net.Listener) error

type Server

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

func New

func New(ops ...Option) *Server

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(ctx context.Context, serverURL *addr.URL) error

func (*Server) Serve

func (s *Server) Serve(ctx context.Context, p addr.Proto, l net.Listener) error

Jump to

Keyboard shortcuts

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