proxy

package
v0.0.0-...-5655933 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPProxy

type HTTPProxy struct {
	UseSystemProxy bool   `toml:"use_system_proxy"`
	HTTPProxyURL   string `toml:"http_proxy_url"`
}

func (*HTTPProxy) Proxy

func (p *HTTPProxy) Proxy() (proxyFunc, error)

type ProxiedDialer

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

func (*ProxiedDialer) Dial

func (pd *ProxiedDialer) Dial(network, addr string) (net.Conn, error)

func (*ProxiedDialer) DialContext

func (pd *ProxiedDialer) DialContext(ctx context.Context, network, addr string) (net.Conn, error)

func (*ProxiedDialer) DialTimeout

func (pd *ProxiedDialer) DialTimeout(network, addr string, timeout time.Duration) (net.Conn, error)

type Socks5ProxyConfig

type Socks5ProxyConfig struct {
	Socks5ProxyEnabled  bool   `toml:"socks5_enabled"`
	Socks5ProxyAddress  string `toml:"socks5_address"`
	Socks5ProxyUsername string `toml:"socks5_username"`
	Socks5ProxyPassword string `toml:"socks5_password"`
}

func (*Socks5ProxyConfig) GetDialer

func (c *Socks5ProxyConfig) GetDialer() (proxy.Dialer, error)

type TCPProxy

type TCPProxy struct {
	UseProxy bool   `toml:"use_proxy"`
	ProxyURL string `toml:"proxy_url"`
}

func (*TCPProxy) Proxy

func (p *TCPProxy) Proxy() (*ProxiedDialer, error)

Jump to

Keyboard shortcuts

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