Force music.youtube.com to use the relay regardless of youtube_via_relay setting

Split "music.youtube.com" from youtube_via_relay settings because of the "YouTube Music is not available in your area" massage.
This commit is contained in:
Moji
2026-05-06 01:50:04 +03:30
committed by GitHub
parent 603e96b631
commit 574ddbfb10
+5
View File
@@ -531,6 +531,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