# Capture an app that ignores the proxy

> Capture apps with their own network stack or pinned SDKs by answering their DNS lookups, using the Not using the proxy list and the capture sheet.

Source: https://docs.subcloak.com/cloak-proxy/guides/capture-an-app-that-ignores-the-proxy/

Some apps never show up in the traffic list even with the macOS proxy on. Apps with their own network stack (gRPC, Network.framework), Flutter apps, and apps with payment and security SDKs ignore the system proxy setting and connect straight to the internet. This guide finds those apps, captures them by answering the DNS lookups for their domains, and cleans up the resolver files afterwards.

> **From 0.5.0: capture the whole app:**
> (added in Cloak Proxy 0.5.0) With the Cloak Proxy download, [App Capture](https://docs.subcloak.com/cloak-proxy/capture/capture-apps-that-ignore-the-proxy/) captures every connection of an app you pick, with no domains to choose and no resolver files. It needs a network extension that you allow once in System Settings. This guide's DNS capture works in every build.

## What you need

| | |
|---|---|
| The macOS proxy on (**macOS traffic on** in the bottom bar) | Cloak Proxy detects direct connections only while the system proxy points at it |
| Your Mac password | Capturing adds a file per domain in `/etc/resolver`, which needs admin rights |
| An app you own or are authorized to test | You're redirecting its domains to your Mac |

> **Caution:**
> This points a domain's DNS at Cloak Proxy for **every app on this Mac** that uses it. Use it only for domains belonging to apps you own or are authorized to test, and stop capturing to remove the resolver files when you're done.

## Find the app

When the macOS proxy is on, Cloak Proxy watches for apps making direct connections and lists them under **Not using the proxy** in the sidebar.

*[Screenshot: The sidebar with Apps, a Not using the proxy group showing ShopApp with 21 direct connections, and Domains. The Not using the proxy group lists apps connecting straight to the internet.]*

1. Use the app so it opens its connections. Once Cloak Proxy has seen it connect directly in two of its checks (every 8 seconds, within 5 minutes of each other), it appears under **Not using the proxy** with a count of direct connections. Apps that call their servers only now and then can take a little longer.

2. Click the app to open the capture sheet.

> **Tip:**
> From the command line, `cloakctl bypass-scan` lists apps bypassing the proxy right now, which is handy for confirming before you capture.

## Capture it

The capture sheet suggests the app's own domains and lets you add more.

*[Screenshot: The capture sheet for an app, with a Use App Capture box, suggested domains to capture, an add field, and cautions about /etc/resolver and pinned certificates. The capture sheet: tick the domains to answer, then Capture.]*

1. Wait while the sheet shows **Finding the servers** _app_ **connects to…**. Cloak Proxy reads the app's code for server names and matches them against the servers the app is connected to.

2. Review the **Domains to capture**:

   - Domains labelled **connected directly now** come first and are ticked. The app is talking to them right now, around the proxy. (added in Cloak Proxy 0.2.1)
   - Domains that share a word with the app's name or bundle identifier come next, also ticked.
   - Other domains found in the app's code are listed unticked. These are often analytics or payment services.

3. Tick the domains the app actually uses. Add any it's missing in the **Add a domain** field (for example `api.example.com`).

4. Click **Capture**. macOS asks for your password to add a resolver file per domain, so lookups for those names (and their subdomains) go to Cloak Proxy.

5. Quit and reopen the app so it looks up its servers again. Its requests then appear in the traffic list.

> **Flutter apps:**
> Flutter apps ignore the macOS proxy because Dart's HTTP client doesn't read the system proxy settings. You don't need to change the app: Cloak Proxy also reads Flutter's compiled Dart code (and React Native's JavaScript bundle) for server names, so the sheet suggests the right domains.

## Catch the connections you missed

(added in Cloak Proxy 0.2.1)

An app can use more servers than you captured, for example a separate payments or uploads domain. When a captured app still connects directly to other servers, its sidebar row changes to **Captured, but N direct connections still skip Cloak Proxy**.

1. Click the row. The capture sheet opens and finds the servers the app is still connected to directly.

2. The domains for those connections are at the top, ticked and labelled **connected directly now**. Untick any you don't want.

3. Click **Update**, enter your password, then quit and reopen the app.

> **Note:**
> Captured domains are decrypted automatically — they were set up to be inspected, so you don't need a separate SSL Proxying rule for them.

## When the app pins its certificate

Some apps (and most payment SDKs) pin certificates and reject Cloak Proxy's. When that happens, Cloak Proxy passes the connection through untouched so the app keeps working, and still lists the connection. The capture sheet shows pinned hosts in orange, and a failed, pinned connection is noted in the traffic list.

> **Caution:**
> A pinned host can't be decrypted. You'll see that the app talks to it, but not the contents. This is expected and is not something to work around for an app you don't control.

## While Cloak Proxy is closed

Captured domains keep resolving even when the app isn't running: a small background helper (started at login) answers those lookups normally, so the captured app keeps working. It steps aside the moment Cloak Proxy is open again.

## Stop capturing and clean up

The resolver files stay on disk until you remove them, so clean up when you're done.

1. Click the app under **Not using the proxy** (now shown as **Captured**) to reopen the sheet.

2. Click **Stop Capturing**. macOS asks for your password to remove the resolver files for those domains.

3. Repeat for any other captured app. When no captures remain, the background helper is removed too.

> **Note:**
> If a resolver file was deleted by hand and the app's state looks out of step, reopen the capture sheet and re-apply, or stop capturing, to bring `/etc/resolver` back in line. See [Apps that ignore the proxy](https://docs.subcloak.com/cloak-proxy/capture/apps-that-ignore-the-proxy/) for the details.

## Related

  - [Apps that ignore the proxy](https://docs.subcloak.com/cloak-proxy/capture/apps-that-ignore-the-proxy/): The Not using the proxy list, DNS capture, pausing and limits.
  - [Network settings](https://docs.subcloak.com/cloak-proxy/capture/network-settings/): Reverse proxies, an alternative for apps that can't use a proxy.
  - [macOS traffic](https://docs.subcloak.com/cloak-proxy/capture/macos-traffic/): Turning capture on, the proxy guard and bypass list.
  - [cloakctl](https://docs.subcloak.com/cloak-proxy/automation/cloakctl/): bypass-scan and the other command-line tools.
