mirror of
https://github.com/2dust/v2rayN.git
synced 2026-04-14 19:45:45 +00:00
Stop TUN and delete rules when the TUN button is untoggled
This commit is contained in:
parent
4b52b06f6d
commit
e7afe3bb92
1 changed files with 9 additions and 0 deletions
|
|
@ -494,6 +494,15 @@ public class StatusBarViewModel : MyReactiveObject
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (EnableTun == false)
|
||||
{
|
||||
if (Utils.IsLinux())
|
||||
{
|
||||
await CoreManager.DeleteTUNRoutes();
|
||||
await CoreManager.KillTUNProcess();
|
||||
}
|
||||
}
|
||||
await ConfigHandler.SaveConfig(_config);
|
||||
// On Linux TUN is managed by an external program, not by the core
|
||||
if (!Utils.IsLinux())
|
||||
|
|
|
|||
Loading…
Reference in a new issue