修复国家设置,允许不设置任何国家,不做判断

This commit is contained in:
root
2026-06-20 04:09:37 +08:00
parent 6b3b99b0f1
commit 24ff3f9657
11 changed files with 188 additions and 23 deletions
+10 -5
View File
@@ -2,6 +2,7 @@
require_once __DIR__ . '/../WhitelistGate.php';
require_once __DIR__ . '/../CloakJudgmentCache.php';
require_once __DIR__ . '/../RiskSecondaryGate.php';
require_once __DIR__ . '/../CountryAllowlist.php';
/**
* 流量判定主流水线
@@ -88,11 +89,15 @@ class CheckPipeline
return;
}
CloakPipelineTimer::stage('GeoIP国家判定');
include __DIR__ . '/stages/check_country_geoip.inc.php';
if (!empty($_SESSION['check_result'])) {
CloakPipelineTimer::finish();
return;
if (CountryAllowlist::isEnabled()) {
CloakPipelineTimer::stage('GeoIP国家判定');
include __DIR__ . '/stages/check_country_geoip.inc.php';
if (!empty($_SESSION['check_result'])) {
CloakPipelineTimer::finish();
return;
}
} elseif ($__cloak_debug_on) {
cloak_dbg_step(__LINE__, 'GeoIP国家判定', 'skip', '未开启国家条件');
}
CloakPipelineTimer::stage('广告来源限制');