refactor: pass ALPN around as &str

This commit is contained in:
link2xt
2024-11-09 20:54:06 +00:00
committed by l
parent 0ab10f99fd
commit 460d2f3c2a
6 changed files with 28 additions and 19 deletions

View File

@@ -76,11 +76,11 @@ where
let proxy_stream = proxy_config
.connect(context, host, port, load_cache)
.await?;
let tls_stream = wrap_rustls(host, &[], proxy_stream).await?;
let tls_stream = wrap_rustls(host, "", proxy_stream).await?;
Box::new(tls_stream)
} else {
let tcp_stream = crate::net::connect_tcp(context, host, port, load_cache).await?;
let tls_stream = wrap_rustls(host, &[], tcp_stream).await?;
let tls_stream = wrap_rustls(host, "", tcp_stream).await?;
Box::new(tls_stream)
}
}