An interactive TLS-capable intercepting HTTP proxy for penetration testers and software developers. https://mitmproxy.org
  • Python 79.9%
  • TypeScript 14.7%
  • JavaScript 3.4%
  • Less 1.3%
  • HTML 0.4%
  • Other 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Sleeyax a4b234a3e1
feat(web): add semantic CSS custom-property color layer (#8316)
* feat(web): add semantic CSS custom-property color layer

Introduce a :root set of semantic color tokens (surfaces, text, borders, accent, state) in global.less and route the recurring, directly-used colors across the LESS files through them.
Light-mode values are byte-equal to the literals they replace, so this is a visual no-op; it exists to give a future dark theme a single place to override.
Colors that LESS functions (lighten/darken/fadeout) consume, and one-off decorative colors, are intentionally left as literals because those functions cannot operate on var().

Part of #7789.

* [autofix.ci] apply automated fixes

* refactor(web): route remaining hardcoded colors through color tokens

Route the remaining directly-used background, text, and border literals across the LESS files through the existing semantic tokens introduced in the color layer, reusing tokens rather than adding new ones.
Light-mode colors stay visually unchanged; one-off decorative colors and LESS-function inputs are left as literals.

* refactor(web): tokenize recurring colors and drop dead styles

Add a --mitmweb-highlight token for the shared row-hover / suggestion-selection color (used in header.less and command.less) and a --mitmweb-gray token for the neutral gray reused across mode.less.
Remove the unused .command-suggestion rule and the dead rgba() border fallback in dropdown.less, which was overriding the tokenized border and rendering as translucent black.

* refactor(web): use the accent token for the first line and special tab

Replace the near-accent literals #428bca (flow detail first line) and #396cad (special tab) with --mitmweb-accent so the accent lives in exactly one place.
Both were within a few percent of the token, so this is a small deliberate light-theme shift rather than a visual no-op.
The special tab derived its hover from lighten(@special-color, 10%); since LESS functions cannot operate on var(), it now uses --mitmweb-accent-active, the same hover shade .btn-primary already uses.

* refactor(web): tokenize the mode green left border

Add a --mitmweb-green token for the #77c77a left border in mode.less, mirroring the --mitmweb-gray token already used by the neighbouring .gray-left-border.

* refactor(web): tokenize flow table row state colors

Add --mitmweb-row-* tokens for the highlighted, selected, and selected+highlighted row shades and route flowtable.less through them.
The base rows reuse the existing --mitmweb-bg / --mitmweb-bg-alt surfaces, whose values are byte-equal to the hsl() literals they replace.
Values are unchanged, so this is a visual no-op; it gives the dark theme one place to override the row states.

* docs: drop the changelog entry for the CSS color token layer

The entry conflicts with the upstream CHANGELOG.md on the PR.
Removing it for now; the entry will be re-added once the branch is rebased.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-18 14:16:31 +02:00
.github ci: harden actions (#8271) 2026-06-04 14:01:36 +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 Handle fragmented quic client hellos in ignore_hosts handling (#8296) 2026-07-17 15:28:58 +02:00
release docs: fix typos (#8285) 2026-06-18 08:51:03 +02:00
test Handle fragmented quic client hellos in ignore_hosts handling (#8296) 2026-07-17 15:28:58 +02:00
web feat(web): add semantic CSS custom-property color layer (#8316) 2026-07-18 14:16:31 +02:00
.gitattributes test dumpfiles: .bin -> .mitm 2021-02-03 19:27:15 +01:00
.gitignore switch to uv (#7662) 2025-04-16 18:38:35 +02:00
.python-version Update to Python 3.14 (#7918) 2025-10-15 21:32:53 +02:00
AGENTS.md Add AGENTS.md (#7907) 2025-10-09 20:20:57 +02:00
CHANGELOG.md Handle fragmented quic client hellos in ignore_hosts handling (#8296) 2026-07-17 15:28:58 +02:00
codecov.yml remove release/ from coverage 2022-07-25 01:39:04 +02:00
CONTRIBUTING.md switch to uv (#7662) 2025-04-16 18:38:35 +02: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
pyproject.toml Add Flowfilter description strings (#8245) 2026-07-15 15:22:40 +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 Add Flowfilter description strings (#8245) 2026-07-15 15:22:40 +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