diff options
author | Sean McArthur <sean@seanmonstar.com> | 2024-07-31 15:44:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-01 00:44:03 +0200 |
commit | fbcd250bc8ffb3b577afca7131d1d37f55eb47a2 (patch) | |
tree | 8e69ebaaa21c3850128f40bddf996ed1e429e7d4 /ext/fetch/proxy.rs | |
parent | d3419f7d147b8c362a3795c8284d55ff6f4f3492 (diff) |
fix(ext/fetch): use correct ALPN to socks5 proxies (#24817)
Closes #24632
Closes #24719
Diffstat (limited to 'ext/fetch/proxy.rs')
-rw-r--r-- | ext/fetch/proxy.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/fetch/proxy.rs b/ext/fetch/proxy.rs index f23df5dd0..32a445d8b 100644 --- a/ext/fetch/proxy.rs +++ b/ext/fetch/proxy.rs @@ -727,7 +727,14 @@ where } } Proxied::Socks(ref p) => p.connected(), - Proxied::SocksTls(ref p) => p.inner().get_ref().0.connected(), + Proxied::SocksTls(ref p) => { + let tunneled_tls = p.inner().get_ref(); + if tunneled_tls.1.alpn_protocol() == Some(b"h2") { + tunneled_tls.0.connected().negotiated_h2() + } else { + tunneled_tls.0.connected() + } + } } } } |