Documentation
¶
Index ¶
- Constants
- func NewDialContext(usage string, allowList, blockList *HostMatchList, proxy *url.URL) func(ctx context.Context, network, addr string) (net.Conn, error)
- type HostMatchList
- func (hl *HostMatchList) AppendBuiltin(builtin string)
- func (hl *HostMatchList) AppendPattern(pattern string)
- func (hl *HostMatchList) IsEmpty() bool
- func (hl *HostMatchList) MatchHostName(host string) bool
- func (hl *HostMatchList) MatchHostOrIP(host string, ip net.IP) bool
- func (hl *HostMatchList) MatchIPAddr(ip net.IP) bool
Constants ¶
View Source
const MatchBuiltinExternal = "external"
MatchBuiltinExternal A valid global-unicast IP that is neither private (see MatchBuiltinPrivate) nor a reserved special-purpose range (see reservedIPNets); i.e. a routable host on the public internet.
View Source
const MatchBuiltinLoopback = "loopback"
MatchBuiltinLoopback 127.0.0.0/8 for IPv4 and ::1/128 for IPv6, localhost is included.
View Source
const MatchBuiltinPrivate = "private"
MatchBuiltinPrivate