# Apps that ignore the proxy

> Capture Mac apps that skip the macOS proxy by pointing their domains at Cloak Proxy through DNS, with suggested domains and a background helper.

Source: https://docs.subcloak.com/cloak-proxy/capture/apps-that-ignore-the-proxy/

Some Mac apps never use the macOS proxy settings, so their requests don't show up even while Cloak Proxy captures macOS traffic. Typical examples are apps with their own network stack (gRPC, Network.framework), Flutter apps, and apps that embed payment or security SDKs. Cloak Proxy spots these apps, lists them under **Not using the proxy**, and can capture them by answering the DNS lookups for their domains and taking the connections itself.

> **Tip:**
> For a browser or an Electron app, try a [capturing browser](https://docs.subcloak.com/cloak-proxy/devices/capturing-browser/) or **Launch with Capture** first: they start the app with its own proxy settings, with no DNS changes or password. Containers: [Docker](https://docs.subcloak.com/cloak-proxy/devices/docker/). Flutter: [Flutter](https://docs.subcloak.com/cloak-proxy/devices/flutter/).

> **Capture the whole app instead:**
> (added in Cloak Proxy 0.5.0) From 0.5.0, with the Cloak Proxy download, [App Capture](https://docs.subcloak.com/cloak-proxy/capture/capture-apps-that-ignore-the-proxy/) sends every connection of the apps you pick through Cloak Proxy, whatever the server, with no domains to choose. The capture sheet offers it at the top as **Use App Capture**. It needs a network extension that you allow once in System Settings. [Compare the two](https://docs.subcloak.com/cloak-proxy/capture/capture-apps-that-ignore-the-proxy/#app-capture-or-dns-capture).

## Find apps that skip the proxy

While [macOS capture](https://docs.subcloak.com/cloak-proxy/capture/macos-traffic/) is on, Cloak Proxy checks every 8 seconds for apps with direct connections to the internet. An app appears in the sidebar under **Not using the proxy** once it has been seen with direct connections in two checks, with no more than 5 minutes between sightings. The checks don't have to be back to back: many apps open a direct connection only for a moment, for one API call every so often, and a single check often misses it. A connection seen only once, such as one opened just before capture started, doesn't list the app. (added in Cloak Proxy 0.2.1)

An app stays listed until 5 minutes pass without a direct connection, so apps that connect now and then don't flicker in and out. Its count covers the different servers it was seen connected to in that time, up to 40.

*[Screenshot: The sidebar's Not using the proxy group listing ShopApp with 21 direct connections and an orange icon, between the Apps and Domains groups. ShopApp connects straight to the internet, so it's listed under Not using the proxy.]*

A direct connection is an established TCP connection to a public IPv4 address on port 80, 443, 8080 or 8443 that doesn't go through Cloak Proxy. Cloak Proxy only lists apps with an app bundle (not system daemons), and never lists itself. Connections to your local network and to `localhost` don't count.

| Row | Meaning |
|---|---|
| Orange icon, **N direct connections** | The app connects straight to the internet. Hover the row to read why its requests don't show up. Click it to capture it. |
| Green check, **Captured ·** followed by domains | Lookups for these domains go to Cloak Proxy. Click the row to change the capture. |
| Orange exclamation mark, **Captured, but N direct connections still skip Cloak Proxy** (added in Cloak Proxy 0.2.1) | The app is captured, but it also connects straight to servers outside the captured domains, so some of its requests are still missing. Click the row to open the capture sheet, which finds those servers and checks their domains for you. |

The section appears only when there's an app to show. Click its header to collapse it.

> **Note:**
> Detection only runs while the macOS proxy points at Cloak Proxy. Capturing itself doesn't need macOS capture: once you've captured an app, it's captured whenever Cloak Proxy is running.

## Capture an app

1. Open the capture sheet in one of these ways:

   - Click the app under **Not using the proxy**.
   - Right-click the app under **Apps** and choose **Capture Requests That Skip the Proxy…**.
   - Press <kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>A</kbd> and choose **Capture** followed by the app's name and **(Not Using the Proxy)**. Search Everything offers this for the first app in the list.

2. Wait while the sheet says **Finding the servers** _app_ **connects to…**, then, under **Domains to capture**, check the domains the app uses.

   Cloak Proxy [suggests domains](#suggested-domains). The ones the app is connected to directly right now come first, checked and labelled **connected directly now**. Domains that look like the app's own follow, also checked. (added in Cloak Proxy 0.2.1)

3. To add a domain that isn't listed, type it in **Add a domain, e.g. api.example.com** and press <kbd>Return</kbd> or click **Add**. It's added at the top, checked.

4. Click **Capture**. macOS asks for your password to add the resolver files.

5. When the sheet reads **Done. Quit and reopen** the app **so it looks up its servers again; its requests then show up here**, click **Close**, then quit and reopen the app.

The app's requests now appear in the traffic list. Captured domains are always decrypted, so you see the requests inside, as long as the app trusts the Cloak Proxy root certificate.

*[Screenshot: The Capture ShopApp sheet: it says the app connects straight to 21 servers, offers to capture everything ShopApp sends with a Use App Capture button, explains DNS capture, lists domains to capture with api.shopapp.example (connected directly now) and shopapp.example checked and analytics.example and payments.example unchecked, has a field to add a domain, four notes, and Cancel and Capture buttons. The capture sheet suggests the app's domains and checks the ones that match its name.]*

### The capture sheet

| Part | What it does |
|---|---|
| **Capture everything** _app_ **sends** (added in Cloak Proxy 0.5.0) | Shown in builds with the network extension, for an app that isn't in App Capture yet. **Use App Capture** adds the app to [App Capture](https://docs.subcloak.com/cloak-proxy/capture/capture-apps-that-ignore-the-proxy/), turns it on (installing the extension if needed) and opens its page. |
| Title and subtitle | **Capture** the app for a new capture, or the app's name followed by **Capture** when you edit one. The subtitle says how many servers it connects to directly, or that lookups for the listed domains are answered by Cloak Proxy. |
| **Domains to capture** | One checkbox per domain. While Cloak Proxy reads the app and looks up its servers, it shows **Finding the servers** _app_ **connects to…**. Domains the app is connected to directly right now are labelled **connected directly now** in orange. When nothing is found, it reads **No domains found in the app. Add the ones it uses below.** |
| **Add a domain, e.g. api.example.com** and **Add** | Adds a domain. Cloak Proxy removes any scheme, path, port and leading `*.` or `.`, so pasting `https://api.example.com:443/v1` adds `api.example.com`. **Add** stays dimmed until the text is a valid domain. Adding a listed domain checks it. |
| Notes | **Applies to every app on this Mac that uses these domains (and their subdomains).** / **macOS asks for your password to add a file per domain in /etc/resolver. Stop capturing to remove them.** / **While Cloak Proxy is closed a small background helper answers these lookups normally, so the app keeps working.** / **Apps that pin certificates can't be decrypted; Cloak Proxy then passes them through and still lists the connections.** |
| **Pinned (passed through):** | Appears in orange when hosts in the checked domains have pinned their certificates. See [Pinned apps](#pinned-apps). |
| **Stop Capturing** | Removes this capture. Only shown when you edit an existing capture. |
| **Cancel** / **Close** | Closes the sheet without changes, or after a capture is done. |
| **Capture** / **Update** | Saves the checked domains. Dimmed until at least one domain is checked. |

### Suggested domains

Cloak Proxy builds the list from three sources:

- **Host names in the app's code.** It reads the app's executable, plus the files where apps built with Flutter and React Native keep their code: Flutter's compiled Dart code (`Frameworks/App.framework/App`) and the React Native bundle (`main.jsbundle`). (added in Cloak Proxy 0.2.1)
- **The app's direct connections.** It looks up the addresses of up to 300 host names found in the code and compares them with the servers the app is connected to: right now, and in the checks before you opened the sheet. A domain whose address matches is one the app is using directly.
- **Hosts the app already reached through Cloak Proxy.**

It reduces each host to its registrable domain (`api.eu.example.co.in` becomes `example.co.in`) and lists them in this order:

1. Domains the app is **connected directly now**. They're checked, even when you edit an existing capture, because those connections are what's missing from the traffic list. (added in Cloak Proxy 0.2.1)
2. Domains that share a word with the app's name or bundle identifier, sorted by how often they appear. They're checked for a new capture.
3. Up to 25 other domains found in the app's code, unchecked: these are often analytics, payment or other third-party services.

A domain the app only reaches through Cloak Proxy already is suggested only when it's named like the app: its requests show up anyway. Domains that many apps share, such as `apple.com`, `icloud.com`, `google.com`, `googleapis.com`, `gstatic.com`, `facebook.com`, `amazonaws.com`, `cloudfront.net`, `firebaseio.com` and `crashlytics.com`, and the Flutter, Dart and React Native sites such as `flutter.dev`, `pub.dev` and `reactnative.dev`, are never suggested.

> **Flutter apps:**
> Flutter apps ignore the macOS proxy, because Dart's HTTP client doesn't use the system proxy settings. DNS capture works for them without any change to the app: capture the domains the sheet suggests, then quit and reopen the app. For a Flutter app you're building, you can also set the proxy in code; see [Flutter](https://docs.subcloak.com/cloak-proxy/devices/flutter/).

> **Capture only the app's own domains:**
> A capture applies to every app on your Mac that looks up those domains, including their subdomains. Capturing a domain your browser or other apps also use sends their traffic through Cloak Proxy too, and decrypts it. Check only the domains you need, and avoid shared services.

## Change or stop a capture

1. Click the app under **Not using the proxy** (it shows a green check), or right-click it under **Apps** and choose **Edit Capture…**.

2. Check or uncheck domains and click **Update**, or click **Stop Capturing** to remove the capture.

3. Enter your password when macOS asks.

Stopping removes the app's resolver files. When no captures are left, Cloak Proxy also removes the background helper. Quit and reopen the app so it looks up its servers again and goes back to connecting directly.

There's no pause switch for a capture. To stop capturing for a while, use **Stop Capturing**, and capture the app again later: the sheet suggests the same domains.

## How DNS capture works

1. For each captured domain, Cloak Proxy writes a file named after the domain to `/etc/resolver`, for example `/etc/resolver/example.com`. It tells macOS to send lookups for that domain and its subdomains to `127.0.0.1` port `53535`:

   ```text title="/etc/resolver/example.com"
   # Cloak Proxy capture (remove it with Cloak Proxy, or delete this file)
   nameserver 127.0.0.1
   port 53535
   ```

   Then it flushes the macOS DNS cache. Resolver files from other tools are left alone.

2. Cloak Proxy's resolver on `127.0.0.1:53535` asks your network's real DNS servers (or `1.1.1.1` and `8.8.8.8` if it can't find them) for the real address, remembers it, and answers `127.0.0.1`. Answers expire after 5 seconds, so apps notice changes quickly. Names that don't exist stay nonexistent.

3. IPv6 and HTTPS-record lookups for captured names get empty answers, so apps connect over IPv4.

4. The app connects to `127.0.0.1` on port 443 or 80. Cloak Proxy accepts connections there only from this Mac, reads the host name from the TLS handshake (SNI) or the `Host` header, and connects to the real address it remembered.

5. The connection is handled like an HTTPS tunnel: decrypted, recorded and run through your [debugging tools](https://docs.subcloak.com/cloak-proxy/tools/overview/). [DNS Spoofing](https://docs.subcloak.com/cloak-proxy/tools/dns-spoofing/) rules take priority over the remembered address.

Only this Mac can ask Cloak Proxy's resolver. Lookups for other domains never reach it.

## While Cloak Proxy is closed

Captured domains resolve through Cloak Proxy, so without help they'd stop working whenever Cloak Proxy isn't running. A background helper covers that gap:

- It's a per-user LaunchAgent, `~/Library/LaunchAgents/com.subcloak.cloakproxy.dns-standby.plist`, that runs `cloakctl dns-standby` from inside the app at login. No password is needed to install it.
- While Cloak Proxy is closed, the helper answers lookups for captured domains with their real addresses, so apps connect normally. Their requests aren't recorded.
- When Cloak Proxy is running, the helper steps aside and Cloak Proxy answers.
- It exits by itself once no Cloak Proxy resolver files are left, and macOS restarts it if it crashes.

Cloak Proxy installs the helper when you capture your first app, refreshes it each time it opens (so it always points at your current copy of the app), and removes it when you stop the last capture.

> **Before you delete Cloak Proxy:**
> Stop every capture before you delete the app. If the resolver files stay behind without Cloak Proxy and its helper, the captured domains stop resolving for every app on your Mac. If that already happened, see [Clean up after deleting the app](https://docs.subcloak.com/cloak-proxy/getting-started/install/#clean-up-after-deleting-the-app).

## On Linux

(added in Cloak Proxy 0.4.1)

The [Linux beta](https://docs.subcloak.com/cloak-proxy/getting-started/install-linux/) captures an app's domains the same way: they resolve to Cloak Proxy's own resolver, and Cloak Proxy takes the connections on `127.0.0.1`, reading each host from the TLS handshake. What changes is how the system is told. It needs:

- **The .deb or the RPM.** Capture changes the system with a small root-owned helper, `/usr/lib/cloak-proxy/cloak-proxy-capture`, which only the packages install. The AppImage and the portable folder can't capture domains, and say so: use the `.deb` or the RPM, or send the app through the proxy another way, such as a terminal from **Device Setup › Terminal**, the [capturing browser](https://docs.subcloak.com/cloak-proxy/devices/capturing-browser/) or **Electron Apps**.
- **systemd-resolved, systemd 246 or later.** That covers Ubuntu 24.04 and later, Debian 13 (with systemd-resolved installed) and Fedora. Without it, Cloak Proxy says capture isn't available on this computer.

When you choose **Capture Its Domains** (in the Doctor, or on an app's right-click menu in the sidebar), Cloak Proxy shows the exact command first. Then your desktop asks for your password once, and the helper makes two changes:

1. It writes `/etc/systemd/resolved.conf.d/cloak-proxy-capture.conf`, which sends lookups for those domains (and their subdomains) to `127.0.0.1:53535`, then reloads systemd-resolved. This takes the place of the files in `/etc/resolver`.
2. It lets Cloak Proxy's own binary, `/usr/lib/cloak-proxy/cloak-linux`, take connections on ports 443 and 80 (`setcap cap_net_bind_service`). Cloak Proxy listens there on `127.0.0.1` only, so nothing on the network can reach those ports. The first time, restart Cloak Proxy to finish.

Cloak Proxy then checks the result with `resolvectl query` and shows it. While Cloak Proxy is closed, a small resolver in your user session (`cloak-proxy-dns-standby.service`, running `cloakctl dns-standby`) answers for the captured domains, so the app keeps working; it just isn't recorded.

To undo it:

- **In Cloak Proxy:** stop the app's capture, or every capture. The drop-in file and the capability go, and the standby resolver stops. **Settings › Advanced › Undo All System Changes** also removes them, with everything else Cloak Proxy changed, after one password prompt.
- **Uninstalling the .deb or the RPM** removes the drop-in file. The capability goes with the binary.
- **By hand**, for example if Cloak Proxy is already gone:

  ```bash title="Terminal"
  sudo rm /etc/systemd/resolved.conf.d/cloak-proxy-capture.conf
  sudo systemctl reload-or-restart systemd-resolved
  resolvectl flush-caches
  sudo setcap -r /usr/lib/cloak-proxy/cloak-linux                 # if Cloak Proxy is still installed
  systemctl --user disable --now cloak-proxy-dns-standby.service
  rm ~/.config/systemd/user/cloak-proxy-dns-standby.service
  ```

`resolvectl query <domain>` shows whether a domain still resolves to `127.0.0.1`.

## Pinned apps

Apps that pin their certificates reject Cloak Proxy's certificate, so they can't be decrypted. For captured domains, Cloak Proxy detects this on the first failed handshake, records the failure with a note that it now passes the host through, and relays that host untouched from then on, so the app keeps working. The connections still appear in the list as encrypted tunnels, and the capture sheet lists those hosts under **Pinned (passed through):**. Cloak Proxy forgets this when the proxy restarts, and tries to decrypt the host again.

## Limits

| Limit | Why |
|---|---|
| Only ports 443 (HTTPS) and 80 (HTTP) | Cloak Proxy takes over captured connections on these two ports. Don't capture a domain the app reaches on another port. |
| IPv4 only | IPv6 lookups for captured names get empty answers so apps fall back to IPv4. |
| Affects every app on the Mac | `/etc/resolver` applies system-wide to the domain and its subdomains. |
| The app must look the name up | Apps that connect to a fixed IP address, or resolve names with their own DNS client, don't use `/etc/resolver` and can't be captured this way. |
| Ports 80 and 443 must be free | If another program on your Mac, such as a local web server, already uses one of them, the sheet shows an error such as **Capture listener on port 443:** followed by the reason. |
| Pinned certificates | See [Pinned apps](#pinned-apps). |
| The app must reconnect | Apps cache addresses. Quit and reopen the app after you capture or stop capturing. |

## If something goes wrong

| Message | What to do |
|---|---|
| **Couldn't update /etc/resolver:** followed by an error | macOS refused the change. Try again and enter your password. |
| **Capture listener on port 443:** or **port 80:** followed by an error | Another program uses that port. Quit it, then reopen Cloak Proxy. |
| **Capture resolver on port 53535:** followed by an error | Another program uses port 53535. Quit it, then reopen Cloak Proxy. |
| The app's requests still don't appear | Quit and reopen the app. Check that you captured the domains it actually uses. If the sidebar says **Captured, but N direct connections still skip Cloak Proxy**, click it: the sheet checks the domains the app is still connected to directly. |
| Requests appear but fail with a TLS handshake error | The app doesn't trust the Cloak Proxy certificate, or it pins certificates. See [Pinned apps](#pinned-apps). |

Problems are also written to `~/Library/Logs/CloakProxy/cloak-proxy.log`.

## Automate it

| Tool | What it does |
|---|---|
| MCP `bypassing_apps` | Lists apps with direct connections and apps already captured. |
| MCP `suggest_capture_domains` | Returns the recommended and other domains for an app, and `connectedDirectlyNow`: the domains it's connected to directly right now. |
| MCP `open_capture` | Opens the capture sheet in Cloak Proxy so you can confirm with your password. |
| `cloakctl bypass-scan [--port N]` | Prints apps connecting directly instead of through the proxy on that port (default `9090`). |

Capturing always needs your Mac password, so an AI assistant can prepare a capture but you confirm it in the app. See [MCP server](https://docs.subcloak.com/cloak-proxy/automation/mcp-server/) and [cloakctl](https://docs.subcloak.com/cloak-proxy/automation/cloakctl/).

## Related

  - [Capture an app that ignores the proxy](https://docs.subcloak.com/cloak-proxy/guides/capture-an-app-that-ignores-the-proxy/): A step-by-step guide with a real app.
  - [How it works](https://docs.subcloak.com/cloak-proxy/getting-started/how-it-works/): DNS capture and the background helper, explained.
  - [Network settings](https://docs.subcloak.com/cloak-proxy/capture/network-settings/): Reverse proxies for apps with no proxy support.
  - [SSL Proxying](https://docs.subcloak.com/cloak-proxy/capture/ssl-proxying/): Pinned apps and TLS handshake failures.
