Repository navigation
fix(server): CLIProxyAPI updates work behind TLS-inspecting proxies - #121
Merged
Merged
Conversation
Node trusts only its bundled roots, so on networks whose gateway re-signs GitHub's asset host the update download failed with "unable to get local issuer certificate", surfaced as "Could not install the verified CLIProxyAPI update." The server now adds OS-store roots at startup. Co-Authored-By: Claude Opus 5.5 <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.
Problem
On K3XJYYYX7H, updating the inference host failed with
InferenceProxyError: Could not install the verified CLIProxyAPI update.That network's gateway (SealSuite SWG) re-signsrelease-assets.githubusercontent.com, whichapi.github.comredirects asset downloads to. curl and browsers trust the gateway's root through the macOS keychain. Node trusts only its bundled roots, so the download failed during the TLS handshake:safeFailurereplaced that cause with the generic message.Fix
At startup,
runClinow callstrustSystemCertificates(). It adds the OS-store roots to Node's default CA list without removing any existing root. Because it changes process-wide trust, every outbound HTTPS call behind such proxies now works, not only this download. Safeguards:--use-openssl-ca), so those roots aren't lost.NODE_EXTRA_CA_CERTSroots stay in the default list. The desktop shell's later CA refresh inDesktopTelemetryReceiverkeeps the system roots, because it captures them as part of its base list.The cost is about 60ms once, on the full server path. That is the same cost
--use-system-capays on its first TLS connection. The per-call fast paths inbinMain.ts, such asacp-mcp-call, don't run it.Verification
outboundHttp.test.tscover merge and dedupe, non-enumerable trust, and an unreadable OS store.vp run check:changedpasses.Done by Claude Opus 5.5 in Claude Code (T3 Code).
🤖 Generated with Claude Code