Repository navigation
Add --ca-cert / PROOFLINE_CA_CERT to trust an extra PEM root - #61
Merged
Merged
Conversation
Behind a TLS-inspecting corporate proxy every request failed with "error sending request", because the CLI trusts only its bundled public roots and the proxy re-signs connections with a private root. The new global --ca-cert FILE (or PROOFLINE_CA_CERT) reads a PEM bundle and adds its certificates to the bundled roots of every client the process builds, the API client and the self-updater. Verification stays on: the file adds roots, it never replaces them or disables checks. A missing, unreadable or certificate-free file is refused before any request.
gcassata74
force-pushed
the
feat/ca-cert
branch
from
November 10, 2026 18:26
bce4088 to
5bf8390
Compare
mohsen1
approved these changes
Nov 17, 2026
mohsen1
left a comment
Member
There was a problem hiding this comment.
Codex
Reconciled with the current HTTP client: custom CAs extend the shared builder after native and Linux bundled roots, preserving verification. Both required jobs passed on this head, including PEM regressions.
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
Behind a TLS-inspecting proxy (Zscaler, Netskope, Palo Alto, mitmproxy, …) every command fails:
The CLI trusts only its bundled public roots, and the proxy re-signs the connection with a private corporate root.
SSL_CERT_FILEhas no effect, so there is currently no way to use the CLI on such networks.Change
A global
--ca-cert FILEoption, also read fromPROOFLINE_CA_CERT:Http::new) and the self-updater;Same pattern as
curl --cacert,NODE_EXTRA_CA_CERTSandREQUESTS_CA_BUNDLE.Testing
cargo fmt --check,cargo clippy --locked --all-targets -- -D warnings,cargo test --locked: all pass.src/tls.rs(valid PEM, client builds with the root, missing file, file without certificates), using a test root intests/fixtures/ca-cert.pem.mitmdumpwith a placeholder token:--ca-certerror sending request(mitmproxy:unknown ca)--ca-cert ~/.mitmproxy/mitmproxy-ca-cert.pemHTTP 401from proofline.sh: TLS through the proxy succeedsPROOFLINE_CA_CERT=…HTTP 401--ca-cert …HTTP 401: bundled roots still trustedNotes
PROOFLINE_CA_CERT, not the flag.