mirror of
https://github.com/R0m1k3/xtremobile.git
synced 2026-10-11 17:29:26 +02:00
feat: implement initial server setup with API routing, static file serving, Xtream proxy, and CORS middleware.
This commit is contained in:
1 parent
62ba2d33b9
commit
0ed1d19ea0
1 file changed
+7
-6
+7
-6
@@ -153,14 +153,15 @@ Handler _createXtreamProxyHandler() {
|
||||
|
||||
print('Proxying request to: $targetUrl');
|
||||
|
||||
// Headers to simulate a legitimate IPTV client
|
||||
// Many IPTV servers check User-Agent and Referer to prevent unauthorized access
|
||||
// Headers to simulate a legitimate IPTV client (VLC/Kodi style)
|
||||
// Many IPTV servers check User-Agent to prevent web playback
|
||||
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-Language': 'en-US,en;q=0.9',
|
||||
'Referer': baseUrl,
|
||||
'Origin': baseUrl,
|
||||
'Accept-Encoding': 'identity',
|
||||
'Connection': 'keep-alive',
|
||||
'Icy-MetaData': '1', // Common for IPTV streams
|
||||
};
|
||||
|
||||
// Use simple http.get/post with timeout and proper headers
|
||||
|
||||
Reference in new issue
Block a user