Capture traffic
Network settings
Change Cloak Proxy's port, let phones and other devices connect, and set up HTTP/2, an external proxy, SOCKS5, reverse proxies and body size limits.
These settings control how Cloak Proxy listens for traffic and how it sends traffic on. Most people only change them to debug a phone or another computer, to work behind a corporate proxy, or to capture a client that can’t use an HTTP proxy. They live on two pages: Settings › General and Settings › Network.
Settings at a glance
Section titled “Settings at a glance”| Setting | Page | Default | Applies |
|---|---|---|---|
| Port | General | 9090 |
After Apply & Restart Proxy |
| Allow other devices to connect | General | Off | After Apply & Restart Proxy |
| Offer HTTP/2 to apps on decrypted connections | General | On | At once, for new connections |
| Keep apps off HTTP/3 Since 0.5.1 | General | On | At once, for new responses |
| Max captured body size | General | 32 MB | At once, for new requests |
| External proxy | Network | Off | After Apply & Restart Proxy |
| SOCKS5 proxy | Network | Off, port 8889 |
After Apply & Restart Proxy |
| Reverse proxies | Network | None | After Apply & Restart Proxy |
| Allowed devices | Network | Empty (any device, when other devices may connect) | After Apply & Restart Proxy |
| Servers without certificate checks | Certificate | None | At once |
Capture macOS traffic when Cloak Proxy opens, also on the General page, is covered in Capture macOS traffic.
Change the port
Section titled “Change the port”Cloak Proxy listens on port 9090 by default. Change it if another program already uses that port, or if you run more than one proxy.
Settings › General.
- The port Cloak Proxy listens on
- Let phones and other computers connect
- Apply port and device changes
- Offer HTTP/2 to apps
- Keep apps off HTTP/3
- Largest body kept for inspection
-
Open Cloak Proxy › Settings… (⌘ ,) and click General.
-
Enter a port between 1 and 65535 in Port.
-
Click Apply & Restart Proxy.
Cloak Proxy restarts the proxy on the new port. If macOS capture is on, it turns the macOS proxy off and back on so it points at the new port. Update the port on any device, Terminal or tool you configured by hand.
If the port is taken, the status capsule in the toolbar turns red and reads Not listening. Hover it to see Couldn’t listen on port followed by the port and the reason, then choose another port.
Allow other devices to connect
Section titled “Allow other devices to connect”By default Cloak Proxy listens only on 127.0.0.1, so only this Mac can use it. To debug a phone, a tablet, another computer, or a Docker container, let other devices connect.
-
Open Settings › General and turn on Allow other devices to connect (phones, other computers).
The settings show This Mac’s address, for example
192.168.1.20:9090. Use it as the proxy on the other device. -
Click Apply & Restart Proxy.
The status capsule in the toolbar now shows your Mac’s network address, such as Listening on 192.168.1.20:9090: Cloak Proxy listens on every network interface.
The iPhone & iPad page of Device & Runtime Setup also has an Allow Other Devices to Connect button that does the same in one click. See Other devices and access control.
The SOCKS5 proxy and reverse proxies listen on the same interfaces as the main proxy, so they also accept other devices while this is on.
Accept only some devices
Section titled “Accept only some devices”The allowed devices list limits which addresses may connect while other devices are allowed. When it’s empty, any device on your network is accepted. This Mac is always allowed.
Settings › Network. Changes on this page take effect when you click Apply & Restart Proxy.
- Send outgoing traffic through another proxy
- Accept SOCKS5 clients
- Forward a local port to a server
- Accept only these device addresses
- Apply the changes and restart the proxy
-
Open Settings › Network.
-
Under Allowed devices, click Add Address.
A new entry appears, filled in with your Mac’s subnet, for example
192.168.1.*. -
Edit it to match one device (
192.168.1.42) or a range (192.168.1.*). Add more entries if you need them. -
Click Apply & Restart Proxy.
| Control | What it does |
|---|---|
| Switch | Turns the entry on or off. Entries that are off don’t count. |
| Address field | An IP address or a pattern. * matches any characters and ? one character, like host patterns. |
| Minus button | Deletes the entry. |
| Add Address | Adds an entry for your Mac’s subnet. |
Cloak Proxy closes connections from addresses that don’t match and records Refused a connection from the address : not in the allowed client list in ~/Library/Logs/CloakProxy/cloak-proxy.log.
Offer HTTP/2 to apps
Section titled “Offer HTTP/2 to apps”Offer HTTP/2 to apps on decrypted connections is on by default. On decrypted HTTPS connections, Cloak Proxy then offers HTTP/2 as well as HTTP/1.1, and apps that support it (Chrome, curl, URLSession) use HTTP/2 with Cloak Proxy. Each HTTP/2 stream appears as its own request. Apps that don’t support HTTP/2 keep using HTTP/1.1.
Turn it off if an app misbehaves through Cloak Proxy. New decrypted connections then use HTTP/1.1 only. The setting doesn’t affect how Cloak Proxy talks to servers.
Keep apps off HTTP/3
Section titled “Keep apps off HTTP/3”Servers offer HTTP/3 with an Alt-Svc response header (for example h3=":443"). HTTP/3 travels over QUIC on UDP, which no HTTP proxy carries, so an app that takes the offer moves its next connections around Cloak Proxy and its requests stop appearing in the list. Keep apps off HTTP/3 (on by default) removes Alt-Svc from the responses Cloak Proxy decrypts, so apps keep using HTTPS over TCP.
The inspector shows each response as the app got it, without Alt-Svc. The Doctor still notes which servers offered HTTP/3. Plain HTTP responses, tunnels that aren’t decrypted and traffic while recording is paused hands-off are left as they are. The setting is stripAltSvc in the MCP tool update_settings and the control API. On Linux it’s Settings › General › HTTP/3 › Keep apps off HTTP/3 in the web UI.
Apps can also learn of HTTP/3 from DNS (an HTTPS record) or remember an offer from before they went through Cloak Proxy. For those, capture the app’s domains or use App Capture, which block QUIC.
Limit the captured body size
Section titled “Limit the captured body size”Max captured body size sets the largest request or response body Cloak Proxy keeps for inspection. Choose 1 MB, 5 MB, 10 MB, 32 MB (the default), 64 MB or 128 MB.
Larger bodies are still forwarded in full: the app and the server always get the complete body. Cloak Proxy keeps only the first part for the inspector, exports and Insights. A smaller limit saves memory when you capture large downloads. The change applies to new requests.
Send traffic through another proxy
Section titled “Send traffic through another proxy”An external proxy (an upstream proxy) is a proxy that Cloak Proxy sends its own outgoing requests through: a corporate proxy that your network requires, or another debugging tool you want to chain with.
-
Open Settings › Network and turn on Send outgoing traffic through another proxy.
-
Choose the Type: HTTP/HTTPS or SOCKS5.
-
Enter the proxy’s Host and Port.
-
For an HTTP/HTTPS proxy that needs a login, enter Username (optional) and Password. From 0.4.2, a SOCKS5 proxy can take a login too.
-
From 0.4.2: under Don’t use it for, list hosts to reach directly, separated by commas. Wildcards work (
*.corp.example,10.*). Since 0.4.2 -
Click Apply & Restart Proxy.
| Field | Details |
|---|---|
| Type | HTTP/HTTPS for a regular web proxy, SOCKS5 for a SOCKS proxy. |
| Host | The proxy’s host name or IP address. The external proxy is only used when this is filled in. |
| Port | The proxy’s port. Defaults to 8080. |
| Username (optional) and Password | Sent to an HTTP/HTTPS proxy with Basic authentication (Proxy-Authorization). Not available for SOCKS5 up to 0.4.1; from 0.4.2, sent to a SOCKS5 proxy with username/password authentication (RFC 1929). Since 0.4.2 |
| Don’t use it for Since 0.4.2 | Hosts Cloak Proxy connects to directly instead of through the proxy. Defaults to localhost, 127.0.0.1, ::1, *.local: a proxy elsewhere can’t reach your own computer or local network. Wildcards work. |
The external proxy applies to requests Cloak Proxy reads and sends on: plain HTTP, decrypted HTTPS, and requests you repeat or compose. Encrypted tunnels that Cloak Proxy only relays, and WebSocket connections, connect to the server directly. If your network allows internet access only through the corporate proxy, turn on SSL Proxying for the hosts you need.
Since 0.4.2From 0.4.2, every connection Cloak Proxy opens goes through the external proxy: plain HTTP, decrypted HTTPS, requests you repeat or compose, encrypted tunnels it only relays (hosts outside SSL Proxying, sign-in pages and pinned hosts, and everything while recording is paused), and WebSocket connections. So a network that allows internet access only through its proxy keeps working whatever Cloak Proxy decrypts. Tunnels and WebSockets reach an HTTP/HTTPS proxy with CONNECT host:port, and a SOCKS5 proxy by name, so the proxy looks the host up (as socks5h:// does).
If the proxy refuses a connection, the request fails with its answer, for example The upstream proxy proxy.corp.example:3128 refused to connect to api.example.com:443: 407 Proxy Authentication Required, and the Doctor explains it.
Accept SOCKS5 clients
Section titled “Accept SOCKS5 clients”Some clients can use a SOCKS5 proxy but not an HTTP proxy. Cloak Proxy can listen for SOCKS5 too.
-
Open Settings › Network and turn on SOCKS5 proxy.
-
Change the Port if you like. The default is
8889. -
Click Apply & Restart Proxy.
-
Point the client at
127.0.0.1:8889.
Cloak Proxy handles SOCKS5 connections like HTTPS tunnels: TLS traffic is decrypted following your SSL Proxying rules, and plain HTTP is read and recorded. The SOCKS5 listener supports connections without authentication (CONNECT only).
Forward a local port with reverse proxies
Section titled “Forward a local port with reverse proxies”A reverse proxy is for clients that can’t use a proxy at all. You point the client at a local port, and Cloak Proxy forwards every request on that port to one fixed server and records the traffic.
-
Open Settings › Network and click Add Reverse Proxy under Reverse proxies.
A row appears with the port after the highest one in the list (
9000for the first one) and the targethttps://. -
Change the local port if you like, and enter the target, such as
https://api.example.com. -
Leave Rewrite Host checked unless the server expects
localhost. -
Click Apply & Restart Proxy.
-
Point the client at
http://localhost:9000instead ofhttps://api.example.com.
| Control | What it does |
|---|---|
| Switch | Turns the reverse proxy on or off. |
| localhost: and port | The local port the client connects to, over plain HTTP. |
| Target | Where requests go: an http:// or https:// URL with a host and optional port, such as https://api.example.com or http://staging.example.com:8080. |
| Rewrite Host | Sends the target’s host name (and port, if it isn’t the default) in the Host header instead of localhost. On by default. |
| Minus button | Deletes the reverse proxy. |
If a reverse proxy can’t start, the error appears at the bottom of Settings › Network in orange, and in an alert after the restart. For example, Reverse proxy on port 9000: followed by isn’t an http(s) URL when the target is invalid, or the reason the port can’t be used.
Skip certificate checks for some servers
Section titled “Skip certificate checks for some servers”When Cloak Proxy connects to a server, it checks the server’s certificate like any HTTPS client. Development and staging servers with self-signed certificates fail that check. Insecure upstream hosts are hosts whose certificates Cloak Proxy doesn’t check.
Add them in Settings › Certificate › Servers without certificate checks: type a host or a wildcard such as *.staging.example.com and click Add. The switch next to each host turns it off without removing it. The same list is the insecureUpstreamHosts key of the MCP tool update_settings and the control API. Requests to these hosts are labeled Insecure TLS in the traffic list’s Path column. Since 0.5.1 The list applies to WebSockets and gRPC calls to these hosts too. See MCP server and Control API.
Apply, revert and restart
Section titled “Apply, revert and restart”- On Settings › General, Apply & Restart Proxy applies the port and Allow other devices to connect. It’s dimmed until you change one of them. The other General settings apply at once.
- On Settings › Network, every change waits for Apply & Restart Proxy. Revert throws away changes you haven’t applied. Both are dimmed until you change something.
Restarting the proxy closes open connections, so apps reconnect.
The same settings are available to scripts and AI assistants through the MCP tools get_settings and update_settings. For a headless proxy, cloakctl run takes --port and --all-interfaces. See cloakctl.