Tested on Android 13 with mitmproxy 10.1.5, Python 3.11.6.
pkg upgrade
pkg install python pipx rust binutils
Setup pipx:
pipx ensurepath
source .bashrc
This flag is required for building ruamel.yaml.clib
(see termux/termux-packages#16746):
export CFLAGS="-Wno-incompatible-function-pointer-types"
pipx install mitmproxy
Run mitmproxy
, mitmweb
or mitmdump
.
- if you need to intercept and analyze requests from a certain Android application, you can use ProxyDroid to force that application to use mitmweb as proxy server; another option is to use Mitmproxy in the Wireguard (transparent proxy) mode with an Wireguard client;
- to install mitmproxy CA certificate, grab it from
.mitmproxy
directory and install it using Android system settings:
termux-setup-storage
cp ~/.mitmproxy/mitmproxy-ca-cert.pem ~/storage/downloads/
- to make the mitmproxy CA certificate trusted, you can use MagiskTrustUserCerts Magisk module to make the certificate part of the system certificate store.