1
0
mirror of https://github.com/proxysu/ProxySU.git synced 2024-11-25 22:56:09 +03:00

优化启用BBR显示进度

This commit is contained in:
ProxySU 2020-10-27 10:14:50 +08:00
parent 2cac6c63ed
commit cf529a2a4d
4 changed files with 9 additions and 7 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.14" Height="675" Width="650">
Title="ProxySU - v2.4.15" Height="675" Width="650">
<!--以下样式参考自https://yq.aliyun.com/articles/331878
https://docs.microsoft.com/en-us/dotnet/desktop-wpf/fundamentals/styles-templates-overview-->
<Window.Resources>

View File

@ -85,9 +85,6 @@ namespace ProxySU
static string ipv4 = String.Empty; //保存获取的ipv4地址
static string ipv6 = String.Empty; //保存获取的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 string sshShellCommand = String.Empty; //定义保存执行的命令
static string currentStatus = String.Empty; //定议保存要显示的状态
@ -5323,6 +5320,7 @@ namespace ProxySU
functionResult = RootAuthorityDetect(client);
if (functionResult == false) { FunctionResultErr(); client.Disconnect(); return; }
SetUpProgressBarProcessing(30);
//****** "BBR测试......" ******
currentStatus = Application.Current.FindResource("DisplayInstallInfo_TestBBR").ToString();
MainWindowsShowInfo(currentStatus);
@ -5340,6 +5338,7 @@ namespace ProxySU
//如果内核满足大于等于4.9且还未启用BBR则启用BBR
if (detectResultBBR == true && resultCmdTestBBR.Contains("bbr") == false)
{
SetUpProgressBarProcessing(60);
//****** "正在启用BBR......" ******
currentStatus = Application.Current.FindResource("DisplayInstallInfo_EnableBBR").ToString();
MainWindowsShowInfo(currentStatus);
@ -5355,9 +5354,11 @@ namespace ProxySU
}
else if (resultCmdTestBBR.Contains("bbr") == true)
{
SetUpProgressBarProcessing(100);
//****** "BBR已经启用了" ******
currentStatus = Application.Current.FindResource("DisplayInstallInfo_BBRisEnabled").ToString();
MainWindowsShowInfo(currentStatus);
}
else
{
@ -5365,6 +5366,7 @@ namespace ProxySU
currentStatus = Application.Current.FindResource("DisplayInstallInfo_BBRFailed").ToString();
MainWindowsShowInfo(currentStatus);
}
client.Disconnect();//断开服务器ssh连接
return;

View File

@ -51,5 +51,5 @@ using System.Windows;
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.4.14.0")]
[assembly: AssemblyFileVersion("2.4.14.0")]
[assembly: AssemblyVersion("2.4.15.0")]
[assembly: AssemblyFileVersion("2.4.15.0")]

Binary file not shown.