From b497a479ce7b4c4801e6ed6fb440b9552bd9e658 Mon Sep 17 00:00:00 2001 From: Valeriy Manzhos <47538801+InvisibleRain@users.noreply.github.com> Date: Wed, 8 Apr 2026 16:45:03 +0300 Subject: [PATCH] Fix methods for starting/stopping TUN --- v2rayN/ServiceLib/Manager/CoreManager.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/v2rayN/ServiceLib/Manager/CoreManager.cs b/v2rayN/ServiceLib/Manager/CoreManager.cs index 0c37e26f..53bbf5cf 100644 --- a/v2rayN/ServiceLib/Manager/CoreManager.cs +++ b/v2rayN/ServiceLib/Manager/CoreManager.cs @@ -207,7 +207,7 @@ public class CoreManager } } - private async Task CreateTUNRoutes() + public static async Task CreateTUNRoutes() { if (Utils.IsLinux()) { @@ -218,7 +218,7 @@ public class CoreManager displayLog: true, redirectInput: false, environmentVars: null, - updateFunc: _updateFunc + updateFunc: null ); await procService.StartAsync(AppManager.Instance.LinuxSudoPwd); var procService2 = new ProcessService( @@ -228,13 +228,13 @@ public class CoreManager displayLog: true, redirectInput: false, environmentVars: null, - updateFunc: _updateFunc + updateFunc: null ); await procService2.StartAsync(AppManager.Instance.LinuxSudoPwd); } } - private async Task DeleteTUNRoutes() + public static async Task DeleteTUNRoutes() { if (Utils.IsLinux()) { @@ -245,7 +245,7 @@ public class CoreManager displayLog: true, redirectInput: false, environmentVars: null, - updateFunc: _updateFunc + updateFunc: null ); await procService.StartAsync(AppManager.Instance.LinuxSudoPwd); var procService2 = new ProcessService( @@ -255,13 +255,13 @@ public class CoreManager displayLog: true, redirectInput: false, environmentVars: null, - updateFunc: _updateFunc + updateFunc: null ); await procService2.StartAsync(AppManager.Instance.LinuxSudoPwd); } } - private async Task StartTUNProcess() + public static async Task StartTUNProcess() { if (Utils.IsLinux()) { @@ -272,7 +272,7 @@ public class CoreManager displayLog: true, redirectInput: false, environmentVars: null, - updateFunc: _updateFunc + updateFunc: null ); await procService.StartAsync(AppManager.Instance.LinuxSudoPwd); }