diff --git a/Cargo.toml b/Cargo.toml index 00dd38a..64d8a2f 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 96c8926..bc488e1 100644 --- a/src/client/proxy/matcher.rs +++ b/src/client/proxy/matcher.rs @@ -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