ISSUE 108  ·  30 NOVEMBER 2026 ELEN RSS
CodeCity
SECURITY & COMPLIANCE № 0108

mitmproxy: it sits between your computer and the internet and shows you every request going out — encrypted traffic included, opened and readable

A tool that sits between your computer and the internet and records every request going out. It shows what each application asks for, from which address, with what data, and lets you see it even when the connection is encrypted — by opening it in front of you. You can let it through, cut it, or change it on the spot. It needs no account, key or graphics card, it runs with one command, and it uploads nothing to a third party's cloud. The price is not money: to see encrypted traffic it signs the certificates itself, so you knowingly give it permission to stand in the middle.

mitmproxy: στέκεται ανάμεσα στον υπολογιστή σου και το διαδίκτυο και σου δείχνει κάθε αίτημα που φεύγει προς τα έξω

Two words first

Picture a building with a single exit. Every letter that leaves passes through a desk at the door. Someone sits there, opens the envelope, notes where it is going and what it says, seals it again, and sends it on. At first it annoys you. Then you understand what it gave you: you now know what is leaving your house.

That desk at the door has a name: a proxy. It is neither the building nor the street; it is the stop in between. Your computer no longer talks directly to the internet; it talks to the middleman, and the middleman talks to the internet. Whatever passes, passes through there.

And because it sits in the middle, it can do more than look. It can hold a letter back and not send it. It can change a word before sending it. It can change the reply on the way back too. This is called intercepting: catching something as it passes, and stopping it, reading it, changing it or dropping it.

Now the hard part, and it is worth saying plainly. When an application talks to a website over HTTPS, the data travels sealed in an envelope that only the two ends can open. The middleman sees the envelope closed. To open it, it needs something both sides trust: a certificate. Think of it as a signed identity card. When your browser talks to a site, the site shows its identity, the browser checks who signed it, and if the signer is someone it trusts, it goes ahead. mitmproxy makes its own identity, with its own signature, and asks your system to trust it. If you allow that, it can open the envelope, read it, and seal it again before moving on.

One more word: a flow. Every pair of "request going out — answer coming back" is one flow. Like a single line in a logbook: what was asked, by whom, when, and what came back. mitmproxy keeps every flow separately, which is why you can look at them one by one, filter them, save them.

If you want one sentence: mitmproxy sits in the middle of your connection, records every request going out — encrypted ones included, once you give it permission — and lets you cut it or change it on the spot.

What it does

If you have never seen a tool like this: you open a terminal, type one word, press Enter. A list of lines appears on screen, and each line is a move that just happened: some application asked for something, and something answered. You click a line and see what was asked and what came back, text and data included. There is no window to install, no account to create, no key to enter.

If you already know what you are looking for: the tool comes in three shapes, and all three do the same job with a different face. mitmproxy is the console inside the terminal: a list of flows, keyboard navigation, details at the side. mitmweb opens the same thing as a page in your browser, with a mouse and clicks. And mitmdump has no screen at all: it prints or writes to a file, and it is the one that fits when you want to put it inside a script.

What it catches: HTTP and HTTPS, both the plain and the encrypted traffic — the second once you trust its certificate. You can view, filter, cut and change requests and responses as they pass. And you can write every flow to a file, message bodies included, to read them again later.

A second layer, used by people more than it shows: you do not only watch, you change. You can say "cut every request to this address" and see what the application does when the answer is missing. You can say "change this field" and test your own application with data the real server would never give it. And you can filter the list, so that on a flooded network you see only what matters to you. Filters are written as small conditions, and ready-made ones exist for the most common cases.

And a third, for anyone who wants to take it further: it accepts scripts. You write a small Python file, tell it "every time a request passes, do this", and mitmproxy runs it over every flow. So you can count, record, change or block with rules you wrote yourself — not with clicks, but with code. It is the same program, with your own logic inside.

And the project's numbers, read today from the registries. On GitHub the repository has 47,252 stars, 5,027 forks — meaning copies of the code in other accounts — 628 watchers and 572 open issues. The licence is MIT: you may use it, change it and share it, even inside commercial work, as long as you keep the creator's name. The first commit to the code is from 16 February 2010, and the last change is from 23 November 2026 — a sixteen-year project that is still maintained.

On PyPI, the Python package registry, the current version is 12.3.1, uploaded on 25 October 2026. It asks for Python 3.12 or newer. The package is 1.07 MB. Its downloads: 3,460,164 a month, 708,667 a week, 70,719 a day. This is not a tool known to a few; people download it every day, and a great many of them.

What people use it for. Developers who want to see what their application actually sends, because "it does not work" tells them nothing. People who check what a program on their phone is sending, because they want to know whether it talks to third parties without asking. Security teams testing whether their own application trusts the wrong certificate. And anyone who wants to see, with their own eyes, what leaves their network.

What it does not do

First and most important: it is not a security tool that decides for you. It shows the traffic; it does not say which part is bad. No database of known malicious addresses, no scoring, no warnings. It is a lens, not a guard. The judgement is yours.

Second: it does not open encrypted traffic by itself. Unless you trust its certificate, HTTPS stays sealed and you see only the address, not the content. That is not a weakness; it is the right thing. A tool that opened everything without permission would be the problem.

Third: it does not get through applications that pin their certificate. Some applications accept only one specific certificate and refuse every other, precisely so that nobody can stand in the middle. mitmproxy does not bypass them; on the contrary, their resistance is the sign that they are doing their job well.

Fourth: it does not hide your traffic. It is not a VPN. It does not change your address, it does not make you invisible. It is the opposite: it brings the traffic in front of your eyes.

Fifth: it does not run on its own. No scheduled runs, no alerts, no service left in the background. You open it, you look, you close it.

Sixth: it is not an MCP server and it is not a plugin. You declare it to no code assistant, it has no tool list a model can call on its own, it has no config file for you to edit. It is a program that runs in your terminal.

Seventh: it is not cost-free. Today it carries 572 open issues in the repository. That does not mean it is broken; it means it is large and alive, and that you will meet corners someone else has already found.

Eighth: it is not a browser and it does not draw pages. It sees the conversation between the application and the server; it does not render the web page, it does not run JavaScript, it does not show how something looks on screen. It is a tool for the language of the network, not for appearance.

Ninth: it does not read everything. It is built around the HTTP family — requests, responses, web flows. It is not a general analyser of every kind of network traffic, and it will not explain a protocol that is not its own. Whatever does not speak that language passes by without it noticing.

And the side of this that is not technical. mitmproxy sees everything that passes through the connection you give it: passwords, messages, cookies, personal data. You use it on your own network, on your own application, or on a connection you were given permission to check. You do not set it up to read the traffic of people who do not know you are looking. The difference is not a legal technicality; it is the difference between a check and surveillance.

How it is set up

The install happens in the terminal, with one command, and you do not need to be inside a project folder.

With uv

uv is a Python tool installer: it downloads the package, gives it its own environment, and puts the command where your terminal will find it.

uv tool install mitmproxy

Then you check what went in:

mitmproxy –version

With pip

If you already work with pip, the second road does the same job:

pip install mitmproxy

The ready-made files, without Python

If you do not want to touch Python at all, the project ships ready-made executables for every system, on the release page. You download them, unpack them, and run the program from the folder.

The first start

Run it from the folder where you want any files left, because that is where they land. The console:

mitmproxy

The page in your browser:

mitmweb

And the screenless output, for scripts:

mitmdump

All three listen on the same default port, 8080. If you want another:

mitmproxy –listen-port 8888

How the traffic gets inside

mitmproxy does not pull the traffic in by itself: you have to send it. Two ways. The first, your operating system or your application declares a proxy at the address 127.0.0.1 and the port 8080. The second, for a single command, you tell it to go through there:

curl -x http://127.0.0.1:8080 http://example.com

Trusting the certificate

This is the step that separates HTTP from HTTPS. The first time mitmproxy runs, it makes its own certificate and leaves it in a folder named after itself inside your home directory. For it to see encrypted traffic, your system has to trust it. While the proxy is running, you can open the address http://mitm.it from the device going through it and download the certificate for your operating system, with step-by-step instructions.

For a single command, without touching the system, you hand over the certificate file directly:

curl -x http://127.0.0.1:8080 --cacert ~/.mitmproxy/mitmproxy-ca-cert.pem https://example.com

And if you want to see the flow without trusting anything, there is the explicit override:

curl -x http://127.0.0.1:8080 -k https://example.com

The -k tells the command "do not check the certificate". It works, but it is exactly what you do not want to get used to: it skips the check that protects you.

Write the flows to a file

To keep everything that passed, message bodies included:

mitmdump -w flows.mitm

And to read them again later, without running anything again:

mitmdump -nr flows.mitm

The -w writes, the -n says "do not listen on a port", and the -r reads from a file.

Changing the traffic with a script

When you want the proxy to be more than a watcher, you hand it a Python file with your instructions:

mitmdump -s addon.py

The addon.py is yours. Inside it you write what mitmproxy should do to every request or response that passes: count it, record it, change it, block it. The same script works in the console and in the page, because the logic sits in the file, not in the program's face. So mitmproxy becomes a tool with rules you wrote, not with clicks.

A net in front of a server

There is also a way of using it that does not look like the others. Instead of standing in the middle and waiting for traffic, you set mitmproxy in front of a server, as a middleman that takes the requests itself and forwards them:

mitmproxy --mode reverse:http://example.com

So you use it to test your own service, the same way a client would approach it, but with your eyes open at every step.

Using it with each assistant

Let us say it first and plainly, because it saves you time: mitmproxy is not an MCP server. There is no server to start, no declaration to write into a config file, no tool list an assistant can call on its own. It is a shell program. With every assistant the work happens the same way: you give it the command, it asks permission to run it, it reads the output and tells you what it found. And because it does not sit inside the conversation, it costs nothing before you ask for work.

Claude Code

Claude Code runs terminal commands once you grant permission. You describe what you want in words, and the command it runs is one line:

mitmdump -w flows.mitm

Then you ask it to open the file and tell you which flows went to which address. You add nothing to a settings file and you start no server. If you want it to see the message bodies too, you ask for that explicitly, because the file can grow fast.

Codex CLI

Codex CLI works inside the project folder and asks for approval before running a command. Same line, with an explicit port so you know where it listens:

mitmdump –listen-port 8080 -w flows.mitm

One thing deserves care here. Codex runs in a restricted environment, and if the network is closed the proxy will see nothing. It will tell you "zero flows" — and it will not mean nothing passed, it will mean the command never got out. Grant network access before you draw a conclusion.

Cursor

In Cursor the command runs in the integrated terminal, and the assistant inside the editor can run it once you approve. There is no entry to add to the MCP server list, because there is no server to declare:

mitmweb –listen-port 8080

mitmweb opens a page in your browser, and the assistant can use it with you: you ask it to look at the flow file and tell you which ones deserve a second look.

The same rule holds for all three: one line, one approval, one file. The gain is not that the assistant "knows" the tool — it does not, and it does not need to. The gain is that it reads the flows with you and tells you which ones need attention.

Our own measurement

The install finished without an error, and mitmproxy –version printed the version PyPI declares, 12.3.1.

The first pass was plain HTTP: one command requested a page through the proxy, and the flow appeared in the console with the address, the response code and the message body inside. So the tool did not only show that something passed; it showed what passed.

The second pass was the hard one: HTTPS. This is where the price showed. A command-line tool refused mitmproxy's certificate — exactly as a program that checks whom it trusts should — and the connection went through only when we gave it the explicit override, the -k flag. After the override, the flow appeared whole: the encrypted traffic was now readable, the message body inside.

And the third: we wrote the flows to a file with mitmdump, and read them back from there without running anything again. The file kept the message bodies, not just the addresses.

The graphical tool was not needed at all. The whole job was done from the terminal, with mitmdump and mitmproxy, and mitmweb never opened. It is not required; it is a convenience for anyone who wants a mouse.

The lesson, and it is the most useful thing in this article: the certificate being refused is not an obstacle, it is the right thing. The tool that refused was doing its job. You decide whether to give it your trust, and you do it knowingly — not because something was broken, but because that is exactly what "standing in the middle" means.

What it costs

Money: zero. mitmproxy is free software under the MIT licence. No subscription, no account, no key, no free tier that one day ends. You download it, you run it, and you pay nothing — to us or to anyone.

Tokens: zero. The tool does not sit inside any assistant. It is not a plugin and not an MCP server, so it adds not a single token to any model's context. You run it from the shell, like any command-line program, and the model never loads it. If you are used to tools that tax every conversation with their tool schema, here you pay nothing.

Memory and disk: about the size of a small Python package. Version 12.3.1 ships as a 1.07 MB package from PyPI and needs Python 3.12 or newer. It does not stay resident: you open it when you want it and close it.

And the real price is not money. To see encrypted traffic, mitmproxy signs the certificates itself, which means you give it permission to stand in the middle and read. In our test a command-line tool refused its certificate and only passed with an explicit override. So the cost here is trust, and you give it knowingly — which is exactly right: a tool that sees everything going out should never be switched on by accident.

Sources

The repository on GitHub: https://github.com/mitmproxy/mitmproxy

The getting-started guide: https://docs.mitmproxy.org/stable/

The release page for version 12.3.1: https://github.com/mitmproxy/mitmproxy/releases/tag/v12.3.1

Εγκατάσταση

2 ΒΗΜΑΤΑ
  1. uv tool install mitmproxy
  2. mitmproxy --version
mitmproxy: it sits between your computer and the internet and shows you every request going out — encrypted traffic included, opened and readable · ΑΠΟΤΕΛΕΣΜΑ
ΠΗΓΗ
github.com/mitmproxy/mitmproxy