mirror of
https://github.com/OwO-Network/DeepLX.git
synced 2026-12-01 14:57:52 +00:00
Pinning iosAppVersion made the impersonated iOS client profile go stale as soon as DeepL shipped an update: an iOS TLS fingerprint paired with a version DeepL no longer considers current is an inconsistent profile, and every oneshot request is then answered with HTTP 429 (OwO-Network/DLX#236). Resolve the version lazily from Apple's public lookup API instead, cache it for 24h (15m retry backoff, 3s timeout) and fall back to the pinned 26.42 when the lookup fails, so a failure degrades to the previous behaviour instead of breaking startup or a request. The User-Agent and app_information.app_version always carry the same resolved value, since a UA/body mismatch is itself a ban signal. app_build stays pinned because the lookup API does not expose CFBundleVersion. Approach modelled on tisfeng/Easydict#1341. No new dependencies. Refs: https://github.com/OwO-Network/DLX/issues/236