Documentation
¶
Overview ¶
Package proxychain dials through a chain of HTTP CONNECT forward proxies.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Parse ¶
Parse parses the proxy config value: one or more forward proxy URLs separated by whitespace, nearest hop first. An unencoded space is never valid inside a URL, so a single-proxy value parses as a one-element chain unchanged. Empty or whitespace-only input yields nil (no proxy).
Every hop must be an absolute http or https URL with a host. Errors name the offending hop by index and never echo the value, which may carry credentials.
Types ¶
type ConnectError ¶
ConnectError is returned by the dialer when a hop answers a CONNECT with anything but 200. Hop and Next are redacted scheme://host:port strings; Header carries the hop's response headers so the caller can classify (for Envoy, x-envoy-response-flags).
func (*ConnectError) Error ¶
func (e *ConnectError) Error() string
type Dialer ¶
type Dialer struct {
// contains filtered or unexported fields
}
Dialer reaches addr by CONNECTing through every hop in order. The returned conn is a raw tunnel to addr; anything the caller layers on top (TLS to the target, AMQP) runs end to end through it.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package proxychaintest provides an in-process HTTP CONNECT forward proxy for tests.
|
Package proxychaintest provides an in-process HTTP CONNECT forward proxy for tests. |