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 authored Mar 24, 2024
1 parent 04bf45f commit fff307b
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 @@ -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);
Expand Down

0 comments on commit fff307b

Please sign in to comment.