Skip to content

[http-proxy-agent] Set default SNI for HTTPS proxy servers - #440

Open
0xZoomEye wants to merge 2 commits into
TooTallNate:mainfrom
0xZoomEye:fix/http-proxy-agent-sni
Open

[http-proxy-agent] Set default SNI for HTTPS proxy servers#440
0xZoomEye wants to merge 2 commits into
TooTallNate:mainfrom
0xZoomEye:fix/http-proxy-agent-sni

Conversation

@0xZoomEye

Copy link
Copy Markdown

When HttpProxyAgent connects to an HTTPS proxy, it calls
tls.connect() with host and port but without servername.

Node.js does not enable SNI automatically for tls.connect(),
so virtual-hosted HTTPS proxies may return their default
certificate and fail certificate validation.

This change defaults servername to the proxy hostname when
the hostname is not an IP address, matching the existing
behavior in https-proxy-agent.

@changeset-bot

changeset-bot Bot commented Jul 24, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 533132f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
http-proxy-agent Patch
pac-proxy-agent Patch
proxy-agent Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant