From 19fb3926fd24d95371bc3a7593256861df406436 Mon Sep 17 00:00:00 2001 From: Tony <68118705+Legend-Master@users.noreply.github.com> Date: Tue, 4 Aug 2026 19:51:32 +0800 Subject: [PATCH] feat(http): add `system-proxy` feature (#3528) * feat(http): add `system-proxy` feature * require reqwest 0.12.16 --- .changes/http-system-proxy.md | 6 ++++++ plugins/http/Cargo.toml | 13 +++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 .changes/http-system-proxy.md diff --git a/.changes/http-system-proxy.md b/.changes/http-system-proxy.md new file mode 100644 index 000000000..0e428a7fe --- /dev/null +++ b/.changes/http-system-proxy.md @@ -0,0 +1,6 @@ +--- +"http": minor +"http-js": minor +--- + +Added `system-proxy` feature to replace the old `macos-system-configuration` feature flag to match the new reqwest API. diff --git a/plugins/http/Cargo.toml b/plugins/http/Cargo.toml index 82e2a6bfb..497646f4a 100644 --- a/plugins/http/Cargo.toml +++ b/plugins/http/Cargo.toml @@ -41,7 +41,8 @@ tauri-plugin-fs = { path = "../fs", version = "2.5.1" } urlpattern = "0.3" regex = "1" http = "1" -reqwest = { version = "0.12", default-features = false } +# 0.12.16 is when `system-proxy` was added +reqwest = { version = "0.12.16", default-features = false } url = { workspace = true } data-url = "0.3" cookie_store = { version = "0.22", optional = true, features = ["serde"] } @@ -49,13 +50,7 @@ bytes = { version = "1.9", optional = true } tracing = { workspace = true, optional = true } [features] -default = [ - "rustls-tls", - "http2", - "charset", - "macos-system-configuration", - "cookies", -] +default = ["rustls-tls", "http2", "charset", "system-proxy", "cookies"] multipart = ["reqwest/multipart"] json = ["reqwest/json"] stream = ["reqwest/stream"] @@ -76,7 +71,9 @@ trust-dns = ["reqwest/trust-dns"] socks = ["reqwest/socks"] http2 = ["reqwest/http2"] charset = ["reqwest/charset"] +# Deprecated, switch to system-proxy macos-system-configuration = ["reqwest/macos-system-configuration"] +system-proxy = ["reqwest/system-proxy"] unsafe-headers = [] tracing = ["dep:tracing"] dangerous-settings = []