Proxy mode (experimental)
Note
The proxy runs with the Node.js of your computer (18 or later), found even when it comes from Homebrew, nvm or Volta. Without Node.js, Flocon downloads a standalone proxy (~100 MB) the first time you activate it, then keeps it.
Flocon Desktop can run an HTTP(S) proxy on your computer. Any phone that uses it shows its traffic in the Network screen, without the Flocon SDK in the app. It also sees calls the SDK can't intercept: WebViews, third-party SDKs, other apps.
The in-app SDK stays the recommended mode: it knows which app made the call, links it with the other plugins, and needs no certificate.
Set up the phone
- In Flocon Desktop, click the router button of the top bar, then Activate. It stays on at the next launch. The dialog shows your computer IP, the proxy port (
8080by default), a QR code to the certificate page, and the steps below for Android and iOS. - On the phone, on the same Wi-Fi network, set the Wi-Fi proxy to Manual, with that IP and port.
- Scan the QR code (or open
http://<computer IP>:<CA port>/on the phone) and install the Flocon CA:- iOS: install the profile, then trust it (the dialog shows these as two separate steps, Certificate and Trust):
- Open the page in Safari, tap Install the profile, then Allow.
- Settings › General › VPN & Device Management › Flocon Proxy › Install.
- Settings › General › About › Certificate Trust Settings: turn on Flocon Proxy CA. Without it, the profile is installed but the phone refuses the proxy: only the plain
http://calls show up, no HTTPS call.
- Android: download the certificate, then install it from Settings › Security › Encryption & credentials › Install a certificate › CA certificate (search "CA certificate" in Settings if the path differs). Since Android 11, a CA certificate opened from the browser is refused ("must be installed in Settings"). Apps only trust user certificates if their
network_security_configallows it, for example in debug builds:
- iOS: install the profile, then trust it (the dialog shows these as two separate steps, Certificate and Trust):
<network-security-config>
<debug-overrides>
<trust-anchors>
<certificates src="user" />
</trust-anchors>
</debug-overrides>
</network-security-config>
The iOS Simulator uses the network of the Mac: set the proxy in the macOS network settings instead.
Android phone plugged with adb
When adb sees the phone (USB, or adb over Wi-Fi), Flocon sets up adb reverse for it: set the Wi-Fi proxy of the phone to 127.0.0.1 and the proxy port. This also works when the phone is not on the network of your computer.
Where the calls show up
- Android phone seen by adb (plugged with
adb reverse, or on the Wi-Fi): its calls show up under the phone itself, as a Proxy app. With an app using the SDK on it, it is the same device: pick the app of the SDK or Proxy in the device selector. Without the SDK, the device is named after the phone (samsung SM-S911B). - Other phones (iPhone, Android without adb): a device named
Proxy <phone IP>, in its own Proxy group of the device selector, with a router icon.
Limits
-
An app with the Flocon SDK keeps working with the proxy on: connections to your computer go through untouched.
-
Apps that pin their certificates refuse the proxy: their HTTPS calls fail.
- Mocks and bad network simulation are not applied to proxied calls yet.
- Bodies above 2 MB are truncated.
How it works
The proxy is a small binary built from proxy/ (TypeScript, mockttp, compiled with Bun) and shipped in the app. Flocon Desktop starts it, and it connects back to the Flocon websocket like any SDK, sending regular network plugin messages (see internal-docs/protocol/network.md).