fix(http): preserve TLS options for proxy tunnels#10957
Merged
Conversation
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 a Node HTTP adapter regression where custom
httpsAgentTLS options were not applied to the tunneled HTTPS origin after CONNECT proxy setup.Linked issue
Closes #10953
Changes
httpsAgent.optionsinto theHttpsProxyAgentcallback options used for the post-CONNECT TLS upgrade.httpsAgent.ca.Checklist
index.d.tsandindex.d.cts)Summary by cubic
Fixes a Node HTTP adapter regression that dropped
httpsAgentTLS options (e.g.,ca,rejectUnauthorized) when connecting to an HTTPS origin through a CONNECT proxy. Restores expected TLS behavior for tunneled requests.Description
httpsAgent.optionsintoHttpsProxyAgentconstructor and its callback so post-CONNECT TLS uses the same options.httpsAgent.ca.rejectUnauthorized, causing failures.Docs
/docs/explaining thathttpsAgentTLS options are honored for HTTPS origins behind HTTP CONNECT proxies, with an example showingproxy+httpsAgent(customca,rejectUnauthorized).Testing
httpsAgent.cato trust the origin and verify payload and plaintext is not leaked.Semantic version impact
Written for commit 1b359a8. Summary will update on new commits.
Review in cubic