Skip to content

Commit 574ddbf

Browse files
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.
1 parent 603e96b commit 574ddbf

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/proxy/proxy_server.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,11 @@ def _sni_rewrite_ip(self, host: str) -> str | None:
531531
1. Explicit entry in config `hosts` map (exact or suffix match).
532532
2. Built-in `_SNI_REWRITE_SUFFIXES` → mapped to config `google_ip`.
533533
"""
534+
# Force 'music.youtube.com' to use the relay regardless of youtube_via_relay setting.
535+
h = host.lower().rstrip(".")
536+
if h == "music.youtube.com" or h.endswith(".music.youtube.com"):
537+
return None
538+
534539
ip = self._hosts_ip(host)
535540
if ip:
536541
return ip

0 commit comments

Comments
 (0)