proxy

package
v1.20.6 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Inbounder added in v1.20.4

type Inbounder interface {
	// Handle register handler for the incomming connection,
	// handler is responsible for closing connection
	// when finish reading and writing
	Handle(common.Handler)
	// ListenAndServe start the proxy server,
	// block until closed or encounter error
	ListenAndServe() error
	Close() error
}

type Outbounder added in v1.20.4

type Outbounder interface {
	DialContext(ctx context.Context, addr string) (net.Conn, error)
}

type Proxy

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

func NewProxy

func NewProxy(conf *config.Config) (*Proxy, error)

func (*Proxy) Close

func (p *Proxy) Close() error

func (*Proxy) Serve

func (p *Proxy) Serve() error

Serve launch inbound server and register handler for incoming connection. Serve returns when one of the inbounds stop.

Directories

Path Synopsis
Package socks provides a SOCKS version 5 server implementation.
Package socks provides a SOCKS version 5 server implementation.

Jump to

Keyboard shortcuts

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