From d7ce0ff33b39af561750d5640a60f64f088519a7 Mon Sep 17 00:00:00 2001 From: Bugen Zhao Date: Tue, 30 Dec 2025 18:27:03 +0800 Subject: [PATCH] chore: bump `system-configuration` to 0.7 Signed-off-by: Bugen Zhao --- Cargo.toml | 2 +- src/client/proxy/matcher.rs | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d13bf7e..22b5516 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,7 +50,7 @@ pretty_env_logger = "0.5" pnet_datalink = "0.35.0" [target.'cfg(target_os = "macos")'.dependencies] -system-configuration = { version = ">=0.5, <0.7", optional = true } +system-configuration = { version = "0.7", optional = true } [target.'cfg(windows)'.dependencies] windows-registry = { version = ">=0.3, <0.7", optional = true } diff --git a/src/client/proxy/matcher.rs b/src/client/proxy/matcher.rs index 4199008..bc488e1 100644 --- a/src/client/proxy/matcher.rs +++ b/src/client/proxy/matcher.rs @@ -575,7 +575,7 @@ mod builder { #[cfg(feature = "client-proxy-system")] #[cfg(target_os = "macos")] mod mac { - use system_configuration::core_foundation::base::{CFType, TCFType, TCFTypeRef}; + use system_configuration::core_foundation::base::CFType; use system_configuration::core_foundation::dictionary::CFDictionary; use system_configuration::core_foundation::number::CFNumber; use system_configuration::core_foundation::string::{CFString, CFStringRef}; @@ -586,7 +586,11 @@ mod mac { }; pub(super) fn with_system(builder: &mut super::Builder) { - let store = SCDynamicStoreBuilder::new("").build(); + let store = if let Some(store) = SCDynamicStoreBuilder::new("hyper-util").build() { + store + } else { + return; + }; let proxies_map = if let Some(proxies_map) = store.get_proxies() { proxies_map