fix: prevent streams from being proxied if urls match proxy or already have proxied set to true

This commit is contained in:
Viren070
2025-07-28 19:30:47 +01:00
parent 8ae8a9d840
commit 5320fcf80f
+10 -1
View File
@@ -14,7 +14,16 @@ class Proxifier {
private shouldProxyStream(stream: ParsedStream): boolean {
const streamService = stream.service ? stream.service.id : 'none';
const proxy = this.userData.proxy;
if (!stream.url || !proxy?.enabled) {
if (!stream.url || !proxy?.enabled || !proxy.url) {
return false;
}
if (stream.proxied) {
return false;
}
const streamUrl = new URL(stream.url);
const proxyUrl = new URL(proxy.url);
if (streamUrl.host === proxyUrl.host) {
stream.proxied = true;
return false;
}