diff --git a/ProxySU/MainWindow.xaml b/ProxySU/MainWindow.xaml index 2caeeb8..b76760e 100644 --- a/ProxySU/MainWindow.xaml +++ b/ProxySU/MainWindow.xaml @@ -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.22" Height="675" Width="650"> + Title="ProxySU - v2.4.23 Beta2" Height="675" Width="650"> diff --git a/ProxySU/MainWindow.xaml.cs b/ProxySU/MainWindow.xaml.cs index 4a5126d..e8c4c9d 100644 --- a/ProxySU/MainWindow.xaml.cs +++ b/ProxySU/MainWindow.xaml.cs @@ -7450,13 +7450,17 @@ namespace ProxySU { if (String.IsNullOrEmpty(ipv6) == false) { - //apiGithubCom = "api.githubipv6.ga"; - //scriptGithubUrl = "raw.githubipv6.ga"; - //githubCom = "github.githubipv6.ga"; + return true; } else { + FunctionResultErr(); + client.Disconnect(); + //****未检测到有效的IP地址......*** + currentStatus = Application.Current.FindResource("DisplayInstallInfo_NoIpDetect").ToString(); + MainWindowsShowInfo(currentStatus); + MessageBox.Show(currentStatus); return false; } } @@ -7935,13 +7939,19 @@ namespace ProxySU //检测主机是否为纯ipv6的主机 onlyIpv6 = OnlyIpv6HostDetect(client); - if(onlyIpv6 == true) + + //如果未检测到有效的ip,连接就会被断开 + if (client.IsConnected == false) + { + return false; + } + if (onlyIpv6 == true) { SetUpNat64(client, true); sshShellCommand = $"{sshCmdUpdate}"; currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand); } - + //****** "检测端口占用情况......" ****** SetUpProgressBarProcessing(22); currentStatus = Application.Current.FindResource("DisplayInstallInfo_TestPortUsed").ToString(); @@ -8237,20 +8247,20 @@ namespace ProxySU MainWindowsShowInfo(currentStatus); //再次初始化相关变量 - ipv4 = String.Empty; - ipv6 = String.Empty; - onlyIpv6 = false; + //ipv4 = String.Empty; + //ipv6 = String.Empty; + //onlyIpv6 = false; //sshShellCommand = @"curl -4 ip.sb"; - sshShellCommand = @"curl -s https://api.ip.sb/ip --ipv4 --max-time 8"; - currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand); - ipv4 = currentShellCommandResult.TrimEnd('\r', '\n'); + //sshShellCommand = @"curl -s https://api.ip.sb/ip --ipv4 --max-time 8"; + //currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand); + //ipv4 = currentShellCommandResult.TrimEnd('\r', '\n'); - sshShellCommand = @"curl -s https://api.ip.sb/ip --ipv6 --max-time 8"; - currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand); - ipv6 = currentShellCommandResult.TrimEnd('\r', '\n'); + //sshShellCommand = @"curl -s https://api.ip.sb/ip --ipv6 --max-time 8"; + //currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand); + //ipv6 = currentShellCommandResult.TrimEnd('\r', '\n'); - if (String.IsNullOrEmpty(ipv4) == false) + if (onlyIpv6 == false) { string nativeIp = ipv4; @@ -8264,75 +8274,42 @@ namespace ProxySU SetUpProgressBarProcessing(36); currentStatus = Application.Current.FindResource("DisplayInstallInfo_DomainResolveOK").ToString(); MainWindowsShowInfo(currentStatus); - onlyIpv6 = false; + //onlyIpv6 = false; return true; } - else - { - //****** "域名未能正确解析到当前VPS的IP上!安装失败!" ****** - currentStatus = Application.Current.FindResource("DisplayInstallInfo_ErrorDomainResolve").ToString(); - MainWindowsShowInfo(currentStatus); - - //****** "域名未能正确解析到当前VPS的IP上,请检查!若解析设置正确,请等待生效后再重试安装。如果域名使用了CDN,请先关闭!" ****** - MessageBox.Show(Application.Current.FindResource("MessageBoxShow_ErrorDomainResolve").ToString()); - //client.Disconnect(); - return false; - } + } else { - if (String.IsNullOrEmpty(ipv6) == false) + + string nativeIp = ipv6; + + //sshShellCommand = "ping6 " + ReceiveConfigurationParameters[4] + " -c1 | grep -oE -m1 \"([0-9]{1,3}\\.){3}[0-9]{1,3}\""; + sshShellCommand = $"dig @resolver1.opendns.com AAAA {ReceiveConfigurationParameters[4]} +short -6"; + currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand); + + string resultTestDomainCmd = currentShellCommandResult.TrimEnd('\r', '\n'); + if (String.Equals(nativeIp, resultTestDomainCmd) == true) { - string nativeIp = ipv6; - - //sshShellCommand = "ping6 " + ReceiveConfigurationParameters[4] + " -c1 | grep -oE -m1 \"([0-9]{1,3}\\.){3}[0-9]{1,3}\""; - sshShellCommand = $"dig @resolver1.opendns.com AAAA {ReceiveConfigurationParameters[4]} +short -6"; - currentShellCommandResult = MainWindowsShowCmd(client, sshShellCommand); - - string resultTestDomainCmd = currentShellCommandResult.TrimEnd('\r', '\n'); - if (String.Equals(nativeIp, resultTestDomainCmd) == true) - { - //****** "解析正确!OK!" ******12 - SetUpProgressBarProcessing(36); - currentStatus = Application.Current.FindResource("DisplayInstallInfo_DomainResolveOK").ToString(); - MainWindowsShowInfo(currentStatus); - onlyIpv6 = true; - //apiGithubCom = "api.githubipv6.ga"; - //scriptGithubUrl = "raw.githubipv6.ga"; - //githubCom = "github.githubipv6.ga"; - //纯ipv6主机,目前暂不支持 - //currentStatus = Application.Current.FindResource("DisplayInstallInfo_OnlyIpv6").ToString(); - //MainWindowsShowInfo(currentStatus); - //MessageBox.Show(currentStatus); - return true; - } - else - { - //****** "域名未能正确解析到当前VPS的IP上!安装失败!" ****** - currentStatus = Application.Current.FindResource("DisplayInstallInfo_ErrorDomainResolve").ToString(); - MainWindowsShowInfo(currentStatus); - - //****** "域名未能正确解析到当前VPS的IP上,请检查!若解析设置正确,请等待生效后再重试安装。如果域名使用了CDN,请先关闭!" ****** - MessageBox.Show(Application.Current.FindResource("MessageBoxShow_ErrorDomainResolve").ToString()); - //client.Disconnect(); - return false; - } - - } - else - { - //****** "域名未能正确解析到当前VPS的IP上!安装失败!" ****** - currentStatus = Application.Current.FindResource("DisplayInstallInfo_ErrorDomainResolve").ToString(); + //****** "解析正确!OK!" ******12 + SetUpProgressBarProcessing(36); + currentStatus = Application.Current.FindResource("DisplayInstallInfo_DomainResolveOK").ToString(); MainWindowsShowInfo(currentStatus); + //onlyIpv6 = true; - //****** "域名未能正确解析到当前VPS的IP上,请检查!若解析设置正确,请等待生效后再重试安装。如果域名使用了CDN,请先关闭!" ****** - MessageBox.Show(Application.Current.FindResource("MessageBoxShow_ErrorDomainResolve").ToString()); - //client.Disconnect(); - return false; + return true; } + } - - //return true; + //****** "域名未能正确解析到当前VPS的IP上!安装失败!" ****** + currentStatus = Application.Current.FindResource("DisplayInstallInfo_ErrorDomainResolve").ToString(); + MainWindowsShowInfo(currentStatus); + + //****** "域名未能正确解析到当前VPS的IP上,请检查!若解析设置正确,请等待生效后再重试安装。如果域名使用了CDN,请先关闭!" ****** + MessageBox.Show(Application.Current.FindResource("MessageBoxShow_ErrorDomainResolve").ToString()); + //client.Disconnect(); + return false; + } diff --git a/ProxySU/Properties/AssemblyInfo.cs b/ProxySU/Properties/AssemblyInfo.cs index 568c5e4..e81a312 100644 --- a/ProxySU/Properties/AssemblyInfo.cs +++ b/ProxySU/Properties/AssemblyInfo.cs @@ -51,5 +51,5 @@ using System.Windows; // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 // 方法是按如下所示使用“*”: : // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.4.22.0")] -[assembly: AssemblyFileVersion("2.4.22.0")] +[assembly: AssemblyVersion("2.4.23.0")] +[assembly: AssemblyFileVersion("2.4.23.0")] diff --git a/ProxySU/Translations/ProxySU.en-US.xaml b/ProxySU/Translations/ProxySU.en-US.xaml index 4052ea0..e9251ec 100644 --- a/ProxySU/Translations/ProxySU.en-US.xaml +++ b/ProxySU/Translations/ProxySU.en-US.xaml @@ -293,6 +293,7 @@ The time difference meets the requirements, OK! is checking whether the domain name is resolved to the IP of the current VPS... is detecting whether it is a pure ipv6 host... + A valid IP address was not detected... Finding the fastest Nat64 gateway... Failed to find a valid Nat64 gateway... The fastest Nat64 gateway of the current host is: diff --git a/ProxySU/Translations/ProxySU.zh-CN.xaml b/ProxySU/Translations/ProxySU.zh-CN.xaml index 821e7e3..486f0fd 100644 --- a/ProxySU/Translations/ProxySU.zh-CN.xaml +++ b/ProxySU/Translations/ProxySU.zh-CN.xaml @@ -298,6 +298,7 @@ 时间差符合要求,OK! 正在检测域名是否解析到当前VPS的IP上...... 正在检测是否为纯ipv6主机...... + 未检测到有效的IP地址...... 正在查找最快的Nat64网关...... 未能找到有效的Nat64网关...... 当前主机最快的Nat64网关为: diff --git a/ProxySU/Translations/ProxySU.zh-TW.xaml b/ProxySU/Translations/ProxySU.zh-TW.xaml index d68f3f3..17634c6 100644 --- a/ProxySU/Translations/ProxySU.zh-TW.xaml +++ b/ProxySU/Translations/ProxySU.zh-TW.xaml @@ -293,6 +293,7 @@ 時間差符合要求,OK! 正在檢測域名是否解析到當前VPS的IP上...... 正在檢測是否為純ipv6主機...... + 未檢測到有效的IP地址...... 正在查找最快的Nat64網關...... 未能找到有效的Nat64網關...... 當前主機最快的Nat64網關為: diff --git a/ProxySU/bin/Beta/Beta.zip b/ProxySU/bin/Beta/Beta.zip index 9c9f088..d53989a 100644 Binary files a/ProxySU/bin/Beta/Beta.zip and b/ProxySU/bin/Beta/Beta.zip differ diff --git a/TemplateConfg/v2ray/client/08_stats/08_stats.json b/TemplateConfg/v2ray/client/08_stats/08_stats.json index a58051b..02c9ed0 100644 --- a/TemplateConfg/v2ray/client/08_stats/08_stats.json +++ b/TemplateConfg/v2ray/client/08_stats/08_stats.json @@ -1,3 +1,3 @@ { - "stats": {} + "stats": null } \ No newline at end of file diff --git a/TemplateConfg/v2ray/server/08_stats/08_stats.json b/TemplateConfg/v2ray/server/08_stats/08_stats.json index a58051b..02c9ed0 100644 --- a/TemplateConfg/v2ray/server/08_stats/08_stats.json +++ b/TemplateConfg/v2ray/server/08_stats/08_stats.json @@ -1,3 +1,3 @@ { - "stats": {} + "stats": null } \ No newline at end of file