mirror of
https://github.com/proxysu/ProxySU.git
synced 2024-11-25 14:46:08 +03:00
优化设置与删除Nat64网关
This commit is contained in:
parent
1823d8b4da
commit
72f71983bc
@ -5,7 +5,7 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:ProxySU"
|
xmlns:local="clr-namespace:ProxySU"
|
||||||
mc:Ignorable="d"
|
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://yq.aliyun.com/articles/331878
|
||||||
https://docs.microsoft.co/en-us/dotnet/desktop-wpf/fundamentals/styles-templates-overview-->
|
https://docs.microsoft.co/en-us/dotnet/desktop-wpf/fundamentals/styles-templates-overview-->
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
|
@ -7484,7 +7484,7 @@ namespace ProxySU
|
|||||||
currentStatus = Application.Current.FindResource("DisplayInstallInfo_FindFastestSetUpNat64Failed").ToString();
|
currentStatus = Application.Current.FindResource("DisplayInstallInfo_FindFastestSetUpNat64Failed").ToString();
|
||||||
MainWindowsShowInfo(currentStatus);
|
MainWindowsShowInfo(currentStatus);
|
||||||
MessageBox.Show(currentStatus);
|
MessageBox.Show(currentStatus);
|
||||||
FunctionResultErr();
|
//FunctionResultErr();
|
||||||
client.Disconnect();
|
client.Disconnect();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -7493,8 +7493,13 @@ namespace ProxySU
|
|||||||
currentStatus = Application.Current.FindResource("DisplayInstallInfo_SetUpNat64").ToString();
|
currentStatus = Application.Current.FindResource("DisplayInstallInfo_SetUpNat64").ToString();
|
||||||
MainWindowsShowInfo(currentStatus);
|
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);
|
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
foreach (string gateip in dns64)
|
foreach (string gateip in dns64)
|
||||||
{
|
{
|
||||||
@ -7512,9 +7517,6 @@ namespace ProxySU
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//sshShellCommand = $"echo \"nameserver {dns64[1]}\" >>/etc/resolv.conf";
|
|
||||||
//currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -7523,7 +7525,7 @@ namespace ProxySU
|
|||||||
MainWindowsShowInfo(currentStatus);
|
MainWindowsShowInfo(currentStatus);
|
||||||
sshShellCommand = @"rm /etc/resolv.conf";
|
sshShellCommand = @"rm /etc/resolv.conf";
|
||||||
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
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);
|
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7947,9 +7949,10 @@ namespace ProxySU
|
|||||||
}
|
}
|
||||||
if (onlyIpv6 == true)
|
if (onlyIpv6 == true)
|
||||||
{
|
{
|
||||||
SetUpNat64(client, true);
|
functionResult = SetUpNat64(client, true);
|
||||||
sshShellCommand = $"{sshCmdUpdate}";
|
if (functionResult == false) { FunctionResultErr(); client.Disconnect(); return false; }
|
||||||
currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
//sshShellCommand = $"{sshCmdUpdate}";
|
||||||
|
//currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand);
|
||||||
}
|
}
|
||||||
|
|
||||||
//****** "检测端口占用情况......" ******
|
//****** "检测端口占用情况......" ******
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user