Documentation
¶
Overview ¶
Package bypass defines the Bypass interface for deciding whether a target address should skip the proxy chain and connect directly.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bypass ¶
type Bypass interface {
// IsWhitelist reports whether this rule operates as a whitelist (true)
// or blacklist (false). In whitelist mode, only matched addresses bypass
// the proxy; in blacklist mode, matched addresses go through the proxy.
IsWhitelist() bool
// Contains reports whether the given address matches this bypass rule.
Contains(ctx context.Context, network, addr string, opts ...Option) bool
}
Bypass is an address filter that determines whether a target address should bypass the proxy chain and be reached directly. When Contains returns true for an address, that address will not go through the proxy forwarding chain.
type Option ¶
type Option func(opts *Options)
Option is a functional option for configuring Options.
func WithHostOption ¶ added in v0.6.1
WithHostOption sets the HTTP Host header.
func WithPathOption ¶
WithPathOption sets the HTTP request path.
func WithService ¶ added in v0.6.1
WithService sets the service name.