Documentation
¶
Overview ¶
Package httpproxy is the http_proxy trace kind: a recording HTTP proxy the processes a capture observes are pointed at through the environment it exports, storing each exchange it relays as an http.Exchange.
Index ¶
Constants ¶
View Source
const Kind = "http_proxy"
Kind is the name the http_proxy kind registers under.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mode ¶
type Mode string
Mode is how much of the traffic through the proxy a capture sees.
const ( // ModeConnect records each CONNECT tunnel by its host, duration and byte // counts, its payload left encrypted. ModeConnect Mode = "connect" // ModeMITM terminates TLS with an ephemeral CA the capture exports for its // processes to trust, recording each decrypted exchange in full. ModeMITM Mode = "mitm" )
type Params ¶
type Params struct {
Mode Mode `json:"mode,omitempty" clicky:"title=Mode"`
// Hosts are host globs (path.Match), without a port, limiting what is
// recorded and, under mitm, what is decrypted; empty records every host.
Hosts []string `json:"hosts,omitempty" clicky:"title=Hosts"`
// Paths are URL-path globs (path.Match) limiting which exchanges are
// recorded; empty records every path. A tunnel has no path to match, so
// it is recorded on Hosts alone.
Paths []string `json:"paths,omitempty" clicky:"title=Paths"`
// Bodies caps how much of each body is kept, as a size such as 64KiB or
// 4MiB, at most 4MiB; 0 keeps none.
Bodies string `json:"bodies,omitempty" clicky:"title=Bodies"`
// Redact names headers to blank on top of the built-in credential headers,
// which are always blanked.
Redact []string `json:"redact,omitempty" clicky:"title=Redact headers"`
// NoProxy are host:port addresses the processes reach directly, such as a
// server the host started, beside the proxy itself.
NoProxy []string `json:"noProxy,omitempty" clicky:"title=No proxy"`
// UpstreamCA is a PEM file of authorities the proxy trusts beside the
// system roots when, under mitm, it connects to the real server, such as a
// local test server's own certificate. It is read when the capture starts.
UpstreamCA string `json:"upstreamCA,omitempty" clicky:"title=Upstream CA file"`
}
Params configure the recording proxy a capture's processes are pointed at. Plain (non-TLS) exchanges are recorded in full in either mode.
Click to show internal directories.
Click to hide internal directories.