Repository navigation
YouTube restricted mode/safe mode fix #986
Description
Activity
@Amin177a Works for me thanks
Reacted by Amin177aReviewed 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_relaymid-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/nextwhich 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.
Reacted by M94MReacted by Amin177a@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!damn theres some crazy fixes you all come up with, thanks works on firefox browser in windows and linux
Reacted by Amin177aI 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.Reacted by Amin177a, Alex2001i and johny1990-jpg
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:
The Solution
Follow these steps to combine normal playback speed with bypassed restrictions:
Ensure "Send YouTube through relay" is NOT activated in mhrv.
Open
youtube.comin 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.
Go to mhrv and now activate "send youtube through relay", click on "save config" and then restart mhrv.
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.
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.