# Functions

Prepares the X-Forwarded-For header for another forwarding hop by appending the previous sender's IP address to the X-Forwarded-For chain.
ChooseBindAddressForInterface choose a global IP for a specific interface, with priority given to IPv4.
ChooseHostInterface is a method used fetch an IP for a daemon.
CloneHeader creates a deep copy of an http.Header.
CloneRequest creates a shallow copy of the request along with a deep copy of the Headers.
CloseIdleConnectionsFor close idles connections for the Transport.
No description provided by the author
No description provided by the author
Extracts and returns the clients IP from the given request.
No description provided by the author
IPNetEqual checks if the two input IPNets are representing the same subnet.
Returns if the given err is "connection refused" error.
Returns if the given err is "connection reset by peer" error.
Returns if the given err is "http2: client connection lost" error.
IsNoRoutesError checks if an error is of type noRoutesError.
IsProbableEOF returns true if the given error resembles a connection termination scenario that would justify assuming that the watch is empty.
IsTimeout returns true if the given error is a network timeout error.
JoinPreservingTrailingSlash does a path.Join of the specified elements, preserving any trailing slash on the last non-empty segment.
JoinSchemeNamePort returns a string that specifies the scheme, name, and port: - "<name>" - "<name>:<port>" - "<scheme>:<name>:<port>" None of the parameters may contain a ':' character Name is required Scheme must be "", "http", or "https".
NewProxierWithNoProxyCIDR constructs a Proxier function that respects CIDRs in NO_PROXY and delegates if no matching CIDRs are found.
No description provided by the author
ParsePortRange parses a string of the form "min-max", inclusive at both ends, and initializes a new PortRange from it.
No description provided by the author
ParseWarningHeader extracts one RFC2616 14.46 warning from the specified header, returning an error if the header does not contain a correctly formatted warning.
ParseWarningHeaders extract RFC2616 14.46 warnings headers from the specified set of header values.
ResolveBindAddress returns the IP address of a daemon, based on the given bindAddress: If bindAddress is unset, it returns the host's default IP, as with ChooseHostInterface().
SetOldTransportDefaults applies the defaults from http.DefaultTransport for the Proxy, Dial, and TLSHandshakeTimeout fields if unset.
SetTransportDefaults applies the defaults from http.DefaultTransport for the Proxy, Dial, and TLSHandshakeTimeout fields if unset.
SourceIPs splits the comma separated X-Forwarded-For header and joins it with the X-Real-Ip header and/or req.RemoteAddr, ignoring invalid IPs.
SplitSchemeNamePort takes a string of the following forms: - "<name>", returns "", "<name>","", true - "<name>:<port>", returns "", "<name>","<port>",true - "<scheme>:<name>:<port>", returns "<scheme>","<name>","<port>",true Name must be non-empty or valid will be returned false.
No description provided by the author

# Constants

LoopbackInterfaceName is the default name of the loopback interface.

# Structs

PortRange represents a range of TCP/UDP ports.
No description provided by the author
No description provided by the author
WarningHeader contains a single RFC2616 14.46 warnings header.

# Interfaces

Dialer dials a host and writes a request to it.
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
DialerFunc implements Dialer for the provided function.
No description provided by the author