You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Greetings. whenever i go to youtube in normal way without pressing relay its on windows version and the videos plays fine but when I press it goes to mobile version and its so slow and not playing
Thank you
@ZaMo7890 — this is YouTube serving the mobile site (m.youtube.com) when accessed via Apps Script. Two reasons:
1. User-Agent rewriting by Apps Script. When mhrv-rs forwards a request through Apps Script's UrlFetchApp.fetch(), Google's gateway always overrides the User-Agent header to Mozilla/5.0 (compatible; Google-Apps-Script). YouTube doesn't recognize this as a desktop browser, and serves the mobile redirect.
2. Geolocation by Apps Script's outbound IP. YouTube does country-based layout switching for some users. Apps Script's outbound IP is one of Google's datacenter IPs (US/EU/etc), which can trigger different defaults than your home Iran IP.
This is a known limitation of apps_script mode for YouTube specifically. mhrv-rs can't override the User-Agent because Apps Script overrides it server-side, after our request is rewritten.
Workarounds:
Use youtube_via_relay: true in config.json — even when YouTube serves the mobile layout, the actual video chunks now route through Apps Script (which ISP can't throttle). Mobile layout is uglier but videos play. Caveat: long videos (>~60s) hit the SABR cliff per #300.
Switch to Full mode + VPS — your VPS makes the request from a residential-or-non-Google IP, YouTube serves the desktop site as expected, no User-Agent mangling. This is the only path that gives a "normal" YouTube experience over mhrv-rs.
Use passthrough_hosts: ["youtube.com", "googlevideo.com"] — bypasses Apps Script for YouTube domains, going direct via upstream_socks5 if you have one configured. Useful only if your ISP doesn't filter googlevideo.com directly (most Iran ISPs do).
For the typical Iran user with no VPS: option 1 (youtube_via_relay) is the most realistic — accept the mobile layout in exchange for actual video playback.
Tracking the User-Agent issue as part of the Apps Script architectural limitations doc on the roadmap. There's no client-side fix in mhrv-rs itself; the only fix is bypassing Apps Script (Full mode) or living with mobile layout.
[reply via Anthropic Claude | reviewed by @therealaleph]
Activity
therealaleph commentedon Apr 27, 2026
@ZaMo7890 — this is YouTube serving the mobile site (
m.youtube.com) when accessed via Apps Script. Two reasons:1. User-Agent rewriting by Apps Script. When mhrv-rs forwards a request through Apps Script's
UrlFetchApp.fetch(), Google's gateway always overrides theUser-Agentheader toMozilla/5.0 (compatible; Google-Apps-Script). YouTube doesn't recognize this as a desktop browser, and serves the mobile redirect.2. Geolocation by Apps Script's outbound IP. YouTube does country-based layout switching for some users. Apps Script's outbound IP is one of Google's datacenter IPs (US/EU/etc), which can trigger different defaults than your home Iran IP.
This is a known limitation of
apps_scriptmode for YouTube specifically. mhrv-rs can't override the User-Agent because Apps Script overrides it server-side, after our request is rewritten.Workarounds:
Use
youtube_via_relay: trueinconfig.json— even when YouTube serves the mobile layout, the actual video chunks now route through Apps Script (which ISP can't throttle). Mobile layout is uglier but videos play. Caveat: long videos (>~60s) hit the SABR cliff per #300.Switch to
Full mode + VPS— your VPS makes the request from a residential-or-non-Google IP, YouTube serves the desktop site as expected, no User-Agent mangling. This is the only path that gives a "normal" YouTube experience over mhrv-rs.Use
passthrough_hosts: ["youtube.com", "googlevideo.com"]— bypasses Apps Script for YouTube domains, going direct viaupstream_socks5if you have one configured. Useful only if your ISP doesn't filtergooglevideo.comdirectly (most Iran ISPs do).For the typical Iran user with no VPS: option 1 (
youtube_via_relay) is the most realistic — accept the mobile layout in exchange for actual video playback.Tracking the User-Agent issue as part of the Apps Script architectural limitations doc on the roadmap. There's no client-side fix in mhrv-rs itself; the only fix is bypassing Apps Script (Full mode) or living with mobile layout.
[reply via Anthropic Claude | reviewed by @therealaleph]
therealaleph commentedon May 15, 2026
Closing this for now because there has not been a follow-up from the original reporter for more than 7 days.
If this is still happening on the latest release, please comment here or reopen with the current version, mode, relevant config shape, and fresh logs.
Answered via LLM, Supervised @therealaleph