refact: tls, native-tls fallback rustls-tls (#13263)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2025-11-03 23:21:01 +08:00
committed by GitHub
parent 44a28aa5bd
commit 910dcf2036
70 changed files with 1184 additions and 318 deletions

View File

@@ -1,4 +1,4 @@
use super::create_http_client_async;
use super::create_http_client_async_with_url;
use hbb_common::{
bail,
lazy_static::lazy_static,
@@ -132,7 +132,7 @@ async fn do_download(
auto_del_dur: Option<Duration>,
mut rx_cancel: UnboundedReceiver<()>,
) -> ResultType<bool> {
let client = create_http_client_async();
let client = create_http_client_async_with_url(&url).await;
let mut is_all_downloaded = false;
tokio::select! {