You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(launcher): exclude localhost from proxy in --remote-control (cnighswonger#257)
--remote-control set HTTPS_PROXY but no NO_PROXY, routing every client connection
(including to local HTTP/SSE-transport MCP servers on 127.0.0.1) at the cache-fix
proxy, which 404s anything but api.anthropic.com. stdio-transport MCPs were
unaffected. Fix: add 127.0.0.1,localhost,::1 to NO_PROXY/no_proxy in forward mode,
merging into any existing value. Reviewed by Codex (APPROVED).
Fixes a v4.3.0 --remote-control regression.
Copy file name to clipboardExpand all lines: README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,9 @@ Or let the launcher do both steps for you with `--remote-control`:
54
54
cache-fix-proxy --remote-control
55
55
```
56
56
57
-
The `--remote-control` flag is the one-command equivalent of the manual wiring above: it starts the proxy in forward-proxy mode, waits for the CA, and launches `claude` pointed at `HTTPS_PROXY` with `NODE_EXTRA_CA_CERTS` set. Without the flag the launcher stays in reverse-proxy mode (sets `ANTHROPIC_BASE_URL`), unchanged. Two things worth knowing: Remote Control does a trusted-device enrollment on first connect that can need a few `/remote-control` retries (a Claude Code step that runs upstream, not a proxy failure); and enabling RC on an already-warm session costs a **single** prompt-cache rebuild (RC adds an `anthropic-beta` the cache keys on), so if you want RC, launching with `--remote-control` from the start avoids that one-time flip. `cache-fix-proxy --help` documents both.
57
+
The `--remote-control` flag is the one-command equivalent of the manual wiring above: it starts the proxy in forward-proxy mode, waits for the CA, and launches `claude` pointed at `HTTPS_PROXY` with `NODE_EXTRA_CA_CERTS` set (and adds `127.0.0.1,localhost,::1` to `NO_PROXY` so local services — e.g. HTTP/SSE-transport MCP servers on localhost — bypass the proxy rather than being routed at it; any existing `NO_PROXY` is preserved). Without the flag the launcher stays in reverse-proxy mode (sets `ANTHROPIC_BASE_URL`), unchanged. Two things worth knowing: Remote Control does a trusted-device enrollment on first connect that can need a few `/remote-control` retries (a Claude Code step that runs upstream, not a proxy failure); and enabling RC on an already-warm session costs a **single** prompt-cache rebuild (RC adds an `anthropic-beta` the cache keys on), so if you want RC, launching with `--remote-control` from the start avoids that one-time flip. `cache-fix-proxy --help` documents both.
58
+
59
+
> If you wire forward-proxy mode manually (setting `HTTPS_PROXY` yourself instead of using `--remote-control`), set `NO_PROXY=127.0.0.1,localhost,::1` as well, or local HTTP-transport MCP servers and other localhost services will be routed at the cache-fix proxy and fail. stdio-transport MCP servers are unaffected (they use pipes, not the network).
58
60
59
61
How it works: the proxy also handles HTTP `CONNECT`. It MITMs **only** the upstream host (`api.anthropic.com`), terminating TLS with a locally-generated CA so it can run the same extension pipeline, and **blind-tunnels every other CONNECT** (mcp-proxy, telemetry, npm, ...) untouched. On first start it generates a CA under `$CLAUDE_CONFIG_DIR/cache-fix-ca/` (default `~/.claude/cache-fix-ca/`; override with `CACHE_FIX_CA_DIR`); the client must trust it via `NODE_EXTRA_CA_CERTS`. A WebSocket/Upgrade to the upstream host (e.g. `/voice`) is relayed to upstream as-is. Because base URL stays `api.anthropic.com`, all of `/api/oauth/*`, `/v1/agents`, Remote Control credential fetches, etc. pass through untouched and RC stays enabled.
0 commit comments