Documentation ¶
Overview ¶
Package proxy implements the support for an upstream (outgoing) proxy.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Type is the proxy type (Eg: "none"," socks5", "tor+socks5"). Type string // Network is the proxy address' network (`unix`, `tcp`). Network string // Address is the proxy's address. Address string // User is the optional proxy username. User string // Password is the optional proxy password. Password string // contains filtered or unexported fields }
Config is the proxy configuration.
func (*Config) FixupAndValidate ¶
FixupAndValidate applies defaults to config entires and validates the supplied configuration.
func (*Config) ToDialContext ¶
func (cfg *Config) ToDialContext(tag string) DialContextFn
ToDialContext returns a function matching Dialer.DialContext() that will utilize the configured proxy or nil iff no proxy is configured.
Click to show internal directories.
Click to hide internal directories.