mirror of
https://github.com/2dust/v2rayN.git
synced 2026-04-16 12:35:46 +00:00
Add a method for launching hev-socks5-tunnel
This commit is contained in:
parent
037cdaeba8
commit
903467d296
1 changed files with 18 additions and 0 deletions
|
|
@ -260,6 +260,24 @@ public class CoreManager
|
||||||
await procService2.StartAsync(AppManager.Instance.LinuxSudoPwd);
|
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)
|
private async Task UpdateFunc(bool notify, string msg)
|
||||||
{
|
{
|
||||||
await _updateFunc?.Invoke(notify, msg);
|
await _updateFunc?.Invoke(notify, msg);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue