update nekoray_core options

This commit is contained in:
arm64v8a
2023-04-18 09:47:17 +09:00
parent 54d8de64d0
commit 990f1006d1
9 changed files with 90 additions and 34 deletions

View File

@@ -119,11 +119,15 @@ namespace NekoRay::sys {
void CoreProcess::Start() {
show_stderr = false;
// set extra env
auto v2ray_asset_dir = FindCoreAsset("geoip.dat");
if (!v2ray_asset_dir.isEmpty()) {
v2ray_asset_dir = QFileInfo(v2ray_asset_dir).absolutePath();
env << "V2RAY_LOCATION_ASSET=" + v2ray_asset_dir;
}
if (NekoRay::dataStore->core_ray_direct_dns) env << "NKR_CORE_RAY_DIRECT_DNS=1";
if (NekoRay::dataStore->core_ray_windows_disable_auto_interface) env << "NKR_CORE_RAY_WINDOWS_DISABLE_AUTO_INTERFACE=1";
//
ExternalProcess::Start();
write((dataStore->core_token + "\n").toUtf8());
}