proxy

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2023 License: GPL-3.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

View Source
const Name = "PROXY"

proxy http/scocks to vmess

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(ctx context.Context, dialer outbound.Dialer) *Client

func (Client) Close

func (c Client) Close() error

func (*Client) Dial

func (c *Client) Dial(network, address string) (net.Conn, error)

func (Client) DialConn

func (c Client) DialConn(addr *tunnel.Address, _ tunnel.Tunnel) (net.Conn, error)

type Dialer

type Dialer interface {
	// Dial connects to the given address via the proxy.
	Dial(network, addr string) (c net.Conn, err error)
}

A Dialer is a means to establish a connection. Custom dialers should also implement ContextDialer.

type Proxy

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

func NewProxy

func NewProxy(ctx context.Context, cancel context.CancelFunc, sources []tunnel.Server, sink tunnel.Client) *Proxy

func (*Proxy) Close

func (p *Proxy) Close() error

func (*Proxy) Run

func (p *Proxy) Run() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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