From 3eeaee154f8774220e9a823a274aa9acc4e05bf4 Mon Sep 17 00:00:00 2001 From: yettera765 <88224234+yettera765@users.noreply.github.com> Date: Fri, 5 May 2023 12:08:08 +0800 Subject: [PATCH] fix: import url error (#543) use rustls instead of depending user's system tls --- src-tauri/Cargo.toml | 2 +- src-tauri/src/config/prfitem.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 824bf5a..c70150d 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -36,7 +36,7 @@ delay_timer = "0.11.1" parking_lot = "0.12.0" tokio = { version = "1", features = ["full"] } serde = { version = "1.0", features = ["derive"] } -reqwest = { version = "0.11", features = ["json"] } +reqwest = { version = "0.11", features = ["json","rustls-tls"] } tauri = { version = "1.1.1", features = ["global-shortcut-all", "process-all", "shell-all", "system-tray", "updater", "window-all"] } tauri-runtime-wry = { version = "0.12" } window-vibrancy = { version = "0.3.0" } diff --git a/src-tauri/src/config/prfitem.rs b/src-tauri/src/config/prfitem.rs index 5296e0e..1e1d4a8 100644 --- a/src-tauri/src/config/prfitem.rs +++ b/src-tauri/src/config/prfitem.rs @@ -190,7 +190,7 @@ impl PrfItem { let self_proxy = opt_ref.map_or(false, |o| o.self_proxy.unwrap_or(false)); let user_agent = opt_ref.map_or(None, |o| o.user_agent.clone()); - let mut builder = reqwest::ClientBuilder::new().no_proxy(); + let mut builder = reqwest::ClientBuilder::new().use_rustls_tls().no_proxy(); // 使用软件自己的代理 if self_proxy {