asdsad
All checks were successful
Deploy / deploy-staging (push) Successful in 6s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-04-27 01:38:54 +02:00
parent bff852291e
commit 44945a31da
6 changed files with 83 additions and 13 deletions

View File

@@ -209,10 +209,18 @@ $detectApi = function (array $instance) use ($v6Auth, $v6RequestAny, $v5Request)
$authRes = $v6Auth($instance);
if (($authRes['ok'] ?? false) && !empty($authRes['sid'])) {
$sid = (string)$authRes['sid'];
$probe = $v6RequestAny($instance, ['dns/blocking', 'stats/summary', 'summary'], 'GET', [], $sid);
return ['version' => 6, 'sid' => $sid, 'probe' => $probe, 'auth' => $authRes];
}
$httpCode = (int)($authRes['http_code'] ?? 0);
if (in_array($httpCode, [401, 403], true)) {
return ['version' => 6, 'sid' => '', 'probe' => $authRes, 'auth' => $authRes];
}
}
$probe = $v6RequestAny($instance, ['stats/summary', 'summary'], 'GET', [], $sid);
$probe = $v6RequestAny($instance, ['dns/blocking', 'stats/summary', 'summary'], 'GET', [], $sid);
if ($probe['ok'] || in_array((int)($probe['http_code'] ?? 0), [401, 403], true)) {
return ['version' => 6, 'sid' => $sid, 'probe' => $probe, 'auth' => $authRes];
}
@@ -222,7 +230,7 @@ $detectApi = function (array $instance) use ($v6Auth, $v6RequestAny, $v5Request)
return ['version' => 5, 'sid' => '', 'probe' => $legacy];
}
return ['version' => 0, 'sid' => '', 'probe' => $probe, 'legacy' => $legacy];
return ['version' => 0, 'sid' => '', 'probe' => $probe, 'legacy' => $legacy, 'auth' => $authRes];
};
$debugResult = static function (string $label, string $instanceId, array $instance, array $result) use ($debugPush): void {