diff --git a/src/configs/ConfigBuilder.cpp b/src/configs/ConfigBuilder.cpp index 2636737..b365d81 100644 --- a/src/configs/ConfigBuilder.cpp +++ b/src/configs/ConfigBuilder.cpp @@ -668,6 +668,8 @@ namespace NekoGui { } auto ruleSetArray = QJsonArray(); + auto geoSitePath = GetCoreAssetDir("geosite.db"); + auto geoIpPath = GetCoreAssetDir("geoip.db"); for (const auto &item: *neededRuleSets) { ruleSetArray += QJsonObject{ {"type", "local"}, @@ -677,7 +679,13 @@ namespace NekoGui { }; if (QFile(QString(RULE_SETS_DIR + "/%1.srs").arg(item)).exists()) continue; bool ok; - auto err = NekoGui_rpc::defaultClient->CompileGeoSet(&ok, item.contains("_IP") ? NekoGui_rpc::GeoRuleSetType::ip : NekoGui_rpc::GeoRuleSetType::site, item.toStdString(), GetBasePath()); + auto mode = NekoGui_rpc::GeoRuleSetType::site; + auto geoAssertPath = geoSitePath; + if (item.contains("_IP")) { + mode = NekoGui_rpc::GeoRuleSetType::ip; + geoAssertPath = geoIpPath; + } + auto err = NekoGui_rpc::defaultClient->CompileGeoSet(&ok, mode, item.toStdString(), geoAssertPath); if (!ok) { MW_show_log("Failed to generate rule set asset for " + item); status->result->error = err;