新增maxmind数据库本地判断国家,并且将优先级调整至最高
This commit is contained in:
@@ -248,6 +248,14 @@ $cfDomainOut = shell_exec(escapeshellarg(PHP_BINARY) . ' ' . escapeshellarg($roo
|
||||
$cfDomainJson = json_decode((string) $cfDomainOut, true);
|
||||
reg_assert('Cloudflare 域名自动化 Mock 流转', ($cfDomainJson['ok'] ?? false) === true, (string) $cfDomainOut);
|
||||
|
||||
$geoOut = shell_exec(escapeshellarg(PHP_BINARY) . ' ' . escapeshellarg($root . '/tools/verify_geoip.php') . ' 2>/dev/null');
|
||||
$geoJson = json_decode((string) $geoOut, true);
|
||||
if (($geoJson['tests']['db_file_exists'] ?? false) === true) {
|
||||
reg_assert('GeoIP 本地国家库', ($geoJson['ok'] ?? false) === true, (string) $geoOut);
|
||||
} else {
|
||||
reg_skip('GeoIP 本地国家库', 'mmdb 未安装,运行 php tools/setup_geoip_db.php');
|
||||
}
|
||||
|
||||
// ── 9. 数据库连通(可选) ─────────────────────────────────────
|
||||
echo "[9] 数据库\n";
|
||||
if (defined('DB_NAME')) {
|
||||
|
||||
Reference in New Issue
Block a user