Using Mitproxy with Android device on Windows 10

I have never used Mitproxy before, but I do like the description of the product and as I understand it should be comfortable and simple to use. Unfortunately, I still have some issues with using it.
I want to use it to see on my laptop the traffic of my android app installed on my android device.

  1. I have downloaded mitmproxy-2.0.2-windows-installer.exe from your Releases page.
  2. Automatically it is opened black mitproxy ui window on my laptop with 2 lines:
    Proxy server listening at …0.0.0.0:8080/
    Web server listening at …127.0.0.1:8081/
  3. I see also web page with web interface on my browser: http://127.0.0.1:8081/#/flows
  4. I have installed mitmproxy CA certificate on the phone: mitmproxy-ca-cert.cer
  5. I went to settings, Wi-Fi modified my network config, set IP settings to “Static” and manually changed the gateway address to the mitmproxy server address (my laptop’s address). I have chosen port 8080.
  6. I don’t see any HTTP/HTTPS reponses on mitproxy ui. When I try to use my Android device it bahves like it is not connected to internet at all.
    So, where is the mistake?
    Thanks in advance for your help!

Hey, How is your android device connected to your laptop? Are they on the same network?

This seems to be your problem: If you run mitmproxy in regular mode, you need to configure mitmproxy as an HTTP proxy on your phone. Setting the gateway is applicable if you run mitmproxy in transparent mode.

See: Modes of operation