Skip to content

Commit

Permalink
fix(connect): ALPN missed when using socks5 proxy with rustls backend
Browse files Browse the repository at this point in the history
  • Loading branch information
cxw620 committed Mar 11, 2024
1 parent e319263 commit ae6abbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/connect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,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 = hyper_util::rt::TokioIo::new(conn);
Expand Down

0 comments on commit ae6abbf

Please sign in to comment.