2016-01-28 16:14:24 -05:00
|
|
|
# mitmproxy
|
|
|
|
|
|
|
|
> An interactive man-in-the-middle HTTP proxy.
|
2024-08-28 02:25:17 +10:00
|
|
|
> See also: `mitmweb` and `mitmdump`.
|
|
|
|
> More information: <https://docs.mitmproxy.org/stable/>.
|
2016-01-28 16:14:24 -05:00
|
|
|
|
2024-08-28 02:25:17 +10:00
|
|
|
- Start `mitmproxy` with default settings (will listen on port `8080`):
|
2016-01-28 16:14:24 -05:00
|
|
|
|
|
|
|
`mitmproxy`
|
|
|
|
|
2023-05-22 04:20:15 +02:00
|
|
|
- Start `mitmproxy` bound to a custom address and port:
|
2016-01-28 16:14:24 -05:00
|
|
|
|
2024-09-03 02:43:42 +02:00
|
|
|
`mitmproxy --listen-host {{ip_address}} {{-p|--listen-port}} {{port}}`
|
2023-05-22 04:20:15 +02:00
|
|
|
|
|
|
|
- Start `mitmproxy` using a script to process traffic:
|
|
|
|
|
2024-09-03 02:43:42 +02:00
|
|
|
`mitmproxy {{-s|--scripts}} {{path/to/script.py}}`
|
2023-06-03 14:54:33 +02:00
|
|
|
|
|
|
|
- Export the logs with SSL/TLS master keys to external programs (wireshark, etc.):
|
|
|
|
|
|
|
|
`SSLKEYLOGFILE="{{path/to/file}}" mitmproxy`
|
2024-08-28 02:25:17 +10:00
|
|
|
|
|
|
|
- Specify mode of operation of the proxy server (`regular` is the default):
|
|
|
|
|
2024-09-03 02:43:42 +02:00
|
|
|
`mitmproxy {{-m|--mode}} {{regular|transparent|socks5|...}}`
|
2024-08-28 02:25:17 +10:00
|
|
|
|
|
|
|
- Set the console layout:
|
|
|
|
|
|
|
|
`mitmproxy --console-layout {{horizontal|single|vertical}}`
|