proxy

package
v0.0.0-...-bb6d4ad Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCommandUnimplemented = errors.New("command is unimplemented in proxy")

Functions

This section is empty.

Types

type Addr

type Addr struct {
	Host string
	Port string
	Net  string
}

func (*Addr) Network

func (a *Addr) Network() string

Network returns string such as "tcp", "udp"

func (*Addr) String

func (a *Addr) String() string

String returns string such as "127.0.0.1:3000"

type Conn

type Conn struct {
	net.Conn
	UDPConn net.Conn
	// contains filtered or unexported fields
}

func (*Conn) Close

func (c *Conn) Close() error

func (*Conn) Read

func (c *Conn) Read(b []byte) (n int, err error)

func (*Conn) Write

func (c *Conn) Write(b []byte) (n int, err error)

type DialListener

type DialListener struct {
	AuthMethods map[auth.Method]auth.Authenticator
	Dialer      net.Dialer
	// contains filtered or unexported fields
}

A DialListener holds SOCKS-specific options.

func Socks5

func Socks5(ctx context.Context, cmd socks5.Command, network, address string) (*DialListener, error)

func (*DialListener) Dial

func (d *DialListener) Dial(network, address string) (*Conn, error)

func (*DialListener) DialContext

func (d *DialListener) DialContext(ctx context.Context, network, address string) (*Conn, error)

func (*DialListener) Listen

func (d *DialListener) Listen(network, address string) (net.Listener, error)

type NotRequired

type NotRequired struct{}

func (*NotRequired) Authenticate

func (n *NotRequired) Authenticate(conn io.ReadWriter) error

Jump to

Keyboard shortcuts

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