mirror of
https://github.com/proxysu/ProxySU.git
synced 2024-11-25 22:56:09 +03:00
优化启用BBR显示进度
This commit is contained in:
parent
2cac6c63ed
commit
cf529a2a4d
@ -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.14" Height="675" Width="650">
|
Title="ProxySU - v2.4.15" Height="675" Width="650">
|
||||||
<!--以下样式参考自:https://yq.aliyun.com/articles/331878
|
<!--以下样式参考自:https://yq.aliyun.com/articles/331878
|
||||||
https://docs.microsoft.com/en-us/dotnet/desktop-wpf/fundamentals/styles-templates-overview-->
|
https://docs.microsoft.com/en-us/dotnet/desktop-wpf/fundamentals/styles-templates-overview-->
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
|
@ -85,9 +85,6 @@ namespace ProxySU
|
|||||||
static string ipv4 = String.Empty; //保存获取的ipv4地址
|
static string ipv4 = String.Empty; //保存获取的ipv4地址
|
||||||
static string ipv6 = String.Empty; //保存获取的ipv6地址
|
static string ipv6 = String.Empty; //保存获取的ipv6地址
|
||||||
static bool onlyIpv6 = false; //主机是否基于纯ipv6地址
|
static bool onlyIpv6 = false; //主机是否基于纯ipv6地址
|
||||||
//static string scriptGithubUrl = "raw.githubusercontent.com";//安装脚本下载地址
|
|
||||||
//static string apiGithubCom = "api.github.com"; //github api接口
|
|
||||||
//static string githubCom = "github.com"; //github 主站网址
|
|
||||||
static bool functionResult = true; //标示功能函数是否执行状态(true无错误发生/false有错误发生)
|
static bool functionResult = true; //标示功能函数是否执行状态(true无错误发生/false有错误发生)
|
||||||
static string sshShellCommand = String.Empty; //定义保存执行的命令
|
static string sshShellCommand = String.Empty; //定义保存执行的命令
|
||||||
static string currentStatus = String.Empty; //定议保存要显示的状态
|
static string currentStatus = String.Empty; //定议保存要显示的状态
|
||||||
@ -5323,6 +5320,7 @@ namespace ProxySU
|
|||||||
functionResult = RootAuthorityDetect(client);
|
functionResult = RootAuthorityDetect(client);
|
||||||
if (functionResult == false) { FunctionResultErr(); client.Disconnect(); return; }
|
if (functionResult == false) { FunctionResultErr(); client.Disconnect(); return; }
|
||||||
|
|
||||||
|
SetUpProgressBarProcessing(30);
|
||||||
//****** "BBR测试......" ******
|
//****** "BBR测试......" ******
|
||||||
currentStatus = Application.Current.FindResource("DisplayInstallInfo_TestBBR").ToString();
|
currentStatus = Application.Current.FindResource("DisplayInstallInfo_TestBBR").ToString();
|
||||||
MainWindowsShowInfo(currentStatus);
|
MainWindowsShowInfo(currentStatus);
|
||||||
@ -5340,6 +5338,7 @@ namespace ProxySU
|
|||||||
//如果内核满足大于等于4.9,且还未启用BBR,则启用BBR
|
//如果内核满足大于等于4.9,且还未启用BBR,则启用BBR
|
||||||
if (detectResultBBR == true && resultCmdTestBBR.Contains("bbr") == false)
|
if (detectResultBBR == true && resultCmdTestBBR.Contains("bbr") == false)
|
||||||
{
|
{
|
||||||
|
SetUpProgressBarProcessing(60);
|
||||||
//****** "正在启用BBR......" ******
|
//****** "正在启用BBR......" ******
|
||||||
currentStatus = Application.Current.FindResource("DisplayInstallInfo_EnableBBR").ToString();
|
currentStatus = Application.Current.FindResource("DisplayInstallInfo_EnableBBR").ToString();
|
||||||
MainWindowsShowInfo(currentStatus);
|
MainWindowsShowInfo(currentStatus);
|
||||||
@ -5355,9 +5354,11 @@ namespace ProxySU
|
|||||||
}
|
}
|
||||||
else if (resultCmdTestBBR.Contains("bbr") == true)
|
else if (resultCmdTestBBR.Contains("bbr") == true)
|
||||||
{
|
{
|
||||||
|
SetUpProgressBarProcessing(100);
|
||||||
//****** "BBR已经启用了!" ******
|
//****** "BBR已经启用了!" ******
|
||||||
currentStatus = Application.Current.FindResource("DisplayInstallInfo_BBRisEnabled").ToString();
|
currentStatus = Application.Current.FindResource("DisplayInstallInfo_BBRisEnabled").ToString();
|
||||||
MainWindowsShowInfo(currentStatus);
|
MainWindowsShowInfo(currentStatus);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -5365,8 +5366,9 @@ namespace ProxySU
|
|||||||
currentStatus = Application.Current.FindResource("DisplayInstallInfo_BBRFailed").ToString();
|
currentStatus = Application.Current.FindResource("DisplayInstallInfo_BBRFailed").ToString();
|
||||||
MainWindowsShowInfo(currentStatus);
|
MainWindowsShowInfo(currentStatus);
|
||||||
}
|
}
|
||||||
client.Disconnect();//断开服务器ssh连接
|
|
||||||
|
|
||||||
|
client.Disconnect();//断开服务器ssh连接
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,5 +51,5 @@ using System.Windows;
|
|||||||
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
||||||
// 方法是按如下所示使用“*”: :
|
// 方法是按如下所示使用“*”: :
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("2.4.14.0")]
|
[assembly: AssemblyVersion("2.4.15.0")]
|
||||||
[assembly: AssemblyFileVersion("2.4.14.0")]
|
[assembly: AssemblyFileVersion("2.4.15.0")]
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user