fix(tun): restart core when tun mode is toggled to true on linux (#6800)

* fix(tun): restart core when tun mode is toggled to true on linux

* fix(changelog): add note for Linux TUN not taking effect immediately

---------

Co-authored-by: Tunglies <77394545+Tunglies@users.noreply.github.com>
This commit is contained in:
sgt57 2026-04-15 14:08:17 +08:00 committed by GitHub
parent e2a634b662
commit 8c7b5abcb5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View File

@ -10,6 +10,7 @@
- 修复系统代理关闭后在 PAC 模式下未完全关闭
- 修复 macOS 开关代理时可能的卡死
- 修复修改定时自动更新后记时未及时刷新
- 修复 Linux 关闭 TUN 不立即生效
### ✨ 新增功能

View File

@ -135,6 +135,7 @@ fn determine_update_flags(patch: &IVerge) -> UpdateFlags {
#[cfg(target_os = "linux")]
{
restart_core_needed |= tproxy_enabled.is_some() || tproxy_port.is_some();
restart_core_needed |= tun_mode == Some(true);
}
let mut update_flags = UpdateFlags::empty();