diff --git a/Netch/Controllers/HTTPController.cs b/Netch/Controllers/HTTPController.cs index b3fd005f..bccd135a 100644 --- a/Netch/Controllers/HTTPController.cs +++ b/Netch/Controllers/HTTPController.cs @@ -6,6 +6,8 @@ using Microsoft.Win32; using Netch.Models; using Netch.Utils; using WindowsProxy; +using Netch.Servers.Socks5; +using Netch.Servers.Trojan; using Netch.Utils.HttpProxyHandler; namespace Netch.Controllers @@ -39,7 +41,7 @@ namespace Netch.Controllers if (mode.Type == 3) { - if ((MainController.Server.Type is "Socks5" or "Trojan") && mode.BypassChina) + if ((MainController.Server is Socks5 or Trojan) && mode.BypassChina) { //启动PAC服务器 PACServerHandle.InitPACServer("127.0.0.1"); diff --git a/Netch/Forms/MainForm.Status.cs b/Netch/Forms/MainForm.Status.cs index 88e907e0..d2844072 100644 --- a/Netch/Forms/MainForm.Status.cs +++ b/Netch/Forms/MainForm.Status.cs @@ -72,7 +72,7 @@ namespace Netch.Forms //Socks5 Boolean s5BwFlag = true; - if (MainController.Server.Type is "Socks5") + if (MainController.Server is Socks5) { Socks5 SocksServer = (Socks5) MainController.Server; diff --git a/Netch/Resources/zh-CN b/Netch/Resources/zh-CN index 46b1a1c3..f4596a0c 100644 --- a/Netch/Resources/zh-CN +++ b/Netch/Resources/zh-CN @@ -129,6 +129,7 @@ "Add / Modify": "保存/修改", "Select a folder": "选择一个目录", "Please enter an process name (xxx.exe)": "请输入一个进程名(xxx.exe)", + "Rule does not conform to C++ regular expression syntax": "规则不符合C ++正则表达式语法", "Scan completed": "扫描完成", "Mode added successfully": "模式添加成功", "Mode updated successfully": "模式修改成功",