Skip to content

mobile version of youtube on windows #340

Closed

Description

@ZaMo7890

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

Activity

  1. therealaleph commented on Apr 27, 2026

    @therealaleph
    Owner

    @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:

    1. 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.

    2. 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.

    3. 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]

  2. therealaleph commented on May 15, 2026

    @therealaleph
    Owner

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions