Merge pull request #46 from mojienjoyment/python_testing

Force music.youtube.com to use the relay regardless of youtube_via_relay settings.
This commit is contained in:
Abolfazl Ghaemi
2026-05-11 16:00:40 +03:30
committed by GitHub
+5
View File
@@ -680,6 +680,11 @@ class ProxyServer:
1. Explicit entry in config `hosts` map (exact or suffix match).
2. Built-in `_SNI_REWRITE_SUFFIXES` → mapped to config `google_ip`.
"""
# Force 'music.youtube.com' to use the relay regardless of youtube_via_relay setting.
h = host.lower().rstrip(".")
if h == "music.youtube.com" or h.endswith(".music.youtube.com"):
return None
ip = self._hosts_ip(host)
if ip:
return ip