Repository navigation
Conversation
…ersion notes - add a client-trust section: one NODE_EXTRA_CA_CERTS file holding our CA plus the corporate root, and a generic ca-trust.pem builder; say that nothing in cache-fix builds ca-trust.pem - mark the ca-trust.d section as needing 4.4.0-beta.0 or newer - replace the reverse-mode 'Manual (any platform)' snippet with the forward-mode shell function and a CLAUDE_CODE_PROCESS_WRAPPER launcher - default port 9801 in the downloads.claude.ai probe; drop a machine reference from the salvage measurement Co-Authored-By: Claude <noreply@anthropic.com>
…ram that keeps Claude Code's children off the forward proxy In forward-proxy mode the Bash tool, command hooks, stdio MCP servers and the status line inherit HTTPS_PROXY and its siblings. bin/shell-prefix.sh unsets the six proxy variables for them, leaves NO_PROXY alone, and can chain a previous prefix through CACHE_FIX_PREV_SHELL_PREFIX. Nothing sets the variable for the user; the README says how. Co-Authored-By: Claude <noreply@anthropic.com>
…es, settings env for the process wrapper; test: BASH_ENV twin of the .zshenv case Co-Authored-By: Claude <noreply@anthropic.com>
…for the six proxy variables, awk && mv, rc-export limit for the shell prefix, NO_PROXY in the settings env block Co-Authored-By: Claude <noreply@anthropic.com>
… cache-fix and not nothing; cache-fix-proxy writes it to cache-fix-state/upstream-<port> Co-Authored-By: Claude <noreply@anthropic.com>
…d a predecessor's is removed; README to match Co-Authored-By: Claude <noreply@anthropic.com>
…test spawns, HTTP_PROXY-only hop published, upstream exported quoted, https_proxy fallback Co-Authored-By: Claude <noreply@anthropic.com>
…ouched; the proxy always writes its sidecar, an empty line when it dials direct Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Docs fixes for forward-proxy mode, plus one opt-in helper script. Nothing changes for a user who does not opt in. There are no changes to
proxy/, to the launcher, toinstall-serviceor to any default.README
Client trust behind a TLS-inspecting proxy. A forward-mode client trusts the one file
NODE_EXTRA_CA_CERTSnames. A 2-lineawk 1 … && mvbuilder puts cache-fix'sca.pemand the corporate root into that file. It is safe when a file lacks a trailing newline, and a mistyped path leaves the old bundle in place. The README now says plainly that nothing in cache-fix buildsca-trust.pem, and it gives a builder for that file too.Which release has what.
npm install -ggives 4.3.0. Theca-trust.dsection needs 4.4.0-beta.0 (@next).Client wiring. The bash-only reverse-mode "Manual" section is replaced. In its place: a forward-mode
claude()function for bash or zsh, and a shortCLAUDE_CODE_PROCESS_WRAPPERlauncher. Both setNO_PROXY/no_proxyfor localhost services and keep the user's own entries; 4.3.0's--remote-controldoes not merge them. A note explains that a settings.jsonenvblock wins over both.Fixes. The example port is now the default 9801, and a machine-specific phrase is removed.
Keeping other programs off the proxy. In forward mode, everything Claude Code starts inherits the proxy variables. The new opt-in
cache-fix-shell-prefixis aCLAUDE_CODE_SHELL_PREFIXprogram, so Bash-tool commands, command hooks, stdio MCP servers and the status line run without the six proxy variables.NO_PROXYis left alone, and Claude Code's own traffic keeps the proxy. The section covers:CACHE_FIX_PREV_SHELL_PREFIX);It replaces the earlier claim that these children were harmless because they are blind-tunnelled.
Using cswap-pin and cache-fix together. A short block on running both.
bin/shell-prefix.sh(cache-fix-shell-prefix)A 17-line POSIX sh script. It tells the child kinds apart only by variables Claude Code sets for each kind (
CLAUDE_PROJECT_DIR,CLAUDE_PID,SHELL), and it never parses the command string:/bin/sh, as they do without a prefix.Measured on Claude Code 2.1.296 (bash and zsh, Linux) for each of those child kinds:
claude -pstarted from Bash still goes through the proxy.Tests
test/shell-prefix.test.mjshas 16 cases. They cover:.zshenvorBASH_ENVthat re-exports the proxy;Nine mutations of the script each fail at least one case. The full suite passes.