Flutter

How to use Proxyman to capture HTTPS traffic. Works with iOS and Android Devices and Simulators

Currently, Flutter does not use the system-level proxy, so if you use Proxyman, you might not see any traffic from your Flutter Project.

The good news is that you can work around this issue by manually configuring Flutter’s HTTP client to use Proxyman as its proxy.

In general, we have to manually config the HTTP Client to proxy all traffic to Proxyman Proxy Server, which is listening at IP = localhost, port = 9090.

1. Setup Flutter (Required to all platforms - iOS & Android)

Depending on which HTTP client you’re using, the steps will be slightly different. We will cover some popular HTTP Clients:

If you're using Android Emulator or iOS Simulator, you can use String proxy = 'localhost:9090'. Otherwise, please use String proxy = '<YOUR_LOCAL_IP>:9090' on Android Physical Devices.

You can find the <YOUR_LOCAL_IP> from the Proxyman -> Certificate menu -> Install for iOS -> Physical Device

Use current IP

1.1 Dart HTTPClient Class

1.2 HTTP Package

1.3 Dio

  • Dio ≥ v5.0.0 (Recommended)

  • Dio < v5.0.0 (Deprecated APIs)

2. Flutter with iOS Simulators

  1. Start your iOS Simulator from Flutter

  2. On Proxyman -> Certificate menu -> Install Certificate for iOS -> Simulators

  3. Follow all steps below

Install & trust Proxyman certificate to your iOS Simulators
  1. ✅ Done. Proxyman can capture your HTTPS.

3. Flutter with iOS Devices

4. Flutter with Android Emulator

5. Flutter with Android Devices

Credit & Reference

Credit to James Dixon from https://flutterigniter.com/debugging-network-requests/

Last updated