From 4f346f73be0df5431249a77dc52308cd021b66f2 Mon Sep 17 00:00:00 2001 From: lsyx <59752988+Lsyx-Good@users.noreply.github.com> Date: Fri, 5 Apr 2024 12:03:01 +0800 Subject: [PATCH] Fix bug --- v2rayN/v2rayN/Common/Utils.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/v2rayN/v2rayN/Common/Utils.cs b/v2rayN/v2rayN/Common/Utils.cs index 286fac9e71..e8c56d181c 100644 --- a/v2rayN/v2rayN/Common/Utils.cs +++ b/v2rayN/v2rayN/Common/Utils.cs @@ -1084,8 +1084,10 @@ public static void RemoveTunDevice() { try { + var sum = MD5.HashData(Encoding.UTF8.GetBytes("wintunsingbox_tun")); + var guid = new Guid(sum); string pnputilPath = @"C:\Windows\System32\pnputil.exe"; - string arg = $" /remove-device /deviceid \"wintun\""; + string arg = $$""" /remove-device "SWD\Wintun\{{{guid}}}" """; // Try to remove the device Process proc = new()