fix(proxy): resolve system proxy toggle stuck and state desync (#6614) (#6657)

* fix(proxy): resolve system proxy toggle stuck and state desync (#6614)

Backend: replace hand-rolled AtomicBool lock in update_sysproxy() with
tokio::sync::Mutex so concurrent calls wait instead of being silently
dropped, ensuring the latest config is always applied.

Move blocking OS calls (networksetup on macOS) to spawn_blocking so
they no longer stall the tokio worker thread pool.

Frontend: release SwitchRow pendingRef in .finally() so the UI always
re-syncs with the actual OS proxy state, and rollback checked on error.

Closes #6614

* fix(changelog): add note for macOS proxy toggle freeze issue
This commit is contained in:
Tunglies
2026-03-27 15:40:03 +00:00
committed by GitHub
parent 607ef5a8a9
commit ca8e350694
3 changed files with 72 additions and 83 deletions
+1
View File
@@ -6,6 +6,7 @@
### 🐞 修复问题
- 修复系统代理关闭后在 PAC 模式下未完全关闭
- 修复 macOS 开关代理时可能的卡死
### ✨ 新增功能