fix: import url error (#543)

use rustls instead of depending user's system tls
This commit is contained in:
yettera765 2023-05-05 12:08:08 +08:00 committed by GitHub
parent 8cf8fa7c80
commit 3eeaee154f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ delay_timer = "0.11.1"
parking_lot = "0.12.0" parking_lot = "0.12.0"
tokio = { version = "1", features = ["full"] } tokio = { version = "1", features = ["full"] }
serde = { version = "1.0", features = ["derive"] } 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 = { version = "1.1.1", features = ["global-shortcut-all", "process-all", "shell-all", "system-tray", "updater", "window-all"] }
tauri-runtime-wry = { version = "0.12" } tauri-runtime-wry = { version = "0.12" }
window-vibrancy = { version = "0.3.0" } window-vibrancy = { version = "0.3.0" }

View File

@ -190,7 +190,7 @@ impl PrfItem {
let self_proxy = opt_ref.map_or(false, |o| o.self_proxy.unwrap_or(false)); 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 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 { if self_proxy {