fix: https data in cleartext to proxy#10858
Merged
Merged
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Member
Author
|
@cubic-dev-ai please review in depth! |
Contributor
@jasonsaayman I have started the AI code review. It will take a few minutes to complete. |
This was referenced May 15, 2026
9 tasks
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
Fixes HTTPS proxy handling so axios uses CONNECT tunnelling for HTTPS targets instead of forwarding request URLs, headers, and bodies to the proxy in plaintext.
Linked issue
Fixes #6320
Changes
https-proxy-agentand uses it in the Node HTTP adapter for automatic HTTPS CONNECT tunnelling through proxies.httpsAgentopt-out behaviour.Checklist
index.d.tsandindex.d.cts)Summary by cubic
Routes all
https://requests through CONNECT tunneling usinghttps-proxy-agentso URLs, headers, and bodies never reach the proxy; keepshttp://in forward-proxy mode. Addshttps-proxy-agentas a runtime dep and fixes #6320.Description
HttpsProxyAgentto CONNECT-tunnel HTTPS targets;Proxy-Authorizationis sent on CONNECT only.Proxy-Authorizationon the forwarded request; preserves a userHost.proxy-from-envandNO_PROXY; works with HTTP/HTTPS proxies and IPv6 proxy hosts.HttpsProxyAgent; if a plainhttpsAgentis provided, we still tunnel and forward its TLS options (CA, client certs,rejectUnauthorized) to the tunnel.httpsAgentinto redirect proxy setup; sets bothoptions.agentandoptions.agents.https; forcesALPNProtocols=['http/1.1']for HTTPS proxies.AxiosError.https-proxy-agentas a runtime dependency and internalizes it in the Node build.Docs
Please update
/docs/to cover:Proxy-Authorizationis on CONNECT only for HTTPS; never forwarded to origins.Hostheader is only relevant in forward-proxy mode (HTTP).HttpsProxyAgent; a plainhttpsAgentwill not disable tunneling.https-proxy-agentas a runtime dependency.Testing
tests/unit/adapters/http.test.js:Proxy-Authorizationonly on CONNECT; never reaches origin.AxiosError.httpsAgentTLS options, respect a userHttpsProxyAgent, clear axios-installed tunnels on redirects, handle IPv6 proxy hosts.Semantic version impact
Patch: fixes HTTPS proxy behavior without changing the public API.
Written for commit 3a176fb. Summary will update on new commits.