From bb72be338d40bb2e822a0955fd54bf09c16d01e3 Mon Sep 17 00:00:00 2001 From: Hongwei Qin <122079993+shihuaidexianyu@users.noreply.github.com> Date: Fri, 7 Aug 2026 11:57:14 +0800 Subject: [PATCH] fix(windows): respect system proxy for remote server downloads (#364) The GUI update check already uses reqwest, which reads the Windows system proxy from the registry by default. The remote server installer / bundled-server fallback uses ureq, which only reads HTTP_PROXY/HTTPS_PROXY environment variables unless the win-system-proxy feature is enabled. Enable ureqs win-system-proxy feature so that release downloads inside the daemon also honor the Windows system proxy set by tools like Clash (System Proxy mode), v2rayN, etc. This is a no-op on non-Windows platforms. Fixes the inconsistency where the update check could reach GitHub through the proxy but the actual download would time out trying to connect directly. --- Cargo.lock | 11 +++++++++++ crates/tty7-core/Cargo.toml | 1 + 2 files changed, 12 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index f93ad406..2368a7f3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9909,6 +9909,7 @@ dependencies = [ "ureq-proto", "utf8-zero", "webpki-roots", + "winreg 0.56.0", ] [[package]] @@ -11366,6 +11367,16 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "winreg" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d6f32a0ff4a9f6f01231eb2059cc85479330739333e0e58cadf03b6af2cca10" +dependencies = [ + "cfg-if", + "windows-sys 0.59.0", +] + [[package]] name = "winresource" version = "0.1.31" diff --git a/crates/tty7-core/Cargo.toml b/crates/tty7-core/Cargo.toml index 2777b324..50520464 100644 --- a/crates/tty7-core/Cargo.toml +++ b/crates/tty7-core/Cargo.toml @@ -70,6 +70,7 @@ portable-pty = "0.8" # downloaded. The GUI package turns the feature on (see the root `Cargo.toml`). ureq = { version = "3", default-features = false, features = [ "rustls", + "win-system-proxy", "socks-proxy", ], optional = true }