Skip to content

Commit 63d5a2a

Browse files
authored
Fix bug (#5213)
1 parent 1e9a6cb commit 63d5a2a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

v2rayN/v2rayN/Common/Utils.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1084,8 +1084,10 @@ public static void RemoveTunDevice()
10841084
{
10851085
try
10861086
{
1087+
var sum = MD5.HashData(Encoding.UTF8.GetBytes("wintunsingbox_tun"));
1088+
var guid = new Guid(sum);
10871089
string pnputilPath = @"C:\Windows\System32\pnputil.exe";
1088-
string arg = $" /remove-device /deviceid \"wintun\"";
1090+
string arg = $$""" /remove-device "SWD\Wintun\{{{guid}}}" """;
10891091

10901092
// Try to remove the device
10911093
Process proc = new()

0 commit comments

Comments
 (0)