Documentation
¶
Index ¶
- Variables
- func InitBuiltinSchemes()
- func ParseProxyURLs(proxyURL []string) ([]*url.URL, error)
- func RegisterScheme(schemeName string, factory DialFactory)
- func SupportedSchemes() []string
- type Dial
- func DialWithTimeout(timeout time.Duration) Dial
- func NewClient(proxy *url.URL) (Dial, error)
- func NewClientChain(proxies []*url.URL) (Dial, error)
- func NewClientChainWithDial(proxies []*url.URL, upstreamDial Dial) (dial Dial, err error)
- func NewClientWithDial(proxy *url.URL, upstreamDial Dial) (_ Dial, err error)
- func WrapDialerContext(dialer func(network, address string) (net.Conn, error)) Dial
- type DialFactory
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultDial = (&net.Dialer{}).DialContext
View Source
var ErrNilDial = errors.New("proxyclient: dial function is nil")
Functions ¶
func InitBuiltinSchemes ¶ added in v1.1.0
func InitBuiltinSchemes()
InitBuiltinSchemes registers the built-in proxy dialer factories. It is safe to call multiple times and is useful for runtimes where package init ordering/state may be unreliable (e.g. some WASM targets).
func RegisterScheme ¶
func RegisterScheme(schemeName string, factory DialFactory)
func SupportedSchemes ¶
func SupportedSchemes() []string
Types ¶
type Dial ¶
func DialWithTimeout ¶
func NewClientChainWithDial ¶
func NewClientWithDial ¶
func WrapDialerContext ¶ added in v1.0.3
func (Dial) DialContext ¶
Click to show internal directories.
Click to hide internal directories.