Devices and runtimes
Capturing browser and Electron apps
Since 0.4.0 Requires Cloak Proxy 0.4.0 or later.
Open Chrome, Edge, Brave or Firefox in its own profile that already uses Cloak Proxy and trusts its certificate, and start Electron apps with capture.
A capturing browser is a Chrome, Chromium, Edge, Brave or Firefox window with its own profile, already pointed at Cloak Proxy and trusting its certificate. Your everyday browser profile, its extensions and sign-ins, and the Mac’s proxy settings don’t change. It’s the quickest way to capture a web app, including one running on localhost, without turning on macOS capture for every other app. Add the browser extension to see which tab, frame and script made each request.
It’s also the way to inspect a browser without breaking sign-ins: SSL Proxying for a whole browser decrypts everything it loads, which Google sign-in and Cloudflare-protected sites refuse (see Decrypting a browser).
Electron apps (chat clients, editors, your own desktop app) often ignore the macOS proxy. Cloak Proxy can start them with the flags and variables that send both their windows and their Node.js side through the proxy.
Capturing Browser in Device & Runtime Setup.
- Opens the browser with its capture profile
- How it trusts the certificate
- The page it opens
- Send localhost through the proxy too
- Capture browsers Cloak Proxy opened
Open a capturing browser
Section titled “Open a capturing browser”-
Choose Proxy › Open Capturing Browser and pick a browser. The first one in the list is ⇧ ⌘ B.
Or open Proxy › Device & Runtime Setup…, choose Capturing Browser in the sidebar and click Open next to a browser.
-
A new browser window opens. Use the site or web app you want to capture.
-
Its requests show in the traffic list under the browser’s name in the Apps sidebar. To read HTTPS, add the hosts to SSL Proxying as usual (right-click a request › Enable SSL Proxying).
You can also type Open Capturing in Search Everything (⇧ ⌘ A).
The browser window stays open when you close Cloak Proxy, but without the proxy its pages stop loading. Quit it from Open now on the Capturing Browser page, or quit it like any other app.
Which browsers
Section titled “Which browsers”Cloak Proxy looks in /Applications and ~/Applications for:
| Browser | Looks for |
|---|---|
| Google Chrome | Google Chrome.app |
| Chromium | Chromium.app |
| Microsoft Edge | Microsoft Edge.app |
| Brave | Brave Browser.app |
| Firefox | Firefox.app, Firefox Developer Edition.app or Firefox Nightly.app |
Safari can’t run with its own proxy settings, so it isn’t in the list. Capture Safari with macOS capture.
How the browser trusts the certificate
Section titled “How the browser trusts the certificate”Each row says how that browser trusts Cloak Proxy’s root certificate:
| What the row says | What it means |
|---|---|
| Trusts the Cloak Proxy certificate in this profile only | Chrome, Chromium, Edge and Brave. Cloak Proxy starts them with --ignore-certificate-errors-spki-list set to the hash of the certificate’s public key. The browser accepts certificates Cloak Proxy makes, in this profile only; the Mac doesn’t need to trust the certificate. |
| Trusts the certificate through the macOS keychain | Firefox, when this Mac trusts the certificate. The capture profile turns on security.enterprise_roots.enabled, so Firefox accepts what the keychain accepts. |
| The certificate is added to this profile’s own store | Firefox, when this Mac doesn’t trust the certificate but NSS’s certutil is installed (brew install nss). Cloak Proxy adds the certificate to the capture profile. |
| HTTPS shows warnings until this Mac trusts the certificate | Firefox with neither. Trust the certificate in Settings › Certificate, or install NSS. |
Chromium browsers show a bar saying an unsupported command-line flag is in use. That’s the trust flag; it only affects the capture profile.
Profiles
Section titled “Profiles”Each browser has one capture profile, kept between windows, so you stay signed in to the sites you test. It’s separate from your everyday profile: it starts with no extensions, bookmarks or saved passwords.
| On the Capturing Browser page | What it does |
|---|---|
| ⋯ › Copy Command | Copies the exact command Cloak Proxy runs, to start the browser yourself or in a script |
| ⋯ › Show Profile in Finder | Shows the capture profile’s folder |
| ⋯ › Clear Capture Profile… | Deletes the capture profile: its sign-ins, cookies, history and cache. Your everyday profile isn’t touched. Not available while that browser is open. |
Capture profiles are in ~/Library/Application Support/CloakProxy/Capture Browsers/, one folder per browser.
Options
Section titled “Options”| Option | What it does |
|---|---|
| Start page | The page the window opens, such as http://localhost:3000. A bare host gets https://, and localhost or 127.x gets http://. Empty opens a blank page. |
| Capture localhost and 127.0.0.1 | On by default. Browsers never send local addresses to a proxy unless told to; with this on they do, so you see requests to your local dev server. Turn it off to leave local requests out. |
| Start from a fresh profile each time | Each window gets an empty, throwaway profile, deleted when the browser quits. Use it to test a first visit, or to keep sessions apart. |
Launch an Electron app with capture
Section titled “Launch an Electron app with capture”Electron apps found in Applications.
-
Open Proxy › Device & Runtime Setup… and choose Electron Apps, or choose Proxy › Launch Electron App with Capture….
-
Click Launch with Capture next to the app. For an app that isn’t listed, click Choose App… and pick it.
-
If the app is running, the button says Relaunch with Capture. Cloak Proxy asks first, quits the app the way ⌘ Q does, then starts it again. Save your work in it first.
The app’s requests show under its name in the Apps sidebar.
Cloak Proxy lists an app when it contains Electron Framework. It starts it with:
--proxy-serverand--proxy-bypass-list=<-loopback>, for its windows (the Chromium side), including requests to localhost;--ignore-certificate-errors-spki-list, so its windows trust the certificate;HTTP_PROXY,HTTPS_PROXY,NODE_USE_ENV_PROXY=1andNODE_EXTRA_CA_CERTS, for its Node.js side.
Some apps only allow one copy and hand a second launch to the first. That’s why Cloak Proxy quits a running copy instead of starting a second one.
From MCP and the command line
Section titled “From MCP and the command line”AI assistants connected through MCP have two tools for this:
open_capture_browseropens a capturing browser (browser,url,capture_localhost,fresh_profile), lists the installed browsers (action: "list") or quits the ones Cloak Proxy opened (action: "close").launch_electronlists Electron apps (action: "list") or starts one with capture (app). It only quits a running app when you passrelaunch: true.
capture_setup with target: "firefox" or "electron" includes these as steps you can apply.
From Terminal, cloakctl does the same, with or without the app running:
cloakctl browser chrome --url http://localhost:3000cloakctl browser firefox --freshcloakctl browser --listcloakctl electron "Notes Studio" --relaunchcloakctl electron --listAdd --dry-run to print the command without starting anything. See cloakctl.
Limits
Section titled “Limits”- A capturing browser only sends its own traffic through Cloak Proxy. Other apps, and your everyday browser, aren’t captured unless macOS capture is on.
- HTTP/3 (QUIC) can’t go through an HTTP proxy, so the capture profiles turn it off. Browsers fall back to HTTP/2 or HTTP/1.1.
- Sites that pin certificates in the browser (rare outside some Google services) refuse decryption. Leave them out of SSL Proxying.
- Electron apps that pin certificates, or that run a separate helper with its own networking, may still need DNS capture.