feat(npm): installer honors HTTPS_PROXY via CONNECT tunnel (v1.11.1) - #30
Merged
Merged
Conversation
npm postinstall downloads release binaries from GitHub with raw node https, which ignores proxy environment variables. On machines that can only reach GitHub through an HTTP proxy (corporate egress, Clash mixed port), `npm i -g` failed with ETIMEDOUT during postinstall. - requestBuffer now resolves HTTPS_PROXY/https_proxy/ALL_PROXY with NO_PROXY exclusions and tunnels https downloads through the proxy with an HTTP CONNECT handshake before starting TLS. - Pure helpers (proxyForUrl, buildConnectRequest) plus a local fake proxy rejecting CONNECT are covered by install.test.js. - Version bump 1.11.1 (Cargo.toml, npm/package.json, Cargo.lock); no Rust behavior changes. Co-authored-by: Cursor <cursor@vectorcontrol.tech>
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.
Summary
npm i -g @delicious233/codex-browser-bridgepostinstall failures on machines that reach GitHub only through an HTTP proxy (observed:connect ETIMEDOUT 20.205.243.166:443on a Clash-based setup).install.jsnow resolvesHTTPS_PROXY/https_proxy/ALL_PROXYwithNO_PROXYexclusions and tunnels https downloads through the proxy with an HTTP CONNECT handshake before TLS. Direct connections are unchanged when no proxy is configured.Verification
npm --prefix npm test— pass, incl. new proxy unit tests + a local fake-proxy CONNECT-rejection testcargo test --locked— 99 pass;scripts/check-{agent-surface,actions-pinned,release-contract}.js— okTest plan
v1.11.1→ release workflownpm i -g @delicious233/codex-browser-bridge@latestsucceeds on the proxy-only machine (the original repro)