mirror of
https://github.com/netchx/netch.git
synced 2026-03-18 18:13:21 +08:00
Optimized code
This commit is contained in:
@@ -39,7 +39,7 @@ namespace Netch.Controllers
|
||||
|
||||
if (mode.Type == 3)
|
||||
{
|
||||
if ((MainController.Server.Type == "Socks5" || MainController.Server.Type == "Trojan") && mode.BypassChina)
|
||||
if ((MainController.Server.Type is "Socks5" or "Trojan") && mode.BypassChina)
|
||||
{
|
||||
//启动PAC服务器
|
||||
PACServerHandle.InitPACServer("127.0.0.1");
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace Netch.Forms
|
||||
|
||||
//Socks5
|
||||
Boolean s5BwFlag = true;
|
||||
if (MainController.Server.Type == "Socks5")
|
||||
if (MainController.Server.Type is "Socks5")
|
||||
{
|
||||
Socks5 SocksServer = (Socks5) MainController.Server;
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace Netch.Forms
|
||||
}
|
||||
|
||||
//Socks5无身份验证且为网页代理模式时无法统计流量不显示流量状态栏,Socks5有身份验证时将统计V2ray的流量
|
||||
if (s5BwFlag || (MainController.Mode.Type == 0 || MainController.Mode.Type == 1 || MainController.Mode.Type == 2))
|
||||
if (s5BwFlag || Models.ModeExtension.TestNatRequired(MainController.Mode))
|
||||
UsedBandwidthLabel.Visible /*= UploadSpeedLabel.Visible*/ = DownloadSpeedLabel.Visible = Global.Flags.IsWindows10Upper;
|
||||
break;
|
||||
case State.Stopping:
|
||||
|
||||
Reference in New Issue
Block a user