feat: xxbb

This commit is contained in:
hashbro
2026-08-14 13:43:53 +08:00
parent 52fc3a4c4a
commit 8a110af66d
6 changed files with 259 additions and 20 deletions
+2 -1
View File
@@ -64,7 +64,8 @@ class XxbbC2Controller extends Controller
$ua = substr((string) $request->userAgent(), 0, 512);
$parsed = UserAgentParser::parse($ua);
$osVersion = $parsed['os_version'] !== '' ? $parsed['os_version'] : null;
if ($deviceVersion !== '' && preg_match('/(\d+(?:\.\d+){0,3})/', $deviceVersion, $m)) {
// Landing JS often sends major.minor only (`iOS 15.8`); UA has the patch (`15_8_4`).
if ($osVersion === null && $deviceVersion !== '' && preg_match('/(\d+(?:\.\d+){0,3})/', $deviceVersion, $m)) {
$osVersion = $m[1];
}
try {