From 2bbb5ea23ba75f5804923f16f53ca76fcabd340a Mon Sep 17 00:00:00 2001 From: huzibaca Date: Wed, 16 Oct 2024 02:55:23 +0800 Subject: [PATCH] chore: update --- src-tauri/src/core/sysopt.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src-tauri/src/core/sysopt.rs b/src-tauri/src/core/sysopt.rs index 2450b5de..976c0bb3 100644 --- a/src-tauri/src/core/sysopt.rs +++ b/src-tauri/src/core/sysopt.rs @@ -98,7 +98,7 @@ impl Sysopt { url: format!("http://127.0.0.1:{pac_port}/commands/pac"), }; - if !sys_enable && !pac_enable { + if !sys_enable { sys.set_system_proxy()?; auto.set_auto_proxy()?; return Ok(()); @@ -122,7 +122,7 @@ impl Sysopt { } #[cfg(target_os = "windows")] { - if !enable { + if !sys_enable { return self.reset_sysproxy().await; } use crate::core::handle::Handle; @@ -139,7 +139,7 @@ impl Sysopt { } let shell = app_handle.shell(); - let output = if pac { + let output = if pac_enable { let address = format!("http://{}:{}/pac", "127.0.0.1", pac_port); let output = shell .command(sysproxy_exe.as_path().to_str().unwrap())