mirror of https://github.com/vee1e/mitmproxy - An interactive TLS-capable intercepting HTTP proxy for penet
Find a file
ChrisJr404 0fb62c456c
docs: document addon live-reload + testing pattern (#8210)
* docs: document addon live-reload + testing pattern

Issue #6377 asked for addon development docs covering hot reload and
testing. mitmproxy already watches scripts loaded with -s for changes
and re-imports them on save (mitmproxy/addons/script.py: Script.watcher
and the unconditional Script(s, True) at line 218), but that behavior
was undocumented, and there was no canonical example of how to unit-test
a custom addon with mitmproxy.test.taddons / mitmproxy.test.tflow.

Add a "Developing Addons" section to docs/src/content/addons/overview.md
with two subsections:

- Live Reloading: explains the file-watcher behavior, including which
  errors leave the previous version unloaded and which don't.
- Testing Addons: a small example that unit-tests the Counter addon from
  anatomy.py using taddons.context() and tflow.tflow(), plus a pointer
  to tctx.cycle() and the existing test/mitmproxy/addons/ tests for
  patterns that need the full event sequence.

No code changes.

* reduce testing section

Testing helpers are currently a bit ugly and not part of the public API, so let's not put them front center in the docs.

---------

Co-authored-by: Chris (ChrisJr404) <11917633+ChrisJr404@users.noreply.github.com>
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2026-05-11 14:18:51 +00:00
.github Bump the github-actions group with 8 updates (#8209) 2026-05-11 15:43:00 +02:00
docs docs: document addon live-reload + testing pattern (#8210) 2026-05-11 14:18:51 +00:00
examples Fix IP blocking and merge additional DoH blocklists (#8197) 2026-04-28 20:25:50 +02:00
mitmproxy Reduce generated certificate validity (#8203) 2026-05-11 14:08:05 +00:00
release release ci: do not eat npm output 2025-11-24 19:06:11 +01:00
test Reduce generated certificate validity (#8203) 2026-05-11 14:08:05 +00:00
web web: Reduce FlowTable Redux subscriptions from O(rows) to O(1) (#8104) 2026-04-10 14:39:20 +00:00
.gitattributes
.gitignore
.python-version Update to Python 3.14 (#7918) 2025-10-15 21:32:53 +02:00
AGENTS.md
CHANGELOG.md Reduce generated certificate validity (#8203) 2026-05-11 14:08:05 +00:00
codecov.yml
CONTRIBUTING.md
LICENSE
MANIFEST.in
pyproject.toml Bump pyinstaller-hooks-contrib from 2026.2 to 2026.3 in the pyinstaller group (#8205) 2026-05-11 15:43:34 +02:00
README.md remove codacy badge 2026-04-12 23:27:13 +02:00
SECURITY.md SECURITY.md: Exclude DoS from scope (#8171) 2026-04-12 22:36:48 +02:00
uv.lock Bump pyinstaller-hooks-contrib from 2026.2 to 2026.3 in the pyinstaller group (#8205) 2026-05-11 15:43:34 +02:00

mitmproxy

Continuous Integration Status 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