mitmproxy-go

module
v0.0.0-...-ab2ec04 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2026 License: MIT

README

mitmproxy-go

A Go port of mitmproxy, the interactive TLS-capable intercepting proxy, together with the packet-level parts of mitmproxy-rs (WireGuard, local and TUN modes, content views).

The port aims at full compatibility with upstream: flow files, the ~/.mitmproxy CA layout, the filter language, option names and precedence, hook names, proxy mode specs and the mitmweb API, verified against upstream fixtures and against the pinned Python mitmproxy in differential tests.

Upstream pins

Upstream Commit Notes
mitmproxy (Python) v12.3.1 / 51c1d6b2d8d3367a773411eb7a3eeccec82b3ea7 12.3.1, flow format version 21
mitmproxy-rs (Rust) v0.12.15 / a1ce1d9bfd35d3a593ace483015c9cbcd40ddff8 workspace 0.12.15; redirector artifacts: 0.12.15 (PR #288)

These are comparison baselines, not a claim of complete behavioural catch-up. Retained artifact-production revisions and deferred differences remain documented separately. The Python differential oracle and its active fixture generators use v12.3.1. The option manifest contains 117 projected names: comparisons exclude exactly emudhra and emudhra_old, whose features remain unimplemented. Historical fixture-production revisions are retained; the embedded mitmweb frontend is the v12.3.1 build.

Status

mitmdump, mitmproxy and mitmweb are implemented under cmd/: a flow-dumping CLI, an interactive terminal UI and a web UI. The release workflow cross-builds all three commands; cross-built artifacts do not establish native platform acceptance.

The work plan, with scope, architecture, package choices and acceptance criteria, is docs/plans/mitmproxy-go-port.md. Pinned dependencies and their upgrade paths are listed in docs/dependencies.md. Where the port behaves differently from mitmproxy on purpose, and why, is listed in docs/compat.md.

Requirements

Go 1.27.3 or newer. mitmproxy requires an interactive terminal.

Native local-mode installation and manual acceptance: macOS and Windows. Cross-compilation is not evidence of native redirector, driver, process or terminal behavior. FreeBSD is cross-compiled build-only. Windows has no automatic native acceptance in CI; a manual fixture-evidence workflow is available.

Build and run

Run these commands from the repository root. Build the dumping CLI:

go build -o ./bin/mitmdump ./cmd/mitmdump

Start a loopback proxy:

./bin/mitmdump --set listen_host=127.0.0.1 --set listen_port=8080

Build the terminal UI:

go build -o ./bin/mitmproxy ./cmd/mitmproxy

Run it in an interactive terminal:

./bin/mitmproxy --set listen_host=127.0.0.1 --set listen_port=8080

Build the web UI:

go build -o ./bin/mitmweb ./cmd/mitmweb

Start loopback proxy and web listeners:

./bin/mitmweb --set listen_host=127.0.0.1 --set listen_port=8080 --set web_host=127.0.0.1 --set web_port=8081

Run one proxy at a time when reusing port 8080. Each command provides --help, --options and --version. Ctrl-C stops mitmdump and mitmweb; in mitmproxy it opens a Quit confirmation prompt. SIGTERM requests orderly shutdown. Restart with changed flags or configuration to change startup settings; configuration files are not watched for edits.

For installed commands, use a verified release archive or an independently pinned, clean source checkout. From that checkout, with GOBIN set to an absolute directory outside the tree, install each command separately:

/usr/bin/env GOTOOLCHAIN=go1.27.3 GOEXPERIMENT= GOFLAGS= GOENV=off GOWORK=off GOBIN="$GOBIN" go install ./cmd/mitmdump
/usr/bin/env GOTOOLCHAIN=go1.27.3 GOEXPERIMENT= GOFLAGS= GOENV=off GOWORK=off GOBIN="$GOBIN" go install ./cmd/mitmproxy
/usr/bin/env GOTOOLCHAIN=go1.27.3 GOEXPERIMENT= GOFLAGS= GOENV=off GOWORK=off GOBIN="$GOBIN" go install ./cmd/mitmweb

These source builds report 0.1.0-dev; they do not run release linker injection. To reproduce the plain compiler string, source installs require GOTOOLCHAIN=go1.27.3 and an empty GOEXPERIMENT. Version-suffixed go install is unsupported while the YAML replacement remains in go.mod. See the source installation checks. Homebrew, apt, container images and automatic updates are not promised distribution channels.

Optional telemetry and diagnostics

All three tools register otel_exporter_endpoint and pprof_addr as string options, both empty (disabled) by default. Opt into an owned local OTLP/HTTP collector and a separate loopback diagnostics listener:

./bin/mitmdump --set listen_host=127.0.0.1 --set otel_exporter_endpoint=http://127.0.0.1:4318 --set pprof_addr=127.0.0.1:6060

Alternatively, add these values to ~/.mitmproxy/config.yaml:

otel_exporter_endpoint: http://127.0.0.1:4318
pprof_addr: 127.0.0.1:6060

Precedence is passed dedicated flags > config.yml > config.yaml > --set > defaults. Unpassed flags do not override configuration. A config value can therefore override the --set examples; a separate --set confdir=<directory> selects an isolated configuration directory.

Telemetry exports bounded scalar metadata, including destination hosts, methods, statuses, known sizes and valid timings, not bodies, URLs/paths/queries, headers, cookies, credentials or intercepted trace context. Use HTTPS with normal certificate validation for remote collectors; plaintext HTTP is loopback-only. The exporter appends /v1/traces and /v1/metrics beneath the configured base URL, refuses redirects and ignores proxy-environment routing.

Diagnostics serve runtime metrics and service status at /debug and standard profiling handlers at /debug/pprof/. These are not routes on the proxy or web listeners. Only loopback addresses are accepted; localhost maps directly to 127.0.0.1 without DNS, and [::1]:6060 explicitly selects IPv6. Collector localhost also maps to 127.0.0.1. Loopback is a trusted-local-operator boundary, not authentication: profiling exposes privileged process information. Do not forward this port to untrusted users. Diagnostics close has a five-second budget, but a loopback client that stalls after sending headers can keep a handler goroutine alive past it; expiry is not proof that every handler joined.

Use the frontend's existing option controls to change either value, or stop and restart with changed configuration. An empty value disables the corresponding feature. Diagnostics stop the old listener before rebinding; a bind failure logs a warning and leaves diagnostics disabled. Telemetry routes a completed flow to the exporter generation current at its terminal; flows ending while export is disabled are not exported retroactively. Bounded queues can drop export work when the collector is unavailable rather than block the proxy. See compatibility details for size-known, privacy and cumulative http_fidelity semantics.

Release artifacts

The first public release is v0.1.0-rc.1, a prerelease. Final v0.1.0 promotion requires a separate explicit decision and fresh exact-source checks; release-candidate artifacts are never renamed as final artifacts. Release notes are the single source for support boundaries and known limitations.

The release workflow runs on pushed v* tags. Public tags must be vMAJOR.MINOR.PATCH or vMAJOR.MINOR.PATCH-rc.N, with nonnegative decimal version components, positive N, no leading zeros and no build metadata. Accepted tags are at most 64 ASCII bytes. Valid v0.0.0-test.* proof tags build and verify artifacts but never publish a GitHub Release. Public tags publish only after artifact verification; release candidates are marked as prereleases.

The matrix produces 18 binaries in six archives: Linux, macOS and Windows × amd64 and arm64. Each mitmproxy-go_<tag>_<goos>_<goarch>.tar.gz contains one same-named directory with LICENSE and the three commands (.exe on Windows). Its matching .provenance.json records tag, commit, source tree, toolchain, build flags, module versions, binary hashes and build information. SHA256SUMS covers exactly the six archives and six provenance files, not itself.

Every one of these 13 core files, including SHA256SUMS, has a keyless Sigstore signature bundle and GitHub build-provenance attestation under the GPG-signed source tag. Keep the core files and their 13 signature sidecars in separate directories. Verify the complete family and expected workflow identity before extracting; checksums alone are not publisher authentication. There is no Apple code signing or notarization, and consistency verification is not a reproducible-build guarantee.

Release builds inject the actual tag into --version; ordinary source builds retain 0.1.0-dev. Archives do not include native local-mode redirectors or establish native platform acceptance. Install updates into a newly verified versioned directory and retain old verified directories for rollback. A withdrawn public version keeps its immutable tag and assets and is superseded by a fixed patch version; it is not overwritten or silently deleted.

Fuzzing and benchmarks

The long fuzz carrier is manual-dispatch only; its schedule is commented out, so it is not an active nightly job. It runs the 57 package-qualified targets for ten minutes each across eight shards, with at most two shards running concurrently, retaining receipts and selected corpus artifacts. The required CI fuzz-smoke jobs remain separate.

The landed proxy benchmark harness covers HTTP/1, HTTP/2, HTTP/3 and WebSocket scenarios. The telemetry benchmark comparison is not part of this release, and no telemetry-on/off measurement series exists. PR #270 remains an open draft at retained head 883d09b and has not landed. The HTTP/1 diagnosis remains INCONCLUSIVE; the HTTP/3 high-concurrency limitation remains documented. No product or harness repair or telemetry-on/off performance comparison is claimed.

Development

hack/fmt.sh    # gofmt, gofumpt, modernize, goimports-rereviser
hack/lint.sh   # go vet, golangci-lint
go test -race -count=1 ./...

Timing-sensitive acceptance cases records the unrepaired socket/startup boundaries and the failure-retention policy; a green rerun is not a repair claim.

Licence

MIT; see LICENSE. Upstream mitmproxy and mitmproxy-rs are MIT-licensed; fixtures copied from them carry their notice under testdata/.

Directories

Path Synopsis
Package addon runs addons: it registers them, and it dispatches hooks to them inside a single dispatch domain.
Package addon runs addons: it registers them, and it dispatches hooks to them inside a single dispatch domain.
addontest
Package addontest provides an addon for testing hook dispatch.
Package addontest provides an addon for testing hook dispatch.
eventsequence
Package eventsequence replays a finished flow as the sequence of hooks the proxy fired while the flow was live (mitmproxy's eventsequence).
Package eventsequence replays a finished flow as the sequence of hooks the proxy fired while the flow was live (mitmproxy's eventsequence).
hookdata
Package hookdata defines the values the proxy passes to the connection, TLS and QUIC hooks, mirroring the dataclasses mitmproxy passes to the same hooks.
Package hookdata defines the values the proxy passes to the connection, TLS and QUIC hooks, mirroring the dataclasses mitmproxy passes to the same hooks.
addons
anticache
Package anticache removes request headers that permit a not-modified response.
Package anticache removes request headers that permit a not-modified response.
anticomp
Package anticomp asks servers not to compress their responses.
Package anticomp asks servers not to compress their responses.
apphost
Package apphost serves in-process HTTP handlers from proxy request hooks.
Package apphost serves in-process HTTP handlers from proxy request hooks.
block
Package block filters client connections by their source IP address.
Package block filters client connections by their source IP address.
blocklist
Package blocklist blocks matching requests with empty responses or a closed connection.
Package blocklist blocks matching requests with empty responses or a closed connection.
browser
Package browser starts isolated browsers configured to use the proxy.
Package browser starts isolated browsers configured to use the proxy.
clientplayback
Package clientplayback replays saved HTTP requests through the proxy core.
Package clientplayback replays saved HTTP requests through the proxy core.
commandhistory
Package commandhistory persists command history and navigates filtered commands.
Package commandhistory persists command history and navigates filtered commands.
comment
Package comment adds user comments to flows and notifies update handlers.
Package comment adds user comments to flows and notifies update handlers.
core
Package core registers commands for editing flows and managing options.
Package core registers commands for editing flows and managing options.
cut
Package cut extracts flow attributes as byte values or text tables.
Package cut extracts flow attributes as byte values or text tables.
disableh2c
Package disableh2c refuses HTTP/2 upgrades and prior knowledge without TLS.
Package disableh2c refuses HTTP/2 upgrades and prior knowledge without TLS.
dnsresolver
Package dnsresolver resolves address questions in DNS and WireGuard modes.
Package dnsresolver resolves address questions in DNS and WireGuard modes.
dumper
Package dumper prints flows in mitmdump's human-readable format.
Package dumper prints flows in mitmdump's human-readable format.
errorcheck
Package errorcheck stops startup when the application logs an error.
Package errorcheck stops startup when the application logs an error.
eventstore
Package eventstore keeps a bounded frontend event log.
Package eventstore keeps a bounded frontend event log.
export
Package export renders flows as external commands or raw HTTP messages.
Package export renders flows as external commands or raw HTTP messages.
intercept
Package intercept pauses flows matching the configured interception filter.
Package intercept pauses flows matching the configured interception filter.
keepserving
Package keepserving shuts the proxy down once playback and file reads finish, porting mitmproxy's KeepServing.
Package keepserving shuts the proxy down once playback and file reads finish, porting mitmproxy's KeepServing.
maplocal
Package maplocal serves matching HTTP requests from local files or directories.
Package maplocal serves matching HTTP requests from local files or directories.
mapremote
Package mapremote rewrites the URLs of matching live HTTP requests.
Package mapremote rewrites the URLs of matching live HTTP requests.
modifybody
Package modifybody rewrites buffered request and response bodies using flow filters.
Package modifybody rewrites buffered request and response bodies using flow filters.
modifyheaders
Package modifyheaders rewrites request and response headers using flow filters.
Package modifyheaders rewrites request and response headers using flow filters.
nextlayer
Package nextlayer chooses protocol layer stacks from connection metadata and buffered bytes.
Package nextlayer chooses protocol layer stacks from connection metadata and buffered bytes.
onboarding
Package onboarding hosts the certificate installation app inside the proxy.
Package onboarding hosts the certificate installation app inside the proxy.
onboardingapp
Package onboardingapp serves the certificate installation page and downloads.
Package onboardingapp serves the certificate installation page and downloads.
proxyauth
Package proxyauth authenticates requests with a password, htpasswd file or LDAP.
Package proxyauth authenticates requests with a password, htpasswd file or LDAP.
proxyserver
Package proxyserver configures and runs TCP proxy listeners.
Package proxyserver configures and runs TCP proxy listeners.
readfile
Package readfile replays recorded flow files through the proxy's hooks.
Package readfile replays recorded flow files through the proxy's hooks.
save
Package save streams completed flows to mitmproxy dump files.
Package save streams completed flows to mitmproxy dump files.
savehar
Package savehar exports completed HTTP flows to HTTP Archive files.
Package savehar exports completed HTTP flows to HTTP Archive files.
serverplayback
Package serverplayback serves recorded HTTP responses to matching requests.
Package serverplayback serves recorded HTTP responses to matching requests.
serversideevents
Package serversideevents warns about buffered server-side event responses.
Package serversideevents warns about buffered server-side event responses.
stickyauth
Package stickyauth carries Authorization headers onto matching later requests.
Package stickyauth carries Authorization headers onto matching later requests.
stickycookie
Package stickycookie carries server cookies onto matching later requests.
Package stickycookie carries server cookies onto matching later requests.
stripdnshttpsrecords
Package stripdnshttpsrecords removes ECH and disabled HTTP/3 advertisements from HTTPS answers while retaining records and unrelated service parameters.
Package stripdnshttpsrecords removes ECH and disabled HTTP/3 advertisements from HTTPS answers while retaining records and unrelated service parameters.
termlog
Package termlog prints application log records to a terminal or pipe.
Package termlog prints application log records to a terminal or pipe.
tlsconfig
Package tlsconfig supplies the proxy core with the TLS configurations it uses to negotiate TLS, as upstream's tlsconfig addon supplies it with OpenSSL connection objects (py:mitmproxy/addons/tlsconfig.py).
Package tlsconfig supplies the proxy core with the TLS configurations it uses to negotiate TLS, as upstream's tlsconfig addon supplies it with OpenSSL connection objects (py:mitmproxy/addons/tlsconfig.py).
updatealtsvc
Package updatealtsvc retargets reverse-proxy Alt-Svc advertisements to the listener.
Package updatealtsvc retargets reverse-proxy Alt-Svc advertisements to the listener.
upstreamauth
Package upstreamauth adds HTTP Basic credentials to upstream and reverse requests.
Package upstreamauth adds HTTP Basic credentials to upstream and reverse requests.
view
Package view maintains an ordered, filtered flow store and frontend focus.
Package view maintains an ordered, filtered flow store and frontend focus.
Package certs generates and stores the TLS certificates of the proxy.
Package certs generates and stores the TLS certificates of the proxy.
cmd
mitmdump command
Mitmdump proxies traffic and prints flows to the terminal, as mitmproxy's mitmdump entry point does.
Mitmdump proxies traffic and prints flows to the terminal, as mitmproxy's mitmdump entry point does.
mitmproxy command
Mitmproxy runs the proxy with the interactive terminal frontend.
Mitmproxy runs the proxy with the interactive terminal frontend.
mitmweb command
Mitmweb runs the proxy with the embedded web frontend.
Mitmweb runs the proxy with the embedded web frontend.
Package command manages typed commands that addons register and that the frontends invoke by name.
Package command manages typed commands that addons register and that the frontends invoke by name.
Package connection describes the client and server connections of a flow.
Package connection describes the client and server connections of a flow.
Package contentviews formats message bodies for display and interactive editing.
Package contentviews formats message bodies for display and interactive editing.
highlight
Package highlight supplies syntax-token adapters for content presentation.
Package highlight supplies syntax-token adapters for content presentation.
imagemeta
Package imagemeta extracts the display metadata of PNG, GIF, JPEG and ICO images, reading exactly the fields mitmproxy's parsers read.
Package imagemeta extracts the display metadata of PNG, GIF, JPEG and ICO images, reading exactly the fields mitmproxy's parsers read.
Package dns holds mitmproxy's DNS data model: messages, questions and resource records, and the protocol constants with their display names.
Package dns holds mitmproxy's DNS data model: messages, questions and resource records, and the protocol constants with their display names.
Package filter parses mitmproxy flow filter expressions.
Package filter parses mitmproxy flow filter expressions.
regex
Package regex compiles the regular expressions used by flow filters.
Package regex compiles the regular expressions used by flow filters.
Package flow defines mitmproxy's flows: one HTTP transaction, TCP session, UDP session or DNS query together with the client and server connections it ran over.
Package flow defines mitmproxy's flows: one HTTP transaction, TCP session, UDP session or DNS query together with the client and server connections it ran over.
state
Package state is the serialised-state vocabulary of flows.
Package state is the serialised-state vocabulary of flows.
Package flowio reads and writes mitmproxy flow files.
Package flowio reads and writes mitmproxy flow files.
flowjson
Package flowjson builds the content-free, insertion-ordered flow objects exposed by mitmweb, as mitmproxy/tools/web/app.py flow_to_json does.
Package flowjson builds the content-free, insertion-ordered flow objects exposed by mitmweb, as mitmproxy/tools/web/app.py flow_to_json does.
har
Package har imports HTTP Archive entries as mitmproxy HTTP flows.
Package har imports HTTP Archive entries as mitmproxy HTTP flows.
tnetstring
Package tnetstring implements mitmproxy's dialect of typed netstrings, the serialisation format of .mitm flow files.
Package tnetstring implements mitmproxy's dialect of typed netstrings, the serialisation format of .mitm flow files.
Package httpmsg holds mitmproxy's HTTP data model: raw header fields, requests, responses and the helpers built on them.
Package httpmsg holds mitmproxy's HTTP data model: raw header fields, requests, responses and the helpers built on them.
internal
debugserver
Package debugserver owns opt-in loopback profiling and runtime diagnostics for one Master.
Package debugserver owns opt-in loopback profiling and runtime diagnostics for one Master.
difftest
Package difftest runs Python code against the pinned upstream mitmproxy, so that tests can compare the port's behaviour with upstream's.
Package difftest runs Python code against the pinned upstream mitmproxy, so that tests can compare the port's behaviour with upstream's.
emoji
Package emoji holds the flow-marker shortcodes of mitmproxy's mitmproxy/utils/emoji.py: every name a flow may be marked with and the character it is rendered as.
Package emoji holds the flow-marker shortcodes of mitmproxy's mitmproxy/utils/emoji.py: every name a flow may be marked with and the character it is rendered as.
h2
Package h2 implements independent, bounded HTTP/2 protocol endpoints over borrowed connections.
Package h2 implements independent, bounded HTTP/2 protocol endpoints over borrowed connections.
h3
Package h3 implements ordered HTTP/3 protocol events and framing.
Package h3 implements ordered HTTP/3 protocol events and framing.
htpasswd
Package htpasswd reads Apache password files supporting bcrypt and SHA-1.
Package htpasswd reads Apache password files supporting bcrypt and SHA-1.
http1
Package http1 reads and assembles bounded HTTP/1 messages without using net/http.
Package http1 reads and assembles bounded HTTP/1 messages without using net/http.
human
Package human holds the display helpers of mitmproxy's mitmproxy/utils/human.py: byte sizes, durations, timestamps and socket addresses formatted for people, and the size parser behind options such as body_size_limit.
Package human holds the display helpers of mitmproxy's mitmproxy/utils/human.py: byte sizes, durations, timestamps and socket addresses formatted for people, and the size parser behind options such as body_size_limit.
local
Package local contains the native redirector's IPC wire messages.
Package local contains the native redirector's IPC wire messages.
magisk
Package magisk builds the Magisk module archive that installs the mitmproxy CA certificate into Android's system certificate store, as mitmproxy/utils/magisk.py builds it.
Package magisk builds the Magisk module archive that installs the mitmproxy CA certificate into Android's system certificate store, as mitmproxy/utils/magisk.py builds it.
netstack
Package netstack accepts IP packets addressed to arbitrary destinations.
Package netstack accepts IP packets addressed to arbitrary destinations.
netutil/check
Package check validates host names and ports the way mitmproxy's mitmproxy/net/check.py does.
Package check validates host names and ports the way mitmproxy's mitmproxy/net/check.py does.
netutil/encoding
Package encoding decodes and encodes HTTP message bodies for the Content-Encoding values mitmproxy understands.
Package encoding decodes and encodes HTTP message bodies for the Content-Encoding values mitmproxy understands.
netutil/freeport
Package freeport finds a port that is free for TCP or both TCP and UDP, as mitmproxy's mitmproxy/net/free_port.py does for the paired protocols.
Package freeport finds a port that is free for TCP or both TCP and UDP, as mitmproxy's mitmproxy/net/free_port.py does for the paired protocols.
netutil/serverspec
Package serverspec parses server specifications, which describe an upstream proxy or server, the way mitmproxy's mitmproxy/net/server_spec.py does: "http://example.com/", "example.org" or "example.com:443".
Package serverspec parses server specifications, which describe an upstream proxy or server, the way mitmproxy's mitmproxy/net/server_spec.py does: "http://example.com/", "example.org" or "example.com:443".
platform
Package platform recovers the destination of an accepted redirected TCP connection.
Package platform recovers the destination of an accepted redirected TCP connection.
platform/genlayout command
Command genlayout derives PF offsets from pinned header declarations using clang.
Command genlayout derives PF offsets from pinned header declarations using clang.
privfile
Package privfile opens private, operator-selected output files without following a final-component symlink.
Package privfile opens private, operator-selected output files without following a final-component symlink.
processinfo
Package processinfo exposes executable identity and presentation information.
Package processinfo exposes executable identity and presentation information.
proxy
Package proxy drives protocol layers and owns their connections.
Package proxy drives protocol layers and owns their connections.
proxy/layer
Package layer defines the contract between the proxy's connection handler and its protocol layers: what a layer is, how it is built, how it reads and writes connections, and how it fires hooks.
Package layer defines the contract between the proxy's connection handler and its protocol layers: what a layer is, how it is built, how it reads and writes connections, and how it fires hooks.
proxy/layer/layertest
Package layertest checks protocol layers' replay, half-close and hook dispatch contracts using real connections.
Package layertest checks protocol layers' replay, half-close and hook dispatch contracts using real connections.
proxy/layers/dnslayer
Package dnslayer handles DNS exchanges over packet and length-prefixed stream transports.
Package dnslayer handles DNS exchanges over packet and length-prefixed stream transports.
proxy/layers/httplayer
Package httplayer connects HTTP protocol endpoints through a common request/response event vocabulary.
Package httplayer connects HTTP protocol endpoints through a common request/response event vocabulary.
proxy/layers/httplayer/h3test
Package h3test provides frame-level HTTP/3 peers on real loopback QUIC sockets.
Package h3test provides frame-level HTTP/3 peers on real loopback QUIC sockets.
proxy/layers/modes
Package modes registers the regular, reverse, and upstream proxy top layers.
Package modes registers the regular, reverse, and upstream proxy top layers.
proxy/layers/quic
Package quic intercepts QUIC connections and relays their streams and datagrams.
Package quic intercepts QUIC connections and relays their streams and datagrams.
proxy/layers/socks5
Package socks5 implements the SOCKS5 CONNECT handshake and authentication.
Package socks5 implements the SOCKS5 CONNECT handshake and authentication.
proxy/layers/tcplayer
Package tcplayer relays TCP streams through serialised message hooks.
Package tcplayer relays TCP streams through serialised message hooks.
proxy/layers/tlslayer
Package tlslayer intercepts TLS connections using the configuration supplied by TLS hook handlers.
Package tlslayer intercepts TLS connections using the configuration supplied by TLS hook handlers.
proxy/layers/udplayer
Package udplayer relays UDP datagrams through serialised message hooks.
Package udplayer relays UDP datagrams through serialised message hooks.
proxy/layers/websocket
Package websocket relays upgraded HTTP connections through serial WebSocket hooks.
Package websocket relays upgraded HTTP connections through serial WebSocket hooks.
proxy/layers/websocket/autobahn command
Command autobahn runs a real echo origin and validates the frozen testsuite catalogue.
Command autobahn runs a real echo origin and validates the frozen testsuite catalogue.
proxy/modeserver
Package modeserver owns listeners and packet sources for proxy modes.
Package modeserver owns listeners and packet sources for proxy modes.
proxy/modespec
Package modespec parses mitmproxy mode specifications of the form mode[:configuration][@[listen_host:]listen_port].
Package modespec parses mitmproxy mode specifications of the form mode[:configuration][@[listen_host:]listen_port].
proxy/packettest
Package packettest provides bounded, queued packet peers for protocol fixtures.
Package packettest provides bounded, queued packet peers for protocol fixtures.
proxy/packettransport
Package packettransport demultiplexes a shared UDP socket into bounded, packet-preserving connections.
Package packettransport demultiplexes a shared UDP socket into bounded, packet-preserving connections.
proxy/proxytest
Package proxytest starts a complete in-process proxy for end-to-end tests.
Package proxytest starts a complete in-process proxy for end-to-end tests.
pyrepr
Package pyrepr renders values the way Python's repr() renders the objects they stand for, which is how mitmproxy shows values inside its messages and filter matches.
Package pyrepr renders values the way Python's repr() renders the objects they stand for, which is how mitmproxy shows values inside its messages and filter matches.
releasecheck
Package releasecheck validates release names, provenance and archive integrity.
Package releasecheck validates release names, provenance and archive integrity.
releasecheck/cmd/releasecheck command
Command releasecheck validates release artifact integrity and provenance.
Command releasecheck validates release artifact integrity and provenance.
releasecheck/releasetest
Package releasetest builds owned executable and source fixtures for release tests.
Package releasetest builds owned executable and source fixtures for release tests.
spec
Package spec parses separator-delimited flow modification options.
Package spec parses separator-delimited flow modification options.
stateutil
Package stateutil holds the helpers the flow models share when they write their serialised state and when they stamp a new flow or connection.
Package stateutil holds the helpers the flow models share when they write their serialised state and when they stamp a new flow or connection.
strutil
Package strutil holds the string and byte helpers of mitmproxy's mitmproxy/utils/strutils.py: escaping bytes for display and back, binary and XML sniffing, and line-based content limits.
Package strutil holds the string and byte helpers of mitmproxy's mitmproxy/utils/strutils.py: escaping bytes for display and back, binary and XML sniffing, and line-based content limits.
telemetry
Package telemetry owns opt-in flow telemetry for one Master.
Package telemetry owns opt-in flow telemetry for one Master.
testutil
Package testutil holds helpers shared by the tests of this module.
Package testutil holds helpers shared by the tests of this module.
testutil/testflow
Package testflow builds the flows, connections and messages that upstream's tests build with mitmproxy/test/tflow.py and mitmproxy/test/tutils.py, with the same field values, so that tests ported from upstream read the same.
Package testflow builds the flows, connections and messages that upstream's tests build with mitmproxy/test/tflow.py and mitmproxy/test/tutils.py, with the same field values, so that tests ported from upstream read the same.
textwrap
Package textwrap ports the parts of Python's textwrap module that mitmproxy uses to lay out help text: dedent and wrap with their default settings.
Package textwrap ports the parts of Python's textwrap module that mitmproxy uses to lay out help text: dedent and wrap with their default settings.
tlsnames
Package tlsnames translates the cipher suite names used by crypto/tls and OpenSSL.
Package tlsnames translates the cipher suite names used by crypto/tls and OpenSSL.
tools/cmdline
Package cmdline builds frontend flags from their registered options.
Package cmdline builds frontend flags from their registered options.
tools/console
Package console implements the terminal frontend's owned presentation state, dispatch bridge, key bindings and window layout.
Package console implements the terminal frontend's owned presentation state, dispatch bridge, key bindings and window layout.
tools/console/commander
Package commander implements command prompts and the command reference.
Package commander implements command prompts and the command reference.
tools/console/eventlog
Package eventlog presents the bounded event store without retaining another history.
Package eventlog presents the bounded event store without retaining another history.
tools/console/external
Package external runs user-configured editors without invoking a shell.
Package external runs user-configured editors without invoking a shell.
tools/console/flowlist
Package flowlist composes a virtualized viewport over the authoritative view.
Package flowlist composes a virtualized viewport over the authoritative view.
tools/console/flowview
Package flowview renders detached flow messages and their connection details.
Package flowview renders detached flow messages and their connection details.
tools/console/grideditor
Package grideditor edits detached rows and commits validated changes through dispatch.
Package grideditor edits detached rows and commits validated changes through dispatch.
tools/console/internal/contract
Package contract defines the owned data and dispatch boundary shared by console widgets.
Package contract defines the owned data and dispatch boundary shared by console widgets.
tools/console/keymap
Package keymap implements context-sensitive console key bindings.
Package keymap implements context-sensitive console key bindings.
tools/console/settings
Package settings implements the console's option and keybinding viewers.
Package settings implements the console's option and keybinding viewers.
tools/console/style
Package style provides safe terminal text and the console's semantic palette.
Package style provides safe terminal text and the console's semantic palette.
tools/dump
Package dump assembles the mitmdump master: the addon set of mitmproxy's tools/dump.py, restricted to the ported addons.
Package dump assembles the mitmdump master: the addon set of mitmproxy's tools/dump.py, restricted to the ported addons.
tools/web
Package web serves the embedded mitmweb frontend.
Package web serves the embedded mitmweb frontend.
tools/web/updates
Package updates serves authenticated frontend WebSocket updates.
Package updates serves authenticated frontend WebSocket updates.
tools/web/webauth
Package webauth implements mitmweb password, session and XSRF policy.
Package webauth implements mitmweb password, session and XSRF policy.
tun
Package tun configures Linux TUN devices and carries their IP packets.
Package tun configures Linux TUN devices and carries their IP packets.
version
Package version holds mitmproxy-go's release version, as upstream's mitmproxy/version.py holds mitmproxy's.
Package version holds mitmproxy-go's release version, as upstream's mitmproxy/version.py holds mitmproxy's.
vtcodes
Package vtcodes detects whether an output supports virtual terminal escape codes and renders the ANSI styles mitmproxy prints with.
Package vtcodes detects whether an output supports virtual terminal escape codes and renders the ANSI styles mitmproxy prints with.
wireguard
Package wireguard connects encrypted WireGuard tunnels to userspace packet devices.
Package wireguard connects encrypted WireGuard tunnels to userspace packet devices.
Package master ties the option, command and addon registries together and runs the proxy's lifecycle (mitmproxy's Master).
Package master ties the option, command and addon registries together and runs the proxy's lifecycle (mitmproxy's Master).
Package omap provides an insertion-ordered map with string keys.
Package omap provides an insertion-ordered map with string keys.
Package options is a port of mitmproxy's option manager (mitmproxy/optmanager.py) and its core option set (mitmproxy/options.py).
Package options is a port of mitmproxy's option manager (mitmproxy/optmanager.py) and its core option set (mitmproxy/options.py).
Package script embeds trusted operator-supplied Starlark addons.
Package script embeds trusted operator-supplied Starlark addons.
Package tcp holds the message type of TCP flows.
Package tcp holds the message type of TCP flows.
Package tlsparse reads the TLS ClientHello a client sends first: it finds the handshake message in the TLS records the proxy has received so far, which may spread it over several records, and parses the parts that mitmproxy reports to addons (py:mitmproxy/tls.py ClientHello, py:mitmproxy/proxy/layers/tls.py and the kaitai-generated parser in py:mitmproxy/contrib/kaitaistruct/tls_client_hello.py).
Package tlsparse reads the TLS ClientHello a client sends first: it finds the handshake message in the TLS records the proxy has received so far, which may spread it over several records, and parses the parts that mitmproxy reports to addons (py:mitmproxy/tls.py ClientHello, py:mitmproxy/proxy/layers/tls.py and the kaitai-generated parser in py:mitmproxy/contrib/kaitaistruct/tls_client_hello.py).
Package udp holds the message type of UDP flows.
Package udp holds the message type of UDP flows.
Package websocket holds the data of a WebSocket connection that started as an HTTP flow: its messages and how it was closed.
Package websocket holds the data of a WebSocket connection that started as an HTTP flow: its messages and how it was closed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL