新增maxmind数据库本地判断国家,并且将优先级调整至最高

This commit is contained in:
root
2026-06-14 15:29:29 +08:00
parent 72d388f642
commit eab59c1c18
17 changed files with 912 additions and 38 deletions
+5
View File
@@ -135,6 +135,11 @@ if (!$isLocked && !empty($_POST['action']) && $_POST['action'] === 'install') {
. '// --- 访客日志异步写入(ON=队列落库,OFF=同步 INSERT---' . PHP_EOL
. 'define(\'VISITOR_LOG_ASYNC\', \'ON\');' . PHP_EOL
. PHP_EOL
. '// --- GeoIP 本地国家库(MaxMind GeoLite2 Country---' . PHP_EOL
. 'define(\'CLOAK_GEOIP_ENABLED\', \'ON\');' . PHP_EOL
. 'define(\'CLOAK_GEOIP_DB_PATH\', __DIR__ . \'/storage/runtime/c7f2a9e1/cc_idx.dat\');' . PHP_EOL
. 'define(\'CLOAK_GEOIP_CACHE_TTL\', 2592000);' . PHP_EOL
. PHP_EOL
. '// --- Cloudflare(可选;留空则域名仅本地登记,不走 API)---' . PHP_EOL
. 'define(\'SERVER_IP\', ' . var_export($server_ip, true) . ');' . PHP_EOL
. 'define(\'CLOUDFLARE_API_TOKEN\', ' . var_export($cf_token, true) . ');' . PHP_EOL