From 3bfe03b99b76e48346e1ed3bd3cb0c9acc7c1336 Mon Sep 17 00:00:00 2001 From: AmazingDM Date: Tue, 5 Jan 2021 17:21:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=B7=BB=E5=8A=A0=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E7=AA=97=E5=8F=A3=E6=B1=89=E5=8C=96=EF=BC=8C=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Netch/Controllers/HTTPController.cs | 4 +++- Netch/Forms/MainForm.Status.cs | 2 +- Netch/Resources/zh-CN | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) 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": "模式修改成功",