Repository navigation
Verify HTTPS CONNECT proxies like the target - #988
Merged
Merged
Conversation
The proxy leg of a CONNECT tunnel was opened with SNI only. On OTP 27+ that fails to connect without cacerts, and hackney's CA bundle and hostname check never applied. Build the options with hackney_ssl, as the target leg does; an explicit verify_none is kept as given.
benoitc
force-pushed
the
fix/connect-proxy-tls-verify
branch
from
October 25, 2026 20:55
05e92bd to
6823f5c
Compare
Merged
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.
When hackney tunnels through an HTTPS proxy with CONNECT (
proxy_transport = ssl), the TLS connection to the proxy carried only the server name. On OTP 27 and laterssl:connectrefusesverify_peerwithout CA certificates, so this setup failed unlessproxy_ssl_optionssuppliedcacertsorverify_none; hackney's CA bundle and hostname check were never applied to the proxy. The plain HTTPS proxy path already went throughhackney_ssl.proxy_ssl_opts/2now builds onhackney_ssl:ssl_opts/2, withproxy_ssl_optionsmerged on top. An explicit{verify, verify_none}is used as given, so existing setups keep working.Found while triaging a report by manus-pi (GHSA-7893-863r-2xxm); on supported OTP versions nothing unverified was accepted, the connection failed closed.