Documentation
¶
Index ¶
- func DialContext(ctx context.Context, cfg model.EgressConfig, network, address string) (net.Conn, error)
- func DialContextFunc(cfg model.EgressConfig) func(ctx context.Context, network, addr string) (net.Conn, error)
- func IsSOCKSEgress(cfg model.EgressConfig) bool
- func ProxyFunc(cfg model.EgressConfig) func(*http.Request) (*url.URL, error)
- func Resolve(flagValue string, env map[string]string) (model.EgressConfig, []string, error)
- func Summary(cfg model.EgressConfig) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DialContext ¶
func DialContextFunc ¶
func DialContextFunc(cfg model.EgressConfig) func(ctx context.Context, network, addr string) (net.Conn, error)
DialContextFunc returns a dialer that routes through the egress proxy. Use this on http.Transport.DialContext when the egress proxy is SOCKS5 (since http.Transport.Proxy only supports HTTP/HTTPS proxies).
func IsSOCKSEgress ¶
func IsSOCKSEgress(cfg model.EgressConfig) bool
IsSOCKSEgress reports whether the egress config uses a SOCKS5 proxy.
func ProxyFunc ¶
ProxyFunc returns an http.Transport-compatible proxy function. For SOCKS5 proxies, returns nil — use DialContextFunc instead.
func Summary ¶
func Summary(cfg model.EgressConfig) string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.