From b6af7b7440b0f0b1609dc1a4fecabfad18f614c4 Mon Sep 17 00:00:00 2001 From: Slinetrac Date: Wed, 17 Dec 2025 16:20:06 +0800 Subject: [PATCH] fix(tun): set auto-redirect default to false to improve cross-distro compatibility #5845 Closes #5845 --- src/components/setting/mods/tun-viewer.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/setting/mods/tun-viewer.tsx b/src/components/setting/mods/tun-viewer.tsx index 0b60b0db2..1eb164d9d 100644 --- a/src/components/setting/mods/tun-viewer.tsx +++ b/src/components/setting/mods/tun-viewer.tsx @@ -33,7 +33,7 @@ export function TunViewer({ ref }: { ref?: Ref }) { stack: "mixed", device: OS === "macos" ? "utun1024" : "Mihomo", autoRoute: true, - autoRedirect: OS === "linux", + autoRedirect: false, autoDetectInterface: true, dnsHijack: ["any:53"], strictRoute: false, @@ -44,7 +44,7 @@ export function TunViewer({ ref }: { ref?: Ref }) { open: () => { setOpen(true); const nextAutoRoute = clash?.tun["auto-route"] ?? true; - const rawAutoRedirect = clash?.tun["auto-redirect"] ?? true; + const rawAutoRedirect = clash?.tun["auto-redirect"] ?? false; const computedAutoRedirect = OS === "linux" ? (nextAutoRoute ? rawAutoRedirect : false) : false; setValues({ @@ -118,7 +118,7 @@ export function TunViewer({ ref }: { ref?: Ref }) { "auto-route": true, ...(OS === "linux" ? { - "auto-redirect": true, + "auto-redirect": false, } : {}), "auto-detect-interface": true, @@ -130,7 +130,7 @@ export function TunViewer({ ref }: { ref?: Ref }) { stack: "gvisor", device: OS === "macos" ? "utun1024" : "Mihomo", autoRoute: true, - autoRedirect: OS === "linux" ? true : false, + autoRedirect: false, autoDetectInterface: true, dnsHijack: ["any:53"], strictRoute: false,