mirror of
https://github.com/R0m1k3/xtremobile.git
synced 2026-10-11 17:29:26 +02:00
Merge pull request #29 from R0m1k3/antigravity
feat: implement initial server setup with API routing, static file se…
This commit is contained in:
commit
efb3cf806b
1 file changed
+7
-6
+7
-6
@@ -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
|
||||||
|
|||||||
Reference in new issue
Block a user