mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-01 10:18:26 +00:00
mirror of https://github.com/vee1e/mitmproxy - An interactive TLS-capable intercepting HTTP proxy for penet
* net.tls: handle SSL.Error from set_min/max_proto_version in is_supported_version is_supported_version() built an SSL.Context, set the min/max protocol version, then probed support with client_conn.recv(). Only the recv() probe was wrapped in try/except SSL.Error. On OpenSSL builds that have dropped a protocol version entirely (e.g. SSLv3 after POODLE / CVE-2014-3566, see pyca/cryptography#9523), set_min_proto_version(SSL3_VERSION) raises SSL.Error already at context-setup time, before the guarded recv(). The exception then propagated unhandled and crashed callers such as TlsConfig._warn_unsupported_version, which iterates over every Version to build the "supported versions" list. Move the protocol-version setters and connection setup inside the existing try, so a setup-time SSL.Error is treated the same as a probe-time one: the version is reported as unsupported (return False) instead of raising. Behavior for currently-supported versions is unchanged. Add a regression test that monkeypatches SSL.Context.set_min_proto_version to raise SSL.Error, reproducing the crash path deterministically on any OpenSSL build, and clear the is_supported_version LRU cache around it. Closes #8264 * Remove test for SSL context setup error handling --------- Co-authored-by: Maximilian Hils <git@maximilianhils.com> |
||
|---|---|---|
| .github | ||
| docs | ||
| examples | ||
| mitmproxy | ||
| release | ||
| test | ||
| web | ||
| .gitattributes | ||
| .gitignore | ||
| .python-version | ||
| AGENTS.md | ||
| CHANGELOG.md | ||
| codecov.yml | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| MANIFEST.in | ||
| pyproject.toml | ||
| README.md | ||
| SECURITY.md | ||
| uv.lock | ||
mitmproxy
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.
The documentation for mitmproxy is available on our website:
If you have questions on how to use mitmproxy, please use GitHub Discussions!
Contributing
As an open source project, mitmproxy welcomes contributions of all forms.