mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
Some Xtream panels sit behind Cloudflare/WAF rules that challenge generic browser-looking User-Agents while allowlisting known IPTV player clients. The previous hardcoded, truncated browser-style User-Agent in xtream.events.ts (XTREAM_REQUEST and XTREAM_PROBE_URL) was being served a Cloudflare challenge page (HTTP 403 HTML) instead of the real API response, so "Test Connection" always failed with "Could not connect to the portal" even though the same portal worked fine via curl (with a player-style UA) and Safari. Switching to a shared VLC-style User-Agent constant across all three request sites resolves it, verified against a live panel. Co-authored-by: Sergio Herencias Redondo <sherencr@MacBook-Pro-de-diverzy.local> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>