From 8c7b5abcb5cea550d2e2034bb10545c9f716caa2 Mon Sep 17 00:00:00 2001 From: sgt57 <198590103+sgt57@users.noreply.github.com> Date: Wed, 15 Apr 2026 14:08:17 +0800 Subject: [PATCH] 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> --- Changelog.md | 1 + src-tauri/src/feat/config.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/Changelog.md b/Changelog.md index cb6c81af5..52d83aa52 100644 --- a/Changelog.md +++ b/Changelog.md @@ -10,6 +10,7 @@ - 修复系统代理关闭后在 PAC 模式下未完全关闭 - 修复 macOS 开关代理时可能的卡死 - 修复修改定时自动更新后记时未及时刷新 +- 修复 Linux 关闭 TUN 不立即生效 ### ✨ 新增功能 diff --git a/src-tauri/src/feat/config.rs b/src-tauri/src/feat/config.rs index 6847e1ba7..74946d855 100644 --- a/src-tauri/src/feat/config.rs +++ b/src-tauri/src/feat/config.rs @@ -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();