Skip to content

Capture traffic

Capture macOS traffic

Point your Mac's proxy settings at Cloak Proxy to capture apps and browsers, turn it on automatically at launch, restore settings on quit, and exclude hosts.

Capturing macOS traffic points your Mac’s system proxy settings at Cloak Proxy, so Safari, Chrome and most Mac apps send their requests through it without any setup. Cloak Proxy saves your previous settings first and puts them back when you turn capture off or quit.

Use any of these. Each one switches between on and off.

Where Control
Keyboard ⇧ ⌘ P
Menu bar Proxy › Capture macOS Traffic / Stop Capturing macOS Traffic
Toolbar macOS Proxy
Status bar macOS traffic: Off. Click to capture / macOS traffic: On
Empty traffic list Capture macOS Traffic
Device & Runtime Setup This Mac › Capture macOS Traffic
Search Everything (⇧ ⌘ A) Capture macOS Traffic / Stop Capturing macOS Traffic

While the change is applied, the status bar reads Updating macOS proxy…. When capture is on, the toolbar pill turns green and reads Capturing, and the status bar shows macOS traffic: On.

Device & Runtime Setup › This Mac: macOS capture for apps and browsers, and a configured Terminal for command-line tools.

  1. Capture macOS Traffic turns on the system proxy
  2. Command-line tools need a configured Terminal instead
The This Mac tab of Device & Runtime Setup, with an Apps and browsers section containing a Capture macOS Traffic button, and a Terminal section with Open Configured Terminal and Copy export Commands buttons

When you turn capture on, Cloak Proxy does this for every enabled network service (Wi-Fi, Ethernet, Thunderbolt Bridge and so on):

Setting in System Settings › Network › Details… › Proxies Set to
Web proxy (HTTP) On, 127.0.0.1, Cloak Proxy’s port (9090 by default)
Secure web proxy (HTTPS) On, 127.0.0.1, Cloak Proxy’s port
Bypass proxy settings for these hosts & domains Your enabled bypass list entries

Other proxy settings, such as SOCKS or automatic proxy configuration, aren’t touched.

Before it changes anything, Cloak Proxy saves a snapshot of each service’s HTTP proxy, HTTPS proxy and bypass list. If you turn capture on again while a snapshot is still saved, it keeps the original snapshot, so your real settings are never overwritten with Cloak Proxy’s own.

Cloak Proxy restores the snapshot when you:

  • turn macOS capture off,
  • quit Cloak Proxy with ⌘ Q or Cloak Proxy › Quit Cloak Proxy,
  • change the port or Allow other devices to connect and click Apply & Restart Proxy (it turns the proxy off, restarts, and turns it back on with the new settings).

Services that had no proxy before get their HTTP and HTTPS proxies turned off. Services that pointed at another proxy, such as a corporate proxy, point at it again.

Closing the main window doesn’t stop capture. Cloak Proxy keeps running, and you bring the window back from the Dock.

Settings › General › Capture macOS traffic when Cloak Proxy opens is on by default. Cloak Proxy then turns on macOS capture every time it starts, as long as the proxy is listening. Turn the switch off if you’d rather start capture yourself, for example when you only debug devices or a configured Terminal.

Settings › General.

  1. Capture macOS traffic when Cloak Proxy opens
Settings › General with the Listening section (Port 9090, Allow other devices to connect, Apply & Restart Proxy), the macOS traffic section with Capture macOS traffic when Cloak Proxy opens turned on, HTTP/2 and Capture sections

The proxy guard restores settings after a crash

Section titled “The proxy guard restores settings after a crash”

While macOS capture is on, apps that follow the system proxy can only reach the internet through Cloak Proxy. If Cloak Proxy stopped without restoring your settings, they’d be cut off. Cloak Proxy prevents that:

Situation What happens
You quit normally Cloak Proxy restores the snapshot before it exits. macOS can’t end it silently while capture is on: Cloak Proxy opts out of automatic termination.
The process gets SIGTERM, SIGINT or SIGHUP (kill, Ctrl C in a terminal, closing that terminal) Cloak Proxy restores the snapshot, then exits.
You force quit Cloak Proxy, or it crashes The proxy guard restores the snapshot.
You reopen Cloak Proxy while the settings still point at it Cloak Proxy keeps the saved snapshot and restores it when you next stop capture or quit.

The proxy guard is a small helper, cloakctl proxy-guard, that Cloak Proxy starts the first time it turns on macOS capture. It runs in its own session, so it outlives the app. When Cloak Proxy’s process ends, the guard waits two seconds, then restores your saved settings only if the macOS proxy still points at Cloak Proxy’s port and nothing is listening there. If you changed the port in Settings, it checks the new one. If no snapshot was saved, it turns the HTTP and HTTPS proxies off. It writes what it did to ~/Library/Logs/CloakProxy/cloak-proxy.log.

Follows the macOS proxy Doesn’t
Safari, Chrome and other browsers that use system settings Most command-line tools, such as curl, Node.js, Python, Ruby and Go programs. Use a configured Terminal.
Most Mac apps that use Apple’s networking (URLSession) Java programs, Dart and Flutter apps, and some Electron apps. See Java, Firefox, Docker, Flutter and Electron.
Apps with their own network stack (gRPC, Network.framework) and some payment and security SDKs. See Apps that ignore the proxy.
Phones, simulators and other computers. See Devices.

For apps with no proxy support at all, a reverse proxy can also work.

The bypass list names hosts that skip Cloak Proxy entirely while macOS capture is on. Requests to them go straight to the network and never appear in the list. Use it for hosts you never want to touch, such as an internal service that breaks behind a proxy.

Settings › Bypass, with the three default entries.

  1. Turn an entry on or off without deleting it
  2. Click a host to edit it
  3. Type a host and press Return or click Add
Settings › Bypass with a table of hosts, each with an On checkbox: localhost, *.local and 169.254/16, and a field with the placeholder *.internal.company.com plus Add and Remove buttons
  1. Open Cloak Proxy › Settings… (⌘ ,) and click Bypass.

  2. Type a host in the field at the bottom, such as *.internal.example.com, and press Return or click Add.

  3. Turn macOS capture off and on again (⇧ ⌘ P twice). Bypass changes apply the next time you turn the macOS proxy on.

Control What it does
On Includes the entry. Entries that are off aren’t sent to macOS.
Host The host or pattern. Click it to edit.
Add Adds what you typed in the field.
Remove Removes the selected entry.

The defaults are localhost, *.local (Bonjour and local network names) and 169.254/16 (link-local addresses). Cloak Proxy writes the entries to macOS exactly as you type them, and macOS decides what matches. macOS accepts host names, wildcards like *.example.com, and IP ranges like 169.254/16.

Message or symptom Cause and fix
Cloak Proxy set the macOS proxy, but macOS doesn’t report it as active. A VPN or a configuration profile may be overriding proxy settings. A VPN client or a device-management profile controls the proxy settings. Disconnect the VPN or ask your administrator. The log file named in the message has details.
Could not change the system proxy: followed by an error macOS refused the change, or you cancelled the password prompt. Try again and enter your password.
The macOS Proxy button and status bar control are dimmed The proxy isn’t listening. Hover the red Not listening pill for the reason, and change the port if it’s in use.
Capture is on but an app’s requests don’t appear The app ignores the macOS proxy. Check Not Using the Proxy in the sidebar.

You can also turn capture on and off from the command line or an AI assistant with the MCP tool set_macos_proxy. See MCP server.