Skip to content

Capture Local Traffic UX: mitmdump UX #6332

@mhils

Description

@mhils

Background

Starting with mitmproxy 9, WireGuard mode can be used to transparently proxy devices or even individual applications on Android. This is much simpler to set up than a traditional iptables-based proxy and a great UX win. 🎉 However, it does not help with inspecting applications running on the same device as mitmproxy.

Capturing local processes

To make it simpler to intercept local processes, @emanuele-em, @decathorpe and I are currently working on platform-specific
methods to redirect traffic to mitmproxy. The primary objective is that users should be able to say "intercept curl.exe", and all local cURL processes will be transparently intercepted by mitmproxy. Secondly, users should also be able to say "intercept all traffic on this machine".

The great news is that we've already finished the raw Windows and macOS functionality for this over in mitmproxy_rs over the last couple of months. The question now is how the UI and UX for this should look like. For this issue I'd like to focus on mitmdump usage, with mitmweb and mitmproxy coming later. I'm naturally a bit professionally blinkered at this point, so feedback from anyone is welcome!

Non-Interactive Command-Line Usage

mitmproxy is often used noninteractively using the mitmdump tool. For example, mitmdump --mode reverse:https://example.com starts a reverse proxy to example.com. How should a mitmdump command line invocation for "intercept curl.exe on the current device" look like?

Some proposals:

# Capture all traffic
mitmdump --mode capture-local
mitmdump --mode local
mitmdump --mode osproxy
# Capture a specific process
mitmdump --mode capture-local:curl
mitmdump --mode local:curl
mitmdump --mode osproxy:curl
mitmdump --mode osproxy --app curl

@mitmproxy/devs and everyone else: Any preferences? Any ideas for better terms / better UX here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions