mitmproxy(1) a man-in-the-middle proxy


mitmproxy [options]


mitmproxy is a console tool that allows interactive examination and modification of HTTP traffic. It differs from mitmdump in that all flows are kept in memory, which means that it's intended for taking and manipulating small-ish samples. Use the ? shortcut key to view, context-sensitive documentation from any mitmproxy screen.


Optional Arguments
-h, --help
show this help message and exit
show program's version number and exit
Address to bind proxy to (defaults to all interfaces)
Strip out request headers that might cause the server to return 304-not-modified.
--confdir CONFDIR
Configuration directory. (~/.mitmproxy)
Show event log.
Don't start a proxy server.
Proxy service port.
Reverse proxy to upstream server: http[s]://host[:port]
Proxy to unconditionally forward to: http[s]://host[:port]
Read flows from file.
-s " --bar"
Run a script. Surround with quotes to pass script arguments. Can be passed multiple times.
Set sticky cookie filter. Matched against requests.
Set transparent proxy mode.
Set sticky auth filter. Matched against requests.
Increase verbosity. Can be passed multiple times.
Write flows to file.
Try to convince servers to send us un-compressed data.
Byte size limit of HTTP request and response bodies. Understands k/m/g suffixes, i.e. 3m for 3 megabytes.
Use the Host header to construct URLs for display.
Don't connect to upstream server to look up certificate details.
Enable debug information.
--palette PALETTE
Select color palette: dark, light, solarized_dark, solarized_light

Web App

Disable the mitmproxy web app.
--app-host host
Domain to serve the app from. For transparent mode, use an IP when a DNS entry for the app domain is not present. Default:
--app-port 80
Port to serve the app from.
Serve the app outside of the proxy.

Client Replay

Replay client requests from a saved file.

Server Replay

Replay server responses from a saved file.
Kill extra requests during replay.
--rheader RHEADERS
Request headers to be considered during replay. Can be passed multiple times.
Disable response refresh, which updates times in cookies and headers for replayed responses.
Disable response pop from response flow. This makes it possible to replay same response multiple times.


Replacements are of the form "/pattern/regex/replacement", where the separator can be any character. Please see the documentation for more information.

--replace PATTERN
Replacement pattern.
--replace-from-file PATH
Replacement pattern, where the replacement clause is a path to a file.

Set Headers

Header specifications are of the form "/pattern/header/value", where the separator can be any character. Please see the documentation for more information.

--setheader PATTERN
Header set pattern.

Proxy Authentication

Specify which users are allowed to access the proxy and the method used for authenticating them. These options are ignored if the proxy is in transparent or reverse proxy mode.

Allow access to any user long as a credentials are specified.
--singleuser USER
Allows access to a a single user, specified in the form username:password.
--htpasswd PATH
Allow access to users specified in an Apache htpasswd file.


CERT User-created SSL certificate file.
--client-certs CLIENTCERTS
Client certificate directory.


See help in mitmproxy for filter expression syntax.

Intercept filter expression.


mitmproxy was written by Aldo Cortesi.

This manual page was written by Alex Chernyakhovsky [email protected] for the Debian GNU/Linux system, but its use elsewhere is encouraged.