mirror of
https://github.com/proxysu/ProxySU.git
synced 2025-04-02 21:36:17 +03:00
优化v2ray.service低端口绑定错误
This commit is contained in:
parent
c37ec2598d
commit
cb55c6f92d
3 changed files with 20 additions and 1 deletions
|
@ -5,7 +5,7 @@
|
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:ProxySU"
|
||||
mc:Ignorable="d"
|
||||
Title="ProxySU - v2.4.19-beta3" Height="675" Width="650">
|
||||
Title="ProxySU - v2.4.19-beta4" Height="675" Width="650">
|
||||
<!--以下样式参考自:https://yq.aliyun.com/articles/331878
|
||||
https://docs.microsoft.com/en-us/dotnet/desktop-wpf/fundamentals/styles-templates-overview-->
|
||||
<Window.Resources>
|
||||
|
|
|
@ -1323,6 +1323,25 @@ namespace ProxySU
|
|||
private bool GenerateServerConfigurationV2Ray(SshClient client)
|
||||
{
|
||||
SetUpProgressBarProcessing(44);
|
||||
//修改v2ray.service
|
||||
|
||||
sshShellCommand = $"sed -i 's/User=nobody/User=root/g' /etc/systemd/system/v2ray.service";
|
||||
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||
|
||||
sshShellCommand = $"sed -i 's/CapabilityBoundingSet=/#CapabilityBoundingSet=/g' /etc/systemd/system/v2ray.service";
|
||||
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||
|
||||
sshShellCommand = $"sed -i 's/AmbientCapabilities=/#AmbientCapabilities=/g' /etc/systemd/system/v2ray.service";
|
||||
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||
|
||||
sshShellCommand = $"systemctl daemon-reload";
|
||||
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||
|
||||
//备用下载地址:https://raw.githubusercontent.com/proxysu/Resources/master/v2ray/v2ray.service
|
||||
|
||||
//sshShellCommand = $"yes | curl -o /etc/systemd/system/v2ray.service https://raw.githubusercontent.com/proxysu/Resources/master/v2ray/v2ray.service";
|
||||
//currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||
|
||||
//备份原来的文件
|
||||
sshShellCommand = @"mv /usr/local/etc/v2ray/config.json /usr/local/etc/v2ray/config.json.1";
|
||||
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||
|
|
Binary file not shown.
Loading…
Add table
Reference in a new issue