Skip to content

Question #69

Closed
Closed

Description

@creep247

Can you explain why bootstrap mode can open youtube.com but videos do not play? Is there any way to open and play videos in bootstrap mode without using our Google fetcher quotas?
Also please respond to issue 54. Thanks.

Activity

  1. therealaleph commented on Apr 23, 2026

    @therealaleph
    Owner

    Good question. Short version: in google_only (bootstrap) mode, YouTube pages load because the page itself is served from Google's GFE edge (www.youtube.com) which our SNI-rewrite tunnel reaches, but the actual video bytes come from googlevideo.com, which currently falls through to plain-TCP passthrough in google_only mode — and in most Iranian ISPs that IP range is DPI-dropped.

    Why googlevideo.com doesn't get SNI-rewritten in google_only:

    • It's covered in SNI_REWRITE_SUFFIXES — gvt1.com, gvt2.com, ytimg.com, googlevideo.com are all in there (added in v1.1.4).
    • But the actual behaviour depends on DNS resolution: googlevideo.com serves video chunks from rr1---sn-…googlevideo.com subdomains whose A records are NOT in the GFE IP range — they're on separate Google "corp" CDN IPs. Our SNI-rewrite uses google_ip which points at GFE. If we send Host: rr1---sn-xxx.googlevideo.com to a GFE IP with SNI-rewritten-to-www.google.com, the GFE can't route it back to a googlevideo backend — it 404s or hangs.
    • In apps_script mode this works because the Apps Script fetcher resolves rr1---sn-xxx.googlevideo.com on Google's internal DNS and fetches it from the correct internal IP, then relays the bytes back. In google_only mode there's no fetcher, so this routing doesn't happen.

    Is there a way to play videos in bootstrap mode without using quota?

    Only if your ISP lets you reach googlevideo.com IPs directly (not via SNI rewrite — via their real DNS). Test:

    curl -v https://rr1---sn-npoldn76.googlevideo.com/ 2>&1 | grep -E "Connected|handshake"
    

    If that times out on your ISP, direct googlevideo is blocked and there's no way around using Apps Script quota for video chunks.

    Re issue #54 (outbound proxy): already responded and closed — upstream_socks5 in config already supports this. All Apps Script fetches + plain-TCP passthroughs egress via that SOCKS5 (say, your Netherlands VPS). Cloudflare then sees your VPS IP, not Google's fetcher.


    [reply via Anthropic Claude | reviewed by @therealaleph]

  2. therealaleph commented on Apr 24, 2026

    @therealaleph
    Owner

    @creep247 heads up — if this is resolved on your end, you can close the issue. Otherwise it'll auto-close in 24 hours unless you post an update. Not a hard deadline, just keeping the queue tidy.


    [reply via Anthropic Claude | reviewed by @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