diff --git a/Netch/Constants.cs b/Netch/Constants.cs index 716639ad..e87dd354 100644 --- a/Netch/Constants.cs +++ b/Netch/Constants.cs @@ -7,6 +7,7 @@ public const string AioDnsRuleFile = "bin\\aiodns.conf"; public const string NFDriver = "bin\\nfdriver.sys"; + public const string NFCore = "bin\\core.bin"; public const string STUNServersFile = "bin\\stun.txt"; public const string LogFile = "logging\\application.log"; diff --git a/Netch/Controllers/NFController.cs b/Netch/Controllers/NFController.cs index b51df257..00f54457 100644 --- a/Netch/Controllers/NFController.cs +++ b/Netch/Controllers/NFController.cs @@ -34,6 +34,7 @@ namespace Netch.Controllers _mode = mode; _rdrConfig = Global.Settings.Redirector; CheckDriver(); + CheckCore(); Dial(NameList.TYPE_FILTERLOOPBACK, "false"); Dial(NameList.TYPE_FILTERICMP, "true"); @@ -160,6 +161,12 @@ namespace Netch.Controllers Dial(NameList.TYPE_BYPNAME, "^" + Global.NetchDir.ToRegexString() + @"((?!NTT\.exe).)*$"); } + private void CheckCore() + { + if (!File.Exists(Constants.NFCore)) + throw new MessageException(i18N.Translate("\"Core.bin\" is missing. Please check your Antivirus software")); + } + #region DriverUtil private static void CheckDriver() diff --git a/Netch/Resources/zh-CN b/Netch/Resources/zh-CN index 7e97dce7..7bdab97c 100644 --- a/Netch/Resources/zh-CN +++ b/Netch/Resources/zh-CN @@ -172,5 +172,7 @@ "Exit": "退出", "The {0} port is in use.": "{0} 端口已被占用", - "The {0} port is reserved by system.": "{0} 端口是系统保留端口" + "The {0} port is reserved by system.": "{0} 端口是系统保留端口", + + "\"Core.bin\" is missing. Please check your Antivirus software": "找不到 \"Core.bin\" 文件!请检查你的杀毒软件。" }