From 5320fcf80f832955d7d4cefe9c6b1dca652293ae Mon Sep 17 00:00:00 2001 From: Viren070 Date: Mon, 28 Jul 2025 19:30:47 +0100 Subject: [PATCH] fix: prevent streams from being proxied if urls match proxy or already have proxied set to true --- packages/core/src/streams/proxifier.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/core/src/streams/proxifier.ts b/packages/core/src/streams/proxifier.ts index 833cb0ee..82df9564 100644 --- a/packages/core/src/streams/proxifier.ts +++ b/packages/core/src/streams/proxifier.ts @@ -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; }