mirror of
https://github.com/Viren070/AIOStreams.git
synced 2025-12-01 23:14:04 +01:00
fix: prevent streams from being proxied if urls match proxy or already have proxied set to true
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user