Feature: NFController.CheckCore check Core.bin file

This commit is contained in:
ChsBuffer
2021-08-06 05:05:18 +08:00
parent 97fb20e326
commit 0165d080c6
3 changed files with 11 additions and 1 deletions

View File

@@ -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";

View File

@@ -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()

View File

@@ -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\" 文件!请检查你的杀毒软件。"
}