# Security and privacy

> What Cloak Proxy stores on your Mac, what leaves it and when, how the root certificate, API token and MCP access are protected, and how to remove everything.

Source: https://docs.subcloak.com/cloak-proxy/reference/security-and-privacy/

A debugging proxy sees everything your apps send, including passwords, cookies and tokens, and anyone holding the private key of the certificate that lets it decrypt HTTPS could read that traffic too. This page explains what Cloak Proxy keeps, where, who can reach it, and how to turn everything off and remove it when you're done.

## Your traffic stays on your Mac

Cloak Proxy runs entirely on your Mac, and the app never needs an account. Your traffic never leaves your computer unless you send it somewhere. Without [Personal Cloud](https://docs.subcloak.com/cloak-proxy/cloud/overview/), the only things that contact Subcloak are the optional update check and, from 0.5.4, an update you choose to install. (added in Cloak Proxy 0.6.0) Personal Cloud is optional and off until you sign in: what it syncs and shares is end-to-end encrypted, and [its security page](https://docs.subcloak.com/cloak-proxy/cloud/security/) lists what Subcloak's servers can and can't see.

- **No telemetry.** Cloak Proxy doesn't send usage data, analytics, crash reports or captured traffic anywhere.
- **Without Personal Cloud, the update check is the only contact with Subcloak.** (added in Cloak Proxy 0.2.2) **Cloak Proxy › Check for Updates…**, or the optional daily check in **Settings › General › Updates**, asks `download.subcloak.com` for the latest version number. The daily check is off until you turn it on, on the Mac and, from 0.4.2, on Linux (Linux 0.4.1 and earlier check once a day unless you turn it off). The request has no cookies and nothing about you or your traffic; its `User-Agent` carries only the app's version (from 0.4.2, a fixed `CloakProxy`). Without a check, Cloak Proxy never contacts Subcloak. See [Check for updates](https://docs.subcloak.com/cloak-proxy/reference/settings/#check-for-updates).

  (added in Cloak Proxy 0.5.4) From 0.5.4 the Mac app reads a signed appcast instead (`/appcast/mac.xml`), with the same request: fixed `User-Agent`, no cookies, no system profile. When you choose **Install and Relaunch**, it also downloads the update from `download.subcloak.com`; that download isn't counted and carries nothing about you. Updates are installed only if they're signed with Subcloak's update key (EdDSA) and the app is signed by Subcloak's Developer ID (team `8JJX52F3NV`), over HTTPS.
- **Anonymous install counts, only if you turn them on.** (added in Cloak Proxy 0.4.2) From 0.4.2, with **Help count active installs (anonymous)** on (off by default), each update check also sends the app version and platform, for example `?v=0.4.2&p=mac-arm64`. The download server adds one to a count per day, version and platform, and keeps nothing else: no IP address, no ID, no `User-Agent`.
- **AI providers only when you use them.** Agent Mode and AI requests send data to the provider you chose, with your own key, straight from your Mac. From 0.4.2 they ask before the first time. (added in Cloak Proxy 0.4.2) See [AI providers](#ai-providers).
- **Captured traffic stays on your Mac.** Requests live in the app's memory, with large and older bodies in files on your Mac, until you clear the session. By default the traffic list is also kept when you quit (**Keep captured traffic when Cloak Proxy quits** in **Settings › General**), readable only by your account. Turn that off and quitting deletes it. Nothing is uploaded.
- **No sign-in for the app.** Nothing about you or your Mac is registered with Subcloak to use the app. Only Personal Cloud, if you choose it, has an account: your email, your computers' names (encrypted once a Mac is approved) and your plan.
- **The download form is separate.** Downloading from subcloak.com needs no sign-up. The download service counts each download by day, platform and where the visit came from, with no personal data. If you choose to leave your name and email, it stores them with the platform and your country so we can tell you about new releases. That happens on the website, once, before you have the app; the app itself never sends any of it. See the [Subcloak privacy policy](https://subcloak.com/privacy).

Cloak Proxy only connects to the internet to do what you asked:

| Connection | When |
|---|---|
| The servers your apps and devices talk to | While you're capturing: Cloak Proxy forwards their requests. |
| The servers your API-client requests go to | When you send, run, monitor or load test them. |
| Your chosen AI provider (Anthropic, OpenAI, Gemini or a compatible server) | When you use [Agent Mode](https://docs.subcloak.com/cloak-proxy/api-client/agent-mode/) or [AI requests](https://docs.subcloak.com/cloak-proxy/api-client/protocols/ai/), with your own key. Requests go straight from your Mac to the provider. From 0.4.2, only after you've allowed that provider once; see [AI providers](#ai-providers). |
| `download.subcloak.com` (added in Cloak Proxy 0.2.2) | When you choose **Check for Updates…**, or once a day if you turned on **Check for updates automatically**. It asks for the latest version only (from 0.5.4, the signed appcast with release notes); from 0.4.2 it adds the app version and platform if you turned on **Help count active installs (anonymous)**. From 0.5.4, also when you choose **Install and Relaunch**: the update's disk image. |
| `cloud.subcloak.com` (added in Cloak Proxy 0.6.0) | Only with [Personal Cloud](https://docs.subcloak.com/cloak-proxy/cloud/overview/): when you sign in, while your Macs sync (end-to-end encrypted), when you create, list or revoke a share link, and to check your plan. Never without signing in. |
| `subcloak.link` (added in Cloak Proxy 0.6.0) | When someone opens a [share link](https://docs.subcloak.com/cloak-proxy/cloud/share-links/) you sent. The page decrypts it in their browser. |
| Polar (`polar.sh`), in your browser | When you buy or manage Personal Cloud: checkout and the billing portal open in your browser, not in the app. |
| Cloudflare Turnstile (`challenges.cloudflare.com`) | Only if a Personal Cloud sign-in is asked to pass a quick check. |
| `api.github.com` | When you [publish to a Gist](https://docs.subcloak.com/cloak-proxy/sessions/publish-to-gist/). |
| jsDelivr | When you add an npm package to the API client's script packages. |
| Your Git remote | When you pull or push the API client workspace. |
| Public DNS servers `1.1.1.1` and `8.8.8.8` | As a fallback, to look up the real address of domains you [captured for apps that ignore the proxy](https://docs.subcloak.com/cloak-proxy/capture/apps-that-ignore-the-proxy/). |

## AI providers

Two features send data to an AI model provider themselves: [Agent Mode](https://docs.subcloak.com/cloak-proxy/api-client/agent-mode/) and [AI requests](https://docs.subcloak.com/cloak-proxy/api-client/protocols/ai/) in the API client (also when a collection run, monitor, load test or flow sends one). They use the provider and key you set, and requests go straight from your Mac to the provider, never through Subcloak.

| Feature | What's sent |
|---|---|
| Agent Mode | What you type and the conversation so far; the open request's name, method, URL and collection; what the agent reads with its tools: collection and environment names, variable names, and requests with their headers (including any tokens in them), bodies, auth settings, scripts and last responses; and responses to requests it runs for you. |
| AI request | The prompt and system prompt with variables filled in (so environment and vault values they use are included), the conversation so far in the request, and results from MCP servers attached to it. |

### Asking before the first send

(added in Cloak Proxy 0.4.2)

From 0.4.2, the first time one of them would send something to a provider, Cloak Proxy asks: it shows what's sent, the exact endpoint, and that it goes with your own API key. Up to 0.4.1 there's no question: the feature sends as soon as you use it.

- **Allow** is remembered for that provider at that address: Anthropic at `api.anthropic.com` is one, OpenAI behind your own gateway is another, and each OpenAI-compatible server is asked about by its address.
- **Cancel** stops the request with "Not sent: you didn't allow sending this to …", and isn't remembered: the next use asks again. Several requests waiting on the same provider (a collection run) share one question.
- **Servers on your Mac never ask.** Ollama or LM Studio on `localhost`, `127.0.0.1` or `::1` keep the data on your Mac. A server elsewhere on your network does ask.
- **Settings › Privacy** lists the providers you allowed, with the endpoint and date, and **Revoke** (or **Revoke All**) so the next use asks again. See [Settings › Privacy](https://docs.subcloak.com/cloak-proxy/reference/settings/#privacy).
- **`cloakctl` and the MCP server don't ask.** They run the collections and requests you or your assistant asked for, including AI requests in them. Connecting an AI assistant over MCP doesn't make Cloak Proxy call any provider: your assistant reads your traffic through its own model. See [AI assistants and MCP](#ai-assistants-and-mcp).

The answers are saved in `~/Library/Application Support/CloakProxy/ai-consent.json` on the Mac, and in `~/.config/cloakproxy/ai-consent.json` on Linux.

## Where your data is stored

| What | Where |
|---|---|
| Root certificate | `~/Library/Application Support/CloakProxy/cloak-proxy-ca.pem` |
| Root certificate's private key | `~/Library/Application Support/CloakProxy/cloak-proxy-ca-key.pem` |
| Local API token | `~/Library/Application Support/CloakProxy/api-token` (readable only by your user account) |
| API client workspace (default) | `~/Library/Application Support/CloakProxy/Workspace/`, or the folder you chose. Secret variable values are in its git-ignored `.cloak/` folder. |
| Settings and rules | Cloak Proxy's macOS preferences (domain `com.subcloak.cloakproxy`) |
| Vault secrets, including the AI provider key for Agent Mode | Your login keychain, as **CloakProxy Vault** items |
| AI providers you allowed (added in Cloak Proxy 0.4.2) | `~/Library/Application Support/CloakProxy/ai-consent.json`: provider, address, endpoint and date, no keys. **Settings › Privacy › Revoke** removes them. |
| GitHub token for Gists (if you chose to remember it) | Your login keychain, as `com.subcloak.cloakproxy.github` |
| Trusted root certificate | Your login keychain |
| Diagnostics log | `~/Library/Logs/CloakProxy/cloak-proxy.log`. It holds events such as start-up, macOS proxy changes and refused connections, not request contents. It's rotated at 10 MB, keeping three older files (`cloak-proxy.log.1` to `.3`). |
| Domains captured for apps that ignore the proxy | One file per domain in `/etc/resolver/`, and a LaunchAgent at `~/Library/LaunchAgents/com.subcloak.cloakproxy.dns-standby.plist` |
| Privacy Map's domains and test account per app (added in Cloak Proxy 0.2.1) | Cloak Proxy's macOS preferences on this Mac: the domains treated as each app's own (once you change them) and the test account email, phone and name you typed for it. See [Privacy Map](https://docs.subcloak.com/cloak-proxy/insights/privacy-map/#your-test-account). |
| Captured traffic: large and older bodies while you capture, and the traffic list when you quit (while **Keep captured traffic when Cloak Proxy quits** is on, the default) (added in Cloak Proxy 0.2.0) | `~/Library/Application Support/CloakProxy/Session/`, readable only by your user account. It holds full headers and bodies, with highlights and comments, unredacted. **Clear Session** deletes it, and so do turning the option off and quitting while it's off. See [Settings](https://docs.subcloak.com/cloak-proxy/reference/settings/#keep-traffic-between-launches). |
| Sessions, HAR files and exports | Wherever you save them. Session and HAR files include your highlights and comments. |
| TLS key log (if on) | `~/Desktop/cloak-proxy-sslkeys.log` by default |

## The root certificate and its private key

To show you HTTPS, Cloak Proxy acts as the server to your app, using a certificate it signs on the fly with its own root certificate. Your Mac (and any device you set up) trusts that root because you installed it.

- **Created on your Mac.** The first time Cloak Proxy starts, it generates a new root certificate and private key. Every installation has its own; no two Macs share one.
- **Never leaves your Mac.** Cloak Proxy never uploads the certificate or its key. You copy the certificate (not the key) to devices yourself.
- **Only what you choose is decrypted.** HTTPS is decrypted only for hosts and apps on your [SSL proxying](https://docs.subcloak.com/cloak-proxy/capture/ssl-proxying/) list. Everything else passes through encrypted.

> **Protect the private key:**
> Anyone who has `cloak-proxy-ca-key.pem` could impersonate any website to any device that trusts your certificate. Never share it, commit it to a repository, or copy it to another machine. If you think it was exposed, click **Regenerate Certificate…** in **Settings › Certificate**, then remove the old certificate from every device and install the new one.

When you no longer debug a device, remove the certificate from it: delete the iOS profile, remove the Android user certificate, or erase the simulator. See [Certificate](https://docs.subcloak.com/cloak-proxy/capture/certificate/).

*[Screenshot: Settings, Certificate page showing the certificate's name, file, trusted status, and buttons to re-install, remove, regenerate or replace it. Settings › Certificate. The footnote reminds you the key never leaves this Mac.]*

## Who can reach the proxy

By default Cloak Proxy listens only on `127.0.0.1`, so only programs on your Mac can use it.

- **Allow other devices to connect** (**Settings › General**) opens the proxy to your network. Anyone on it can then send traffic through your Mac and see your certificate page. Turn it on only when you're debugging a device, limit it with **Allowed devices** on **Settings › Network**, and turn it off afterwards.
- The **SOCKS5 proxy** and **Reverse proxies** follow the same setting: this Mac only, unless **Allow other devices to connect** is on. The listeners that capture apps which ignore the proxy accept connections from this Mac only.
- Devices whose proxy points at your Mac lose their internet connection when Cloak Proxy stops. Remove the proxy from them when you're done.

See [Other devices and access control](https://docs.subcloak.com/cloak-proxy/devices/other-devices-and-access-control/).

## The local API and its token

[`cloakctl`](https://docs.subcloak.com/cloak-proxy/automation/cloakctl/) and the [MCP server](https://docs.subcloak.com/cloak-proxy/automation/mcp-server/) control the app through a local [API](https://docs.subcloak.com/cloak-proxy/automation/control-api/) on the proxy's port. Two checks protect it:

1. **This Mac only.** The API answers only connections from `127.0.0.1` or `::1`. A phone or another computer gets `403`, even when other devices may use the proxy.
2. **A token.** Every request must send the token from `~/Library/Application Support/CloakProxy/api-token` in the `X-Cloak-Token` header. The file is created with permissions that let only your user account read it. Web pages can't read it, so a website can't use the API to read your traffic.

Any program running as your user can read the token. Treat it like a password: don't paste it into tickets, chats or shared scripts. To replace it, delete the file; a new token is made on the next request.

## AI assistants and MCP

The MCP server lets an AI assistant do anything you can do in the app.

- **Captured data reaches the assistant's model.** When the assistant reads a request, its headers and body become part of the conversation and are sent to your assistant's provider. That can include cookies, tokens and personal data.
- **The assistant is told to ask first** before deleting things or turning macOS capture off, and destructive tools are marked so your client can ask you to confirm. Keep approval prompts on for tools that change things.
- **Your password is still needed** to trust or remove the certificate and to capture apps that ignore the proxy. The assistant can only open the screen for you.
- **Limit what it sees.** (added in Cloak Proxy 0.5.1) You can limit what assistants see to one app, some hosts or the requests you highlight, with bodies or as metadata only, in **Settings › AI Assistants**; see [Limit what AI assistants can see](https://docs.subcloak.com/cloak-proxy/automation/assistant-scope/). The [AI Guard](https://docs.subcloak.com/cloak-proxy/security/ai-security/#ai-guard) can also stop keys and personal data leaving in prompts to a model provider.
- Remove the server from your assistant's settings when you no longer need it.

See [MCP server › Security](https://docs.subcloak.com/cloak-proxy/automation/mcp-server/#security).

The [Toxiproxy-compatible API](https://docs.subcloak.com/cloak-proxy/automation/toxiproxy/) (added in Cloak Proxy 0.4.0), off by default, listens on `127.0.0.1` without a token, like Toxiproxy, and refuses requests from web pages. `cloakctl mcp off` locks AI assistants out of the app.

## Sharing captures safely

Captured traffic contains credentials. Before anything leaves your Mac:

| Sharing | How to keep secrets out |
|---|---|
| Exported HAR, CSV, Postman, OpenAPI or session files | Turn on **Redact secrets: tokens, cookies, passwords, API keys and card numbers** in the export dialog. See [Export](https://docs.subcloak.com/cloak-proxy/sessions/export/). |
| GitHub Gists | **Redact secrets** is on by default, and gists are secret by default. A secret gist is still readable by anyone with the link. See [Publish to Gist](https://docs.subcloak.com/cloak-proxy/sessions/publish-to-gist/). |
| CI recordings | Use `cloakctl run --record … --redact`. See [Headless runs and CI](https://docs.subcloak.com/cloak-proxy/automation/headless-and-ci/). |
| Through the API or MCP | `export_session` takes `"redact": true`. |

Redaction replaces authorization and API key headers, cookies, credential parameters, password-like fields and anything the secret scanner recognizes with `REDACTED`. Review the file anyway: it can't know every app's secret fields. Session and HAR files also carry the comments you wrote on requests, which redaction doesn't change, so check them before you share. See [Redaction](https://docs.subcloak.com/cloak-proxy/sessions/redaction/) and [Secrets](https://docs.subcloak.com/cloak-proxy/insights/secrets/).

## Trace Value and Privacy Map

(added in Cloak Proxy 0.2.1)

[Trace Value](https://docs.subcloak.com/cloak-proxy/inspect/trace-value/), [Privacy Map](https://docs.subcloak.com/cloak-proxy/insights/privacy-map/) and the full-text [search](https://docs.subcloak.com/cloak-proxy/inspect/filtering/#search-every-request-and-response) run entirely on your Mac, over the traffic already in memory. They send nothing anywhere.

- **Privacy Map hides values.** Emails, phone numbers, names, locations, IDs and tokens are shown partly hidden in the window, the copied report and the `privacy_map` MCP tool, for example `a•••@example.net`.
- **Trace Value shows values in full.** The value you trace, and the URLs that carried it, appear as they are in the window and in **Copy Report**. Check a report before you share it.
- **Test account details stay in preferences.** The email, phone and name you type in Privacy Map are stored per app in Cloak Proxy's preferences on this Mac, not sent anywhere. Use a test account's details, and clear the fields when you're done.

## Decrypt only traffic you're allowed to see

Cloak Proxy is for debugging your own apps and devices.

- Decrypt traffic from your own apps and accounts, or with the owner's permission.
- Don't capture other people's traffic, for example by letting other people's devices use your proxy, without their knowledge and consent.
- Testing a system you don't own, including security testing, needs the owner's written permission. See [Pentest your own app](https://docs.subcloak.com/cloak-proxy/guides/pentest-your-own-app/).

## Things that change system settings

| Change | How it's undone |
|---|---|
| The macOS HTTP and HTTPS proxy | Restored to your previous settings when you turn capture off or quit. If the app is killed, the proxy guard restores them. See [Troubleshooting](https://docs.subcloak.com/cloak-proxy/reference/troubleshooting/#the-internet-stops-working). |
| The root certificate in your login keychain | **Settings › Certificate › Remove from Keychain**. |
| `/etc/resolver` files and the DNS standby LaunchAgent | **Stop Capturing** in the capture sheet for each app. |
| App Capture's network extension and its proxy configuration (added in Cloak Proxy 0.5.0) | **Remove Extension…** on the App Capture page. See [The network extension](#the-network-extension). |
| A `cloakctl` link in `/usr/local/bin` | `sudo rm /usr/local/bin/cloakctl` |

Each of these needs your password, or your explicit action, to set up.

## The network extension

(added in Cloak Proxy 0.5.0)

From 0.5.0, [App Capture](https://docs.subcloak.com/cloak-proxy/capture/capture-apps-that-ignore-the-proxy/) installs a system extension, `com.subcloak.cloakproxy.transparent-proxy`, only when you click **Install Extension…** and allow it in System Settings. macOS runs it with system privileges. It looks only at which app opened each connection, and touches only the connections of the apps you picked: it sends those to Cloak Proxy on `127.0.0.1` and nowhere else. Cloak Proxy gives it a random secret each time it starts, and believes a connection's claim about which app it came from only with that secret, so another program on the Mac can't pass its traffic off as a different app's. The secret is never written to disk. While Cloak Proxy isn't running, the extension captures nothing. **Remove Extension…** removes it.

## Remove everything

To remove Cloak Proxy and everything it created:

1. In Cloak Proxy, turn off macOS capture (<kbd>⇧</kbd> <kbd>⌘</kbd> <kbd>P</kbd>). If you installed App Capture's network extension, click **Remove Extension…** on its page (**Proxy › Device & Runtime Setup… › App Capture**). (added in Cloak Proxy 0.5.0)

2. For each app under capture, open its capture sheet and click **Stop Capturing**. This removes the `/etc/resolver` files and, after the last one, the DNS standby LaunchAgent.

3. In **Settings › Certificate**, click **Remove from Keychain**.

4. Quit Cloak Proxy and drag it from **Applications** to the Trash.

5. Remove its files. This deletes the certificate, its key, the API token, any traffic kept between launches, the default API client workspace, the log and the settings:

   ```bash title="Terminal"
   rm -rf ~/Library/Application\ Support/CloakProxy
   rm -rf ~/Library/Logs/CloakProxy
   defaults delete com.subcloak.cloakproxy
   sudo rm -f /usr/local/bin/cloakctl
   ```

   If you kept your API client workspace in another folder, it stays where it is.

6. In **Keychain Access**, search for `Cloak Proxy` and `CloakProxy` and delete any remaining items: certificates, **CloakProxy Vault** secrets and the `com.subcloak.cloakproxy.github` token.

7. On each phone, tablet and simulator you set up, remove the certificate and the proxy.

8. Delete any TLS key log, HAR files and sessions you saved.

See also [Install › Uninstall](https://docs.subcloak.com/cloak-proxy/getting-started/install/).

## Related

  - [Certificate](https://docs.subcloak.com/cloak-proxy/capture/certificate/): Install, remove, regenerate or replace the root certificate.
  - [Redaction](https://docs.subcloak.com/cloak-proxy/sessions/redaction/): What redaction removes before you share.
  - [Control API](https://docs.subcloak.com/cloak-proxy/automation/control-api/): The local API, its token and who it answers.
  - [MCP server](https://docs.subcloak.com/cloak-proxy/automation/mcp-server/): Connect AI assistants safely.
