Repository navigation
Description
I've been experimenting with youtube in google only mode and it seems to work but not reliable.
youtube successfully loads but doesn't play the video but if i wait for a few minutes it successfully plays the video with a 200 code in the network tab in dev tools but after playing for a minute or so it stops playing and in the network tab there's no response header for the googlevideo playback request and it fails with status (canceled) at exactly 7.23 seconds this keeps happening until it suddenly works again and gets a 200 response code
this keeps happening over and over.
also this works better in m.youtube.com
The success response:
request URL
https://rr3---sn-5ualdnlr.googlevideo.com/videoplayback?expire=1777310242&ei=wkXvab21Jp_S6dsP5q2VyQE&ip=217.218.30.236&id=o-AFPElgqVtzQcYuXkBDvVD91SEuW7X391O4HSvU6-Jv-s&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&rms=au%2Cau&siu=1&spc=96Xrv-HpEMJyO90hJLwKMY9A3TqsJH9zmvXKTuagzt-2kFP804HJ&svpuc=1&ns=AK8r-LeJBGrKKl4evdQOYFcU&sabr=1&rqh=1&keepalive=yes&fexp=51565115,51565682,51869322&c=WEB&n=-NbpB53PV_EIZw&sparams=expire%2Cei%2Cip%2Cid%2Csource%2Crequiressl%2Cxpc%2Csiu%2Cspc%2Csvpuc%2Cns%2Csabr%2Crqh&sig=AHEqNM4wRQIgPTWHWmGzGz3GJuERrFq4DWHkrSMCamFR_B38EByq6LQCIQDC7pBPW5mXcBhjJylSSuXb0ivgB53lpZgsmz7iMTm5iA%3D%3D&cpn=E3bYTbAIqHC1mn2H&cver=2.20260424.01.00&redirect_counter=1&rm=sn-4g5l767z&rrc=104&cms_redirect=yes&cmsv=e&cps=306&ipbypass=yes&met=1777288680,&mh=ID&mip=34.116.28.67&mm=31&mn=sn-5ualdnlr&ms=au&mt=1777288429&mv=m&mvi=3&pl=28&lsparams=cps,ipbypass,met,mh,mip,mm,mn,ms,mv,mvi,pl,rms&lsig=APaTxxMwRAIgcLEcczsqZncmmFooaBOsM9I8-mcUhdwvdPA7d00nzzMCIHcMwNXf6njD39SGStojaDNmYOthvmuhPiJ5T8UavugD&rn=28&alr=yes
Request Method
POST
Status Code
200 OK
Remote Address
127.0.0.1:10808
Referrer Policy
strict-origin-when-cross-origin
(no response headers)
Activity
therealaleph commentedon Apr 27, 2026
@mudsharp — the symptom (works briefly, fails at exactly 7.23s, recovers, repeats) is consistent with ISP-side throttling on
googlevideo.com, not an mhrv-rs internal failure. Here's why this happens specifically ingoogle_onlymode:google_onlymode +googlevideo.combypasses mhrv-rs entirely.In
google_onlymode, mhrv-rs only SNI-rewrites traffic to a few Google-edge hostnames (google.com,gmail.com, etc.).googlevideo.comis intentionally not in that SNI rewrite list — see proxy_server.rs:2727 for the comment. The reason: googlevideo is served by Google's separate "EVA" edge IPs, not the same set aswww.google.com's GFE — and SNI-rewritinggooglevideo.com:443to a GFE IP causes thegvs1content servers to refuse to serve video chunks (this was the regression in v1.7.4 → reverted in v1.7.6).So in
google_onlymode,googlevideo.com:443traffic goes direct TCP passthrough — your ISP sees the realgooglevideo.comSNI and can throttle it as it pleases. The 7.23s exact-time cutoff is a fingerprint of Iran ISP's per-domain traffic shaping (other users reported the same number on different videos — pretty consistent with a fixed budget / fixed connection-time policy).Three options to actually play YouTube reliably:
Switch to
apps_scriptmode + enableyoutube_via_relay{ "mode": "apps_script", "youtube_via_relay": true, // routes googlevideo through Apps Script ... }This sends
googlevideo.comrequests through Apps Script'sUrlFetchApp.fetch(), bypassing your ISP's per-domain throttle. Trade-off: Apps Script's response-buffer model has a 60-second cliff for SABR streaming (لود نشدن ویدیو های یوتیوب بیشتر از 59 ثانیه #300), so videos longer than ~1 minute may stall. Works for short clips reliably though.Switch to
fullmode + VPS (best video experience)docker run -d --name mhrv-tunnel -p 8443:8443 -e MHRV_AUTH_KEY=... ghcr.io/therealaleph/mhrv-tunnel-node:latest"mode": "full", "tunnel_url": "https://YOUR_VPS:8443", "tunnel_auth_key": "..."Stick with
google_onlyfor everything else, accept that YouTube is broken in this mode — the mode is designed for bootstrap (Search/Gmail/static Google services), not media streaming.About
m.youtube.comworking better: the mobile site uses different SABR cadence (more, smaller chunks vs. desktop's larger streaming chunks). Your ISP's throttle hits the desktop pattern harder. Not an mhrv-rs effect.Recommendation: option 1 (
youtube_via_relay) if you don't have a VPS — it's the single config flag toggle and works around your ISP's throttle without infrastructure cost. If you do have a VPS, option 2 is strictly better.For SABR-streaming-on-Apps-Script (option 1), the 60-second cliff is tracked at #300 — that's a separate architectural fix for v1.8.x (
googlevideo_ipconfig field to direct-connect googlevideo to a clean residential IP at the user's choice).[reply via Anthropic Claude | reviewed by @therealaleph]