From a21a9ee985d60cc3b5fdce16e24bf4c0ec9983ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AF=92=E5=BD=A4?= Date: Thu, 22 Feb 2024 17:00:10 +0800 Subject: [PATCH] fix(connect): ALPN missed when using socks5 proxy with rustls backend --- src/connect.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/connect.rs b/src/connect.rs index ac0e07ffd..ff76c57f8 100644 --- a/src/connect.rs +++ b/src/connect.rs @@ -236,12 +236,12 @@ impl Connector { } } #[cfg(feature = "__rustls")] - Inner::RustlsTls { tls_proxy, .. } => { + Inner::RustlsTls { tls, .. } => { if dst.scheme() == Some(&Scheme::HTTPS) { use std::convert::TryFrom; use tokio_rustls::TlsConnector as RustlsConnector; - let tls = tls_proxy.clone(); + let tls = tls.clone(); let host = dst.host().ok_or("no host in url")?.to_string(); let conn = socks::connect(proxy, dst, dns).await?; let conn = TokioIo::new(conn);