@officebeats/matrix-iptv-cli 4.0.17 → 4.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,68 +0,0 @@
1
- const http = require("http");
2
- const https = require("https");
3
- const url = require("url");
4
-
5
- const PORT = 8081;
6
-
7
- const server = http.createServer((req, res) => {
8
- // Enable CORS for all requests
9
- res.setHeader("Access-Control-Allow-Origin", "*");
10
- res.setHeader("Access-Control-Allow-Methods", "GET, POST, OPTIONS");
11
- res.setHeader("Access-Control-Allow-Headers", "Content-Type");
12
-
13
- if (req.method === "OPTIONS") {
14
- res.writeHead(200);
15
- res.end();
16
- return;
17
- }
18
-
19
- // Extract the actual target URL from the request URL path
20
- // Example: http://localhost:8080/http://provider.com/get...
21
- const requestUrl = req.url.slice(1); // Remove leading slash
22
-
23
- if (!requestUrl.startsWith("http")) {
24
- res.writeHead(400, { "Content-Type": "text/plain" });
25
- res.end("Usage: http://localhost:8080/<TARGET_URL>");
26
- return;
27
- }
28
-
29
- console.log(`[Proxy] Forwarding to: ${requestUrl}`);
30
- const parsedUrl = url.parse(requestUrl);
31
- console.log(`[Proxy] Target Host: ${parsedUrl.host}`);
32
-
33
- const protocol = parsedUrl.protocol === "https:" ? https : http;
34
-
35
- const headers = { ...req.headers };
36
- headers.host = parsedUrl.host;
37
- delete headers.origin;
38
- delete headers.referer;
39
-
40
- const options = {
41
- method: req.method,
42
- headers: headers,
43
- };
44
-
45
- const proxyReq = protocol.request(requestUrl, options, (proxyRes) => {
46
- console.log(`[Proxy] Target Status: ${proxyRes.statusCode}`);
47
- console.log(`[Proxy] Target Headers:`, proxyRes.headers);
48
-
49
- res.writeHead(proxyRes.statusCode, {
50
- ...proxyRes.headers,
51
- "Access-Control-Allow-Origin": "*",
52
- });
53
- proxyRes.pipe(res);
54
- });
55
-
56
- proxyReq.on("error", (err) => {
57
- console.error(`[Proxy Error] ${err.message}`);
58
- res.writeHead(500, { "Content-Type": "text/plain" });
59
- res.end(`Proxy Error: ${err.message}`);
60
- });
61
-
62
- req.pipe(proxyReq);
63
- });
64
-
65
- server.listen(PORT, () => {
66
- console.log(`\nšŸš€ CORS Proxy running at http://localhost:${PORT}`);
67
- console.log(`usage: http://localhost:${PORT}/<Target_URL>`);
68
- });
Binary file
Binary file
@@ -1,34 +0,0 @@
1
- fn main() {
2
- let mock_name = "US | MSNBC HEVC";
3
-
4
- // Stream layout extraction natively replicated to simulate Wave Terminal bugs
5
- let mut spans = vec![];
6
- let row_num = format!("{:>4} ", 1);
7
- spans.push(row_num);
8
- spans.push(" ".to_string()); // Used to be `│ `
9
-
10
- let c = format!("{:<30} ", "MSNBC HEVC");
11
- spans.push(c);
12
-
13
- println!("DEBUG: Stream constraint outputs - ");
14
- for span in spans {
15
- println!("--> '{}' (len {})", span, span.len());
16
- }
17
-
18
- // Category Grid constraints
19
- println!("\nDEBUG: Category 4-column output simulation - ");
20
- let max_name_len: usize = 20;
21
- let count: usize = 1205;
22
- let count_str = format!("{:04}", count); // Used to be `[{:04}]`
23
-
24
- let pre_pad = " "; // active
25
- let fav_marker = " ";
26
- let cat_icon = "šŸŽ¬ "; // 3 bytes, 2 chars visual? Unicode width handling is likely what breaks Wave
27
- let name_clean = format!("{}{}{} {}", pre_pad, fav_marker, cat_icon, "MOVIES");
28
-
29
- let padded_name = format!("{:<max_name_len$}", name_clean, max_name_len=max_name_len);
30
- println!("--> '{}' (len {} chars, {} bytes)", padded_name, padded_name.chars().count(), padded_name.len());
31
- println!("--> '{}' (len {})", count_str, count_str.len());
32
- println!("--> GAP: '{}' (len {})", "", "".len()); // Changed padding space to empty constraint
33
- }
34
-
package/test_config.json DELETED
@@ -1,85 +0,0 @@
1
- {
2
- "accounts": [
3
- {
4
- "name": "Strong 8K",
5
- "base_url": "http://zfruvync.duperab.xyz",
6
- "username": "PE1S9S8U",
7
- "password": "11EZZUMW",
8
- "epg_url": null,
9
- "last_refreshed": null,
10
- "total_channels": null,
11
- "total_movies": null,
12
- "total_series": null,
13
- "server_timezone": null
14
- },
15
- {
16
- "name": "Trex",
17
- "base_url": "http://line.offcial-trex.pro",
18
- "username": "3a6aae52fb",
19
- "password": "39c165888139",
20
- "epg_url": null,
21
- "last_refreshed": null,
22
- "total_channels": null,
23
- "total_movies": null,
24
- "total_series": null,
25
- "server_timezone": null
26
- },
27
- {
28
- "name": "Premium Mega 4k FHD",
29
- "base_url": "http://smarters.live:80",
30
- "username": "ZPY7BP5A",
31
- "password": "ZX2JVDNQ",
32
- "epg_url": null,
33
- "last_refreshed": null,
34
- "total_channels": null,
35
- "total_movies": null,
36
- "total_series": null,
37
- "server_timezone": null
38
- },
39
- {
40
- "name": "Promax 4k OTT",
41
- "base_url": "http://line.queen-4k.cc/",
42
- "username": "11D246",
43
- "password": "41D1C5",
44
- "epg_url": null,
45
- "last_refreshed": null,
46
- "total_channels": null,
47
- "total_movies": null,
48
- "total_series": null,
49
- "server_timezone": null
50
- },
51
- {
52
- "name": "Mega OTT 1",
53
- "base_url": "http://line.4smart.in",
54
- "username": "45Z88W6",
55
- "password": "Z7PHTX3",
56
- "epg_url": null,
57
- "last_refreshed": null,
58
- "total_channels": null,
59
- "total_movies": null,
60
- "total_series": null,
61
- "server_timezone": null
62
- },
63
- {
64
- "name": "Mega OTT 2",
65
- "base_url": "http://pwwkvdbn.qastertv.xyz",
66
- "username": "CZ2FWXLS",
67
- "password": "AQ9CFKL6",
68
- "epg_url": null,
69
- "last_refreshed": null,
70
- "total_channels": null,
71
- "total_movies": null,
72
- "total_series": null,
73
- "server_timezone": null
74
- }
75
- ],
76
- "last_used_account_index": null,
77
- "favorites": {
78
- "categories": [],
79
- "streams": [],
80
- "vod_categories": [],
81
- "vod_streams": []
82
- },
83
- "timezone": null,
84
- "american_mode": true
85
- }