# Devices and runtimes overview

> How phones, simulators, emulators, terminals and other runtimes send traffic through Cloak Proxy, and where to set each one up in the app.

Source: https://docs.subcloak.com/cloak-proxy/devices/overview/

Cloak Proxy captures more than the Mac it runs on. An iPhone, an Android phone, a simulator, a Docker container or a script in Terminal can all send their traffic through it, as long as two things are true: the device or program uses Cloak Proxy as its proxy, and it trusts the Cloak Proxy root certificate so HTTPS can be decrypted. The **Device & Runtime Setup** window walks you through both for each kind of client.

## Open Device & Runtime Setup

Use any of these:

- Click **Devices** in the main window's toolbar.
- Choose **Proxy › Device & Runtime Setup…**.
- Press <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>A</kbd> (**Tools › Search Everything…**) and type the name of a page, such as **Capturing Browser**, **iPhone & iPad** or **Docker**. Each result opens the window on that page. See [Search and command palette](https://docs.subcloak.com/cloak-proxy/inspect/search-and-command-palette/).
- Ask an AI assistant connected through the [MCP server](https://docs.subcloak.com/cloak-proxy/automation/mcp-server/). Its `open_in_app` tool opens the window with `target` set to `setup` and `page` set to `mac`, `appCapture` (from 0.5.0), `browser`, `electron`, `terminal`, `ios`, `simulator`, `android`, `docker`, `flutter` or `other`.

*[Screenshot: The Device & Runtime Setup window on Apps & Browsers: a sidebar of pages grouped under This Mac, Devices and Containers & Runtimes, the macOS proxy with a Capture macOS Traffic button, and links to App Capture, Capturing Browser, Electron Apps and Terminal. The Device & Runtime Setup window. Each page in the sidebar covers one kind of client.]*

## The setup pages

| Page | What it sets up | Docs |
|---|---|---|
| **Apps & Browsers** | Apps and browsers on this Mac, through the macOS proxy. | [macOS traffic](https://docs.subcloak.com/cloak-proxy/capture/macos-traffic/) |
| **App Capture** (added in Cloak Proxy 0.5.0) | Picked Mac apps that ignore the proxy (Go and Rust tools, command-line tools, many Electron apps), sent through Cloak Proxy by a network extension. | [Capture apps that ignore the proxy](https://docs.subcloak.com/cloak-proxy/capture/capture-apps-that-ignore-the-proxy/) |
| **Capturing Browser** (added in Cloak Proxy 0.4.0) | Chrome, Chromium, Edge, Brave or Firefox in its own profile that's already proxied and trusts the certificate. | [Capturing browser](https://docs.subcloak.com/cloak-proxy/devices/capturing-browser/) |
| **Electron Apps** (added in Cloak Proxy 0.4.0) | Electron apps started with the proxy flags and certificate. | [Electron apps](https://docs.subcloak.com/cloak-proxy/devices/capturing-browser/#launch-an-electron-app-with-capture) |
| **Terminal** | Command-line tools, through a configured Terminal window or lines to paste into zsh, bash, fish or PowerShell. | [Terminal and runtimes](https://docs.subcloak.com/cloak-proxy/devices/terminal-and-runtimes/) |
| **iPhone & iPad** | A real iOS or iPadOS device on the same Wi-Fi network: the Wi-Fi proxy and the certificate profile. | [iPhone and iPad](https://docs.subcloak.com/cloak-proxy/devices/iphone-and-ipad/) |
| **iOS Simulator** | iOS, tvOS and watchOS Simulators: one click installs the certificate in every booted simulator. | [iOS Simulator](https://docs.subcloak.com/cloak-proxy/devices/ios-simulator/) |
| **Android** | An emulator or USB-connected device through `adb`, and a debug-only network security config written into your app. | [Android](https://docs.subcloak.com/cloak-proxy/devices/android/) |
| **Docker** (added in Cloak Proxy 0.4.0) | A Compose project's containers, through a generated override, labelled by service. | [Docker](https://docs.subcloak.com/cloak-proxy/devices/docker/) |
| **Flutter** (added in Cloak Proxy 0.4.0) | A debug-only Dart file that sets the proxy and trusts the certificate. | [Flutter](https://docs.subcloak.com/cloak-proxy/devices/flutter/) |
| **Java & JVM** | The JVM's trust store and proxy settings. | [Java and the JVM](https://docs.subcloak.com/cloak-proxy/devices/java-firefox-docker-flutter-electron/) |

Other computers on your network, and any device the pages don't cover, use the certificate page at `http://cloak.proxy`. See [Other devices and access control](https://docs.subcloak.com/cloak-proxy/devices/other-devices-and-access-control/).

### Browser extension

(added in Cloak Proxy 0.4.1)

The [browser extension](https://docs.subcloak.com/cloak-proxy/devices/browser-extension/) for Chrome, Edge, Brave and Firefox tags each request with the tab and script that made it, and records a single tab without a proxy. Set it up from **Proxy › Browser Extension…**.

## Watch traffic from another device

(added in Cloak Proxy 0.3.0)

To look at the Mac's captured traffic on a phone, tablet or another computer, without installing anything, turn on the [web companion](https://docs.subcloak.com/cloak-proxy/devices/web-companion/) in **Settings › Companion** and pair the device's browser. It shows the traffic list, search and filters, the inspector, and switches for the debugging tools.

## See your own app's traffic without a proxy

(added in Cloak Proxy 0.3.0)

If you build the app you're testing, add the [in-app SDK](https://docs.subcloak.com/cloak-proxy/devices/in-app-sdk/) to its debug build instead. CloakProxyKit sends the app's URLSession requests straight to Cloak Proxy over the local network, under the app's name and icon, with no Wi-Fi proxy or certificate on the device. Turn it on in **Settings › In-app SDK**. Debugging tools don't apply to this traffic, since the app has already made the requests.

## How each client reaches Cloak Proxy

Cloak Proxy listens on port `9090` by default. By default it only accepts connections from this Mac (`127.0.0.1`). How a client reaches it decides whether you need to let other devices connect.

| Client | How its traffic reaches Cloak Proxy | Needs **Allow other devices to connect** |
|---|---|---|
| Apps and browsers on this Mac | The macOS system proxy points at `127.0.0.1:9090`. | No |
| iOS, tvOS and watchOS Simulators | They use the Mac's network settings, so the macOS proxy covers them. | No |
| Terminal programs (Node.js, Python, Ruby, Go, curl, git, Deno, AWS CLI) | `http_proxy` and related environment variables point at `127.0.0.1:9090`. | No |
| Capturing browsers and Electron apps on this Mac (added in Cloak Proxy 0.4.0) | Started with their own proxy settings pointing at `127.0.0.1:9090`. | No |
| Java and Flutter on this Mac | A flag or a generated file points them at `127.0.0.1:9090`. | No |
| Android emulator or USB device | `adb reverse` forwards the device's port `9090` to the Mac, and the device's proxy is set to `127.0.0.1:9090`. | No |
| Docker containers | `HTTP_PROXY` points at `host.docker.internal:9090`, set by a generated Compose override. See [Docker](https://docs.subcloak.com/cloak-proxy/devices/docker/). | Yes |
| iPhone, iPad, Android over Wi-Fi, other computers | The device's Wi-Fi proxy points at your Mac's address, for example `192.168.1.20:9090`. | Yes |
| iPhone or iPad, on the device | No Mac: the [Cloak Proxy app for iPhone and iPad](https://docs.subcloak.com/cloak-proxy/ipad/overview/) runs its own proxy on the device, with [VPN capture](https://docs.subcloak.com/cloak-proxy/ipad/vpn-capture/) (iOS shows it as a VPN, but nothing leaves the device through it) or the [Wi-Fi proxy](https://docs.subcloak.com/cloak-proxy/ipad/capture-on-this-device/). Apps that ignore the system proxy aren't captured. | No (no Mac involved) |
| Your own iOS or macOS app with the [in-app SDK](https://docs.subcloak.com/cloak-proxy/devices/in-app-sdk/) | The app sends its own requests to Cloak Proxy on port `9092`, found over Bonjour. No proxy is involved. | No (added in Cloak Proxy 0.3.0) |

> **Letting other devices connect opens the proxy to your network:**
> While **Allow other devices to connect** is on, anyone on your network who knows your Mac's address can send traffic through Cloak Proxy. Restrict it with the **Allowed devices** list and turn it off when you're done. See [Other devices and access control](https://docs.subcloak.com/cloak-proxy/devices/other-devices-and-access-control/).

## Trust the certificate on each client

Every client that should have its HTTPS decrypted must trust the Cloak Proxy root certificate. Cloak Proxy creates this certificate on your Mac the first time it runs, and its private key never leaves the Mac. See [Certificate](https://docs.subcloak.com/cloak-proxy/capture/certificate/).

| Client | How it trusts the certificate |
|---|---|
| This Mac (Safari, Chrome, most apps, Electron and Chromium apps) | **Install & Trust…** in **Settings › Certificate** adds it to the macOS keychain. |
| Firefox | Turn on `security.enterprise_roots.enabled` so Firefox reads the macOS keychain. |
| Terminal programs | Environment variables point each tool at the certificate or at a bundle of the macOS root certificates plus Cloak Proxy's. |
| Java | Import it into the JDK's `cacerts` with `keytool`. |
| iOS Simulator | **Install Certificate on All Booted Simulators**, once per simulator. |
| iPhone and iPad | Download the profile from `http://cloak.proxy`, install it, then turn on full trust. |
| Android | **Push Certificate**, install it as a CA certificate, and allow user certificates in your app's network security config. |
| Docker containers | Mount the certificate into the container and run `update-ca-certificates`. |

> **Note:**
> Trusting the certificate lets Cloak Proxy decrypt HTTPS, but it only decrypts the hosts you've chosen in [SSL Proxying](https://docs.subcloak.com/cloak-proxy/capture/ssl-proxying/). Other HTTPS connections pass through encrypted and show as tunnels.

## Find device traffic in the traffic list

Requests from another device appear in the sidebar's app list under the device's IP address, for example `192.168.1.42`, with a phone icon. Select it to see only that device's traffic. See [Sidebar](https://docs.subcloak.com/cloak-proxy/inspect/sidebar/).

The status capsule in the middle of the toolbar reads **Listening on** followed by the address the proxy listens on: `127.0.0.1:9090` when only this Mac can connect, and your Mac's network address, such as `192.168.1.20:9090`, while other devices are allowed. Cloak Proxy records any device or program that's pointed at it, whether or not the macOS proxy is on; the bottom bar shows **macOS traffic on** or **macOS traffic off**.

## Clean up when you're done

Proxy settings and trusted certificates stay on a device until you remove them. A device whose proxy points at a Mac where Cloak Proxy isn't running can't reach the internet through that network.

1. Remove the proxy from each device: turn the Wi-Fi proxy **Off** on an iPhone or iPad, click **Disconnect Proxy** for Android, and close any configured Terminal window.

2. Remove the certificate from devices you no longer debug: delete the iOS profile, remove the Android user certificate, and reset or erase simulators you set up.

3. In **Settings › General**, turn off **Allow other devices to connect (phones, other computers)** and click **Apply & Restart Proxy**.

Each device page has a section with the exact steps to undo its setup.

## Related

  - [iPhone and iPad](https://docs.subcloak.com/cloak-proxy/devices/iphone-and-ipad/): Set the Wi-Fi proxy and trust the certificate on a real device.
  - [Capturing browser](https://docs.subcloak.com/cloak-proxy/devices/capturing-browser/): A browser that's already proxied, and Electron apps with capture.
  - [Docker](https://docs.subcloak.com/cloak-proxy/devices/docker/): Capture a Compose project's containers, labelled by service.
  - [Other devices and access control](https://docs.subcloak.com/cloak-proxy/devices/other-devices-and-access-control/): Let devices connect, restrict them, and get the certificate.
  - [Web companion](https://docs.subcloak.com/cloak-proxy/devices/web-companion/): Watch the Mac's traffic in a browser on a phone or tablet.
  - [Browser extension](https://docs.subcloak.com/cloak-proxy/devices/browser-extension/): See which tab and script made each request.
  - [In-app SDK](https://docs.subcloak.com/cloak-proxy/devices/in-app-sdk/): See your own iOS or macOS app's requests with no proxy or certificate.
  - [Debug a mobile app](https://docs.subcloak.com/cloak-proxy/guides/debug-a-mobile-app/): A complete walkthrough from setup to fixing a bug.
