Skip to Content
Getting StartedMobile Setup

Mobile Setup

APXY can proxy traffic from iOS and Android devices on the same network, and from the iOS Simulator and Android Emulator.

Web UI

Start the proxy with apxy start, open the Web UI (default http://localhost:8082), and go to Setup → Mobile Setup. Pick Physical Device, iOS Simulator, or Android Emulator. The page shows your machine’s LAN IP, the proxy port, a QR code for the setup page, and the steps for that device.

iOS Simulator and Android Emulator from the CLI

apxy device prepares a booted iOS simulator or a running Android emulator. List them first:

apxy device list

Pass a simulator UDID or an emulator serial, or booted for the only one that runs.

iOS Simulator

apxy device setup --ios-simulator booted

The command installs the APXY CA into the simulator keychain with xcrun simctl. It changes nothing else. The simulator sends its traffic through the macOS system proxy, so run apxy start in a terminal to turn the system proxy on. An iOS simulator needs no teardown.

Android Emulator

apxy device setup --android-emulator booted

The command copies the APXY CA to the emulator and sets the emulator’s HTTP proxy to the host, 10.0.2.2. Run it from a git worktree while a proxy runs, and the emulator gets that workspace’s own port on the proxy, which tags its traffic with the workspace. The emulator keeps the setting after the command exits, so setup holds the port open for 8 hours. Run setup again to hold it longer. Outside any workspace, or with no proxy running, the emulator gets the plain proxy port and its traffic is untagged; the output’s untagged_because says why. The CA lands in the user store, and you finish installing it on the emulator. For an emulator started with -writable-system, add --system-store to install the CA into the system store. The output lists what is left to do.

To make the emulator connect directly again, clear the proxy. This also releases the workspace port. The CA stays installed.

apxy device teardown --android-emulator booted

Mocks for simulators and emulators

iOS simulator traffic carries no workspace tag, and neither does an emulator set up outside a workspace or with no proxy running. Only global rules apply to that traffic, so create its mocks with --global:

apxy mock add --global --name sim-config --url "https://api.myapp.com/config" --status 200 --body '{"flag":true}'

An emulator set up in a workspace with a proxy running is tagged, so the mocks of that workspace answer it without --global. See Workspaces.

iOS Setup

  1. Connect your iPhone/iPad to the same Wi-Fi network as the machine running APXY
  2. Go to Settings → Wi-Fi → tap your network → Configure Proxy → Manual
  3. Set Server to your machine’s local IP address
  4. Set Port to the APXY proxy port (default 8080)
  5. Open Safari and navigate to the APXY certificate URL shown in the setup instructions
  6. Install the CA certificate: Settings → General → VPN & Device Management → Install
  7. Trust the certificate: Settings → General → About → Certificate Trust Settings → Enable

Android Setup

  1. Connect your Android device to the same Wi-Fi network as the machine running APXY
  2. Go to Settings → Wi-Fi → long press your network → Modify Network → Advanced → Proxy → Manual
  3. Set Proxy hostname to your machine’s local IP address
  4. Set Proxy port to the APXY proxy port (default 8080)
  5. Open Chrome and navigate to the APXY certificate URL shown in the setup instructions
  6. Install the CA certificate: Settings → Security → Encryption & Credentials → Install a certificate → CA certificate

Note: Android 7+ requires additional steps for user-installed CA certificates to be trusted by apps. Apps targeting API level 24+ ignore user certificates by default. You may need to modify the app’s network security config or use a rooted device.

QR Code Setup

For the fastest setup, scan the QR code on the Mobile Setup page from your mobile device to open the APXY setup page, which provides device-specific instructions and a one-tap certificate download.

Verifying the Connection

After setup, check the connected devices list on the Mobile Setup page. It shows each device’s IP, platform, and request count. You can also run apxy logs list to see the device’s requests.

Last updated on