anyproxy

package module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2021 License: MIT Imports: 14 Imported by: 4

README

anyproxy

Proxy server supporting http/socks4/socks5 on port

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNetClosing = errors.New("use of closed network connection")

Functions

This section is empty.

Types

type AnyProxy

type AnyProxy struct {
	Socks4 socks4.Server
	Socks5 socks5.Server
	Http   http.Server
	CMux   *cmux.CMux
}

func NewAnyProxy

func NewAnyProxy(ctx context.Context, dial Dialer, logger *log.Logger, pool BytesPool) *AnyProxy

func (*AnyProxy) ListenAndServe

func (s *AnyProxy) ListenAndServe(network, address string) error

func (*AnyProxy) ServeConn

func (s *AnyProxy) ServeConn(conn net.Conn)

ServeConn is used to serve a single connection.

type BytesPool added in v0.2.0

type BytesPool httpproxy.BytesPool

type Dialer

type Dialer interface {
	DialContext(ctx context.Context, network, address string) (net.Conn, error)
}

Directories

Path Synopsis
cmd
anyproxy command

Jump to

Keyboard shortcuts

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