Skip to content

YouTube restricted mode/safe mode fix #986

Description

@Amin177a

I know this solution isn't elegant, but it's a workaround that allows one to bypass YouTube’s Restricted mode entirely and at the same time watch the videos in normal speed.

Current situation

mhrv currently offers two options:

  1. "Send youtube through relay": Videos play extremely slow or stop after 60 seconds, but restricted mode is bypassed.
  2. "NOT Send youtube through relay": Videos play at normal speed, but Restricted Mode remains active (blocking videos and comments).

The Solution

Follow these steps to combine normal playback speed with bypassed restrictions:

  1. Ensure "Send YouTube through relay" is NOT activated in mhrv.
    Open youtube.com in a browser tab.
    Click on a video, perform a search, or open the "Watch Later" section to load a specific page.
    Important note: Do not open them as a new tab. You must use the same tab in entire process.

  2. Go to mhrv and now activate "send youtube through relay", click on "save config" and then restart mhrv.

  3. Return to your Youtube tab and then perform a new action (e.g., search for a video or click on a channel), or simply click the YouTube logo on the top-left corner.

  4. Now that Restricted Mode is bypassed, you can search for your desired topic and be able to see the videos that were previously hidden.
    You can now watch restricted videos in normal quality/speed, view comments, and browse all the contents.

Important Limitations & Cautions

Please be aware that this workaround is unstable and temporary. It is not a permanent fix and comes with significant restrictions:

  • Tab-Specific Only: The bypass only works on the specific tab where you've already opened before activating "send youtube through relay". It does not affect other tabs, and you cannot simply open your desired video on a new tab and expect it to work.

  • Volatility on Refresh: If you refresh the page or reload the tab, Restricted Mode will immediately re-activate, blocking content again. So you must re-apply the workaround.

  • Short Time Window To Choose Video: The bypass is effective for only a few minutes. If you do not find and start watching your desired video within this short window, the restriction might automatically re-engage.

  • Re-application Required: If you have watched a video with this solution for a decent amount of time, you can watch that video to the end and also interact with the comments section, but the moment you attempt to search for a new video, click on a different video, or navigate away from the current content, the workaround might fail, and Restricted Mode locks the page again.
    Then you must restart the entire process from Step 1. (Loading youtube without "Youtube relay", etc)

Hope this helps! I'd love to hear if this works for you.

Activity

  1. sinkisupkeys-ops commented on May 9, 2026

    @sinkisupkeys-ops

    @Amin177a Works for me thanks

  2. therealaleph commented on May 10, 2026

    @therealaleph
    Owner

    Reviewed via Anthropic Claude.

    @Amin177a — clever workaround, thanks for documenting it carefully. This pairs nicely with @Sherrybmd's ?t= increment trick in #942 and helps explain a piece of the SABR cliff mechanism:

    The reason the workaround works is that YouTube's session state (cookies + service-worker cache + initial page bootstrap) snapshots when you first load a tab. When you then flip youtube_via_relay mid-session, subsequent navigations within the SAME tab inherit the un-restricted session state from the original load AND now route via Apps Script — so the player JS thinks it's not restricted (because the bootstrap script said so) but the actual video chunk fetches go through relay.

    Why it expires after a few minutes: YouTube's player periodically re-bootstraps to refresh signed URLs / ad config / session tokens. Each re-bootstrap pings youtubei/v1/next which sees the relay's IP and re-applies restricted mode.

    This mechanism + #942's t= URL trick + PR #977's SABR strip are three independent angles on the same problem. None is a permanent fix on its own; combined they buy meaningful uptime.

    Adding a doc note for this workaround in the README's troubleshooting section. Thanks for the careful empirical writeup — this is the kind of thing that helps narrow the problem space.

    Leaving open as a community-known-workaround tracking thread until PR #977 (SABR strip) lands.

  3. Amin177a commented on May 10, 2026

    @Amin177a
    Author

    @khatagha Your solution worked for me on android via chrome, but it didn’t work on any of my windows browsers, even with NextDNS or your recommended DNS url.
    Thanks for sharing!

  4. Sherrybmd commented on May 10, 2026

    @Sherrybmd

    damn theres some crazy fixes you all come up with, thanks works on firefox browser in windows and linux

  5. narimoos commented on May 10, 2026

    @narimoos

    I am using almost similar method to rech youtube. I couldn't login to my youtube account directly from a normal tab in chrome by android. Due to during loging process the android opens their own google account app which is not relay throug mhrv-rs. But i open youtube in a incognito tab when the "send youtube through relay" is off. In this way easily i can login in my youtube account, then i just keep the incognito youtube tab open and disconnect the mhrv-rs, turn the "youtube through relay" on, and then reconnect the mhrv-rs. In this way youtube work smoothly.
    Two tips:
    1: i couldn't loging to youtube in incognito mode when "send youtube through relay" is on.
    2: if the "send youtube through relay" is off, some videos are not loaded more than 59 seconds even if i login in whit my account.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions