Add a method for launching hev-socks5-tunnel

This commit is contained in:
Valeriy Manzhos 2026-04-07 18:05:52 +03:00
parent 037cdaeba8
commit 903467d296
No known key found for this signature in database
GPG key ID: 6547CFC8E2EC3D90

View file

@ -260,6 +260,24 @@ public class CoreManager
await procService2.StartAsync(AppManager.Instance.LinuxSudoPwd);
}
}
private async Task StartTUNProcess()
{
if (Utils.IsLinux())
{
var procService = new ProcessService(
fileName: "/usr/bin/sudo",
arguments: "-uv2rayn-core /opt/v2rayN/bin/hev_socks5_tunnel/hev-socks5-tunnel /opt/v2rayN/bin/hev_socks5_tunnel/v2rayn-tun.yaml",
workingDirectory: Utils.GetBinConfigPath(),
displayLog: true,
redirectInput: false,
environmentVars: null,
updateFunc: _updateFunc
);
await procService.StartAsync(AppManager.Instance.LinuxSudoPwd);
}
}
private async Task UpdateFunc(bool notify, string msg)
{
await _updateFunc?.Invoke(notify, msg);