mirror of
https://github.com/proxysu/ProxySU.git
synced 2025-04-14 14:40:58 +00:00
纯ipv6主机安装caddy,优化网络
This commit is contained in:
parent
7bf01377cb
commit
35b6a741ff
2 changed files with 13 additions and 11 deletions
|
@ -8146,6 +8146,14 @@ namespace ProxySU
|
||||||
currentStatus = Application.Current.FindResource("DisplayInstallInfo_StartInstallCaddy").ToString();
|
currentStatus = Application.Current.FindResource("DisplayInstallInfo_StartInstallCaddy").ToString();
|
||||||
MainWindowsShowInfo(currentStatus);
|
MainWindowsShowInfo(currentStatus);
|
||||||
|
|
||||||
|
//如果是纯ipv6主机,则需要删除前面设置的Nat64网关
|
||||||
|
if (onlyIpv6 == true)
|
||||||
|
{
|
||||||
|
SetUpNat64(client, false);
|
||||||
|
sshShellCommand = $"{sshCmdUpdate}";
|
||||||
|
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||||
|
}
|
||||||
|
|
||||||
//为真则表示系统有相应的组件。
|
//为真则表示系统有相应的组件。
|
||||||
if (getApt == true)
|
if (getApt == true)
|
||||||
{
|
{
|
||||||
|
@ -8172,10 +8180,10 @@ namespace ProxySU
|
||||||
sshShellCommand = @"dnf copr enable @caddy/caddy -y";
|
sshShellCommand = @"dnf copr enable @caddy/caddy -y";
|
||||||
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||||
|
|
||||||
//sshShellCommand = @"dnf -q makecache";
|
//sshShellCommand = @"dnf makecache";
|
||||||
//currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
//currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||||
|
|
||||||
sshShellCommand = @"dnf -y -q install caddy";
|
sshShellCommand = @"dnf -y install caddy";
|
||||||
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8188,10 +8196,10 @@ namespace ProxySU
|
||||||
sshShellCommand = @"yum copr enable @caddy/caddy -y";
|
sshShellCommand = @"yum copr enable @caddy/caddy -y";
|
||||||
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||||
|
|
||||||
//sshShellCommand = @"yum -q makecache";
|
//sshShellCommand = @"yum makecache";
|
||||||
//currentShellCommandResult = MainWindowsShowCmd(client,sshShellCommand);
|
//currentShellCommandResult = MainWindowsShowCmd(client,sshShellCommand);
|
||||||
|
|
||||||
sshShellCommand = @"yum -y -q install caddy";
|
sshShellCommand = @"yum -y install caddy";
|
||||||
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||||
|
|
||||||
sshShellCommand = @"sed -i 's/AmbientCapabilities/#AmbientCapabilities/g' /usr/lib/systemd/system/caddy.service";
|
sshShellCommand = @"sed -i 's/AmbientCapabilities/#AmbientCapabilities/g' /usr/lib/systemd/system/caddy.service";
|
||||||
|
@ -8430,13 +8438,7 @@ namespace ProxySU
|
||||||
//return false;
|
//return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//如果是纯ipv6主机,则需要删除前面设置的Nat64网关
|
|
||||||
if (onlyIpv6 == true)
|
|
||||||
{
|
|
||||||
SetUpNat64(client, false);
|
|
||||||
sshShellCommand = $"{sshCmdUpdate}";
|
|
||||||
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
|
||||||
}
|
|
||||||
|
|
||||||
SetUpProgressBarProcessing(95);
|
SetUpProgressBarProcessing(95);
|
||||||
return true;
|
return true;
|
||||||
|
|
Binary file not shown.
Loading…
Add table
Reference in a new issue