From f347fe1c0376b20e6a21f17cf861c6b5381074b7 Mon Sep 17 00:00:00 2001 From: Mangoo Date: Sat, 8 Aug 2026 15:20:41 +0300 Subject: [PATCH] Fix Windows TUN restart issue (#9925) --- v2rayN/ServiceLib/Common/WindowsUtils.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v2rayN/ServiceLib/Common/WindowsUtils.cs b/v2rayN/ServiceLib/Common/WindowsUtils.cs index 5792dcec..63094608 100644 --- a/v2rayN/ServiceLib/Common/WindowsUtils.cs +++ b/v2rayN/ServiceLib/Common/WindowsUtils.cs @@ -54,12 +54,12 @@ internal static class WindowsUtils public static async Task RemoveTunDevice() { - var tunNameList = new List { "wintunsingbox_tun", "xray_tun" }; + var tunNameList = new List { "singbox_tun", "xray_tun" }; foreach (var tunName in tunNameList) { try { - var sum = MD5.HashData(Encoding.UTF8.GetBytes(tunName)); + var sum = MD5.HashData(Encoding.UTF8.GetBytes($"wintun{tunName}")); var guid = new Guid(sum); var pnpUtilPath = @"C:\Windows\System32\pnputil.exe"; var arg = $$""" /remove-device "SWD\Wintun\{{{guid}}}" """;