fix(sysproxy): fully clear PAC when disabling system proxy (#6591)

This commit is contained in:
Tunglies
2026-03-23 08:03:20 +00:00
committed by GitHub
parent a49807b89c
commit 77fa721119
2 changed files with 5 additions and 2 deletions
+2
View File
@@ -5,6 +5,8 @@
### 🐞 修复问题
- 修复系统代理关闭后在 PAC 模式下未完全关闭
### ✨ 新增功能
### 🚀 优化改进
+3 -2
View File
@@ -157,8 +157,9 @@ impl Sysopt {
self.access_guard().write().set_guard_type(GuardType::None);
if !sys_enable && !pac_enable {
// disable proxy
// `enable_system_proxy` is the master switch.
// When disabled, force clear both global proxy and PAC at OS level.
if !sys_enable {
sys.set_system_proxy()?;
auto.set_auto_proxy()?;
return Ok(());