Merge pull request #29 from R0m1k3/antigravity

feat: implement initial server setup with API routing, static file se…
This commit is contained in:
LogiFlow authored and GitHub committed 2025-12-06 11:41:32 +01:00
commit efb3cf806b
1 file changed
+7 -6
+7 -6
View File
@@ -153,14 +153,15 @@ Handler _createXtreamProxyHandler() {
print('Proxying request to: $targetUrl'); print('Proxying request to: $targetUrl');
// Headers to simulate a legitimate IPTV client // Headers to simulate a legitimate IPTV client (VLC/Kodi style)
// Many IPTV servers check User-Agent and Referer to prevent unauthorized access // Many IPTV servers check User-Agent to prevent web playback
final proxyHeaders = { final proxyHeaders = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36', // Use VLC Media Player User-Agent - most IPTV servers whitelist this
'User-Agent': 'VLC/3.0.18 LibVLC/3.0.18',
'Accept': '*/*', 'Accept': '*/*',
'Accept-Language': 'en-US,en;q=0.9', 'Accept-Encoding': 'identity',
'Referer': baseUrl, 'Connection': 'keep-alive',
'Origin': baseUrl, 'Icy-MetaData': '1', // Common for IPTV streams
}; };
// Use simple http.get/post with timeout and proper headers // Use simple http.get/post with timeout and proper headers