egress

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialContext

func DialContext(ctx context.Context, cfg model.EgressConfig, network, address string) (net.Conn, error)

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

func ProxyFunc(cfg model.EgressConfig) func(*http.Request) (*url.URL, error)

ProxyFunc returns an http.Transport-compatible proxy function. For SOCKS5 proxies, returns nil — use DialContextFunc instead.

func Resolve

func Resolve(flagValue string, env map[string]string) (model.EgressConfig, []string, error)

func Summary

func Summary(cfg model.EgressConfig) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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