An interactive TLS-capable intercepting HTTP proxy for penetration testers and software developers.
Go to file
Thomas Kriechbaumer 2c1802692d
options: add request_client_cert to enable mutual TLS (#7175)
* options: add request_client_cert to enable mutual TLS

This capability was already built-in but hard-coded to be disabled. Making it configurable as option (defaulting to off) enables mTLS connections between clients and mitmproxy. If true, mitmproxy will send a TLS `CertificateRequest` message to the client during the TLS handshake, upon which a client needs to present a client certificate to mitmproxy to successfully establish an mTLS connection.

This option can be used together with the `client_certs` option to also establish an mTLS connection between mitmproxy and the upstream server. In this case, mitmproxy needs to have a full client cert, including matching private key, that is trusted and accepted by the upstream server. This is a common scenario with MQTT or IoT connections.

Example usage:
$ mitmproxy --set request_client_cert=True --set client_certs=some_directory/

With `some_directory/` containing a `mqtt.example.com.pem` x509 certificate file (including private key).

This allows a client connecting using mTLS, to be intercepted by mitmproxy, which is itself establishing an mTLS connection to the `mqtt.example.com` upstream server. Restricting the client_certs using a directory and PEM files named after the upstream domain, narrows down the mTLS requirement to this single domain, while leaving all other traffic through mitmproxy untouched (normal TLS without client certs).

* add CHANGELOG entry

* docs++

* swap section order, re-add example

---------

Co-authored-by: Maximilian Hils <git@maximilianhils.com>
Co-authored-by: Maximilian Hils <github@maximilianhils.com>
2024-09-18 19:48:41 +02:00
.github bump mitmproxy_rs (#7165) 2024-09-06 10:07:45 +00:00
docs options: add request_client_cert to enable mutual TLS (#7175) 2024-09-18 19:48:41 +02:00
examples Update change_upstream_proxy.py (#6853) 2024-05-18 12:06:48 +02:00
mitmproxy options: add request_client_cert to enable mutual TLS (#7175) 2024-09-18 19:48:41 +02:00
release added chown for .mitmproxy volume (#7168) 2024-09-09 14:08:03 +02:00
test Split `mitmproxy.proxy.layers.quic` into subpackages (#7187) 2024-09-18 22:52:51 +05:30
web options: add request_client_cert to enable mutual TLS (#7175) 2024-09-18 19:48:41 +02:00
.gitattributes test dumpfiles: .bin -> .mitm 2021-02-03 19:27:15 +01:00
.gitignore fix display of error messages on early shutdown (#6719) 2024-03-07 20:41:26 +00:00
CHANGELOG.md options: add request_client_cert to enable mutual TLS (#7175) 2024-09-18 19:48:41 +02:00
CONTRIBUTING.md CONTRIBUTING.md: temporarily remove `--cov` 2023-12-02 08:37:37 +07:00
LICENSE GPLv3 -> MIT 2013-03-18 08:37:42 +13:00
MANIFEST.in remove pathod and pathoc 2020-12-13 20:21:11 +01:00
README.md Remove Links to Slack Workspace (#6560) 2023-12-19 12:20:43 +00:00
SECURITY.md Create SECURITY.md 2021-09-13 16:34:33 +02:00
codecov.yml remove `release/` from coverage 2022-07-25 01:39:04 +02:00
pyproject.toml Individual coverage: skip logic-free __init__ files (#7186) 2024-09-18 22:37:12 +05:30

README.md

mitmproxy

Continuous Integration Status Codacy Badge autofix.ci: enabled Coverage Status Latest Version Supported Python versions

mitmproxy is an interactive, SSL/TLS-capable intercepting proxy with a console interface for HTTP/1, HTTP/2, and WebSockets.

mitmdump is the command-line version of mitmproxy. Think tcpdump for HTTP.

mitmweb is a web-based interface for mitmproxy.

Installation

The installation instructions are here. If you want to install from source, see CONTRIBUTING.md.

Documentation & Help

General information, tutorials, and precompiled binaries can be found on the mitmproxy website.

mitmproxy.org

The documentation for mitmproxy is available on our website:

mitmproxy documentation stable mitmproxy documentation dev

If you have questions on how to use mitmproxy, please use GitHub Discussions!

mitmproxy discussions

Contributing

As an open source project, mitmproxy welcomes contributions of all forms.

Dev Guide