Skip to content

Commit 156ea14

Browse files
authored
Merge pull request #46 from mojienjoyment/python_testing
Force music.youtube.com to use the relay regardless of youtube_via_relay settings.
2 parents b841419 + 574ddbf commit 156ea14

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
@@ -680,6 +680,11 @@ def _sni_rewrite_ip(self, host: str) -> str | None:
680680
1. Explicit entry in config `hosts` map (exact or suffix match).
681681
2. Built-in `_SNI_REWRITE_SUFFIXES` → mapped to config `google_ip`.
682682
"""
683+
# Force 'music.youtube.com' to use the relay regardless of youtube_via_relay setting.
684+
h = host.lower().rstrip(".")
685+
if h == "music.youtube.com" or h.endswith(".music.youtube.com"):
686+
return None
687+
683688
ip = self._hosts_ip(host)
684689
if ip:
685690
return ip

0 commit comments

Comments
 (0)