1
0
mirror of https://github.com/proxysu/ProxySU.git synced 2024-11-25 06:36:08 +03:00

优化设置与删除Nat64网关

This commit is contained in:
ProxySU 2020-11-16 14:09:40 +08:00
parent 1823d8b4da
commit 72f71983bc
3 changed files with 15 additions and 12 deletions

View File

@ -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.23 Beta3" Height="675" Width="650">
Title="ProxySU - v2.4.23 Beta4" Height="675" Width="650">
<!--以下样式参考自https://yq.aliyun.com/articles/331878
https://docs.microsoft.co/en-us/dotnet/desktop-wpf/fundamentals/styles-templates-overview-->
<Window.Resources>

View File

@ -7484,7 +7484,7 @@ namespace ProxySU
currentStatus = Application.Current.FindResource("DisplayInstallInfo_FindFastestSetUpNat64Failed").ToString();
MainWindowsShowInfo(currentStatus);
MessageBox.Show(currentStatus);
FunctionResultErr();
//FunctionResultErr();
client.Disconnect();
return false;
}
@ -7493,8 +7493,13 @@ namespace ProxySU
currentStatus = Application.Current.FindResource("DisplayInstallInfo_SetUpNat64").ToString();
MainWindowsShowInfo(currentStatus);
sshShellCommand = @"mv /etc/resolv.conf /etc/resolv.conf.bak";
functionResult = FileCheckExists(client, @"/etc/resolv.conf.proxysu");
if (functionResult == false)
{
sshShellCommand = @"mv /etc/resolv.conf /etc/resolv.conf.proxysu";
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
}
foreach (string gateip in dns64)
{
@ -7512,9 +7517,6 @@ namespace ProxySU
}
//sshShellCommand = $"echo \"nameserver {dns64[1]}\" >>/etc/resolv.conf";
//currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
}
else
{
@ -7523,7 +7525,7 @@ namespace ProxySU
MainWindowsShowInfo(currentStatus);
sshShellCommand = @"rm /etc/resolv.conf";
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
sshShellCommand = @"ln -s /etc/resolvconf/run/resolv.conf /etc/resolv.conf";
sshShellCommand = @"mv /etc/resolv.conf.proxysu /etc/resolv.conf";
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
}
@ -7947,9 +7949,10 @@ namespace ProxySU
}
if (onlyIpv6 == true)
{
SetUpNat64(client, true);
sshShellCommand = $"{sshCmdUpdate}";
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
functionResult = SetUpNat64(client, true);
if (functionResult == false) { FunctionResultErr(); client.Disconnect(); return false; }
//sshShellCommand = $"{sshCmdUpdate}";
//currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
}
//****** "检测端口占用情况......" ******

Binary file not shown.