mitmproxy sits between clients and servers to inspect, modify, and replay HTTP/1, HTTP/2, HTTP/3, and WebSocket traffic. It ships console, CLI, and web front ends.
Overview
mitmproxy is an intercepting proxy for developers and security testers who need visibility into encrypted web traffic. After trust is configured, it terminates TLS locally so you can read and alter requests and responses in transit, then forward them to the original destination or synthesize replies.
Three interfaces share the same core: mitmproxy provides an interactive terminal UI, mitmdump offers non-interactive capture and scripting similar to tcpdump for HTTP, and mitmweb exposes the flow list in a browser with interception and replay controls comparable to desktop DevTools but for any app using the proxy.
The Python scripting API lets you register addons that rewrite headers, redirect hosts, inject responses, or visualize flows automatically. Message bodies can be decoded from formats such as HTML or Protobuf, filtered on the fly, and stored for later replay to either side of a conversation.
Distribution options called out publicly include native installers for Windows and Linux, Homebrew on macOS, and container images on Docker Hub. Community tools build on captured traffic, including exporters to OpenAPI and Kubernetes-focused proxy helpers mentioned on the project site.
Key features
- TLS interception for HTTP and WebSockets
- Interactive console interface
- mitmdump CLI capture and scripting
- mitmweb graphical flow browser
- On-the-fly request and response editing
- Traffic replay to client or server
- Python addon API
- Message prettifying and decoding
Use cases
- Debugging mobile or desktop app APIs
- Security testing of HTTPS clients
- Privacy measurements on web traffic
- Automating redirects with proxy scripts