proxies

package
v4.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Forward

type Forward struct {
	Network  string
	Address  string
	Listener net.Listener
	Dial     func(network, address string) (net.Conn, error)
}

func (*Forward) Addr

func (f *Forward) Addr() net.Addr

func (*Forward) Close

func (f *Forward) Close()

func (*Forward) Handle

func (f *Forward) Handle(client net.Conn)

func (*Forward) Serve

func (f *Forward) Serve() (err error)

type HTTP

type HTTP struct {
	Listener net.Listener
	// TODO: Authentication configuration
	Dial network.DialFunc
}

func (*HTTP) Addr

func (h *HTTP) Addr() net.Addr

func (*HTTP) Close

func (h *HTTP) Close()

func (*HTTP) Serve

func (h *HTTP) Serve() error

type Proxy

type Proxy interface {
	Addr() net.Addr
	Close()
	Serve() error
}

type Socks5

type Socks5 struct {
	Listener    net.Listener
	Dial        network.DialFunc
	AuthMethods []socks5.Authenticator
}

func (*Socks5) Addr

func (s *Socks5) Addr() net.Addr

func (*Socks5) Close

func (s *Socks5) Close()

func (*Socks5) Serve

func (s *Socks5) Serve() error

Jump to

Keyboard shortcuts

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