Documentation
¶
Overview ¶
Package proxy detects system proxy configuration for the httpc library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Detector ¶
type Detector struct{}
Detector provides automatic system proxy detection
func (*Detector) GetProxyFunc ¶
GetProxyFunc returns a proxy function that automatically detects system proxy settings. It returns nil if no proxy is configured, which means direct connection.
Detection runs once per GetProxyFunc call, and the returned closure serves the detected result for the closure's lifetime — the Detector itself does not memoize. The only production caller (connection.NewPoolManager) calls this exactly once per Detector; caching the detection on the Detector would additionally freeze the first result for the Detector's lifetime (surprising for anything named "auto-detect"), so a fresh call re-detects.