Skip to content

امکان دسترسی به سرویس google colab #884

Description

@farshad-zamani

سلام ممنون برای اپلیکیشن و روش فوق العادتون، من درخواست داشتم که سرویس گوگل کولب که با این آدرس در دسترس میشه:
colab.research.google.com
رو هم به سایت هایی که این روش باز میکنه اضافه کنید. گوگل کولب سرویس فوق العاده ای هست که حتی میتونه در ادامه مکمل خوبی هم برای این پروژه بشه .

Activity

  1. therealaleph commented on May 8, 2026

    @therealaleph
    Owner

    Reviewed via Anthropic Claude.

    @farshadzz — colab.research.google.com در حالت پیش‌فرض از طریق mhrv-rs کار می‌کنه چون google.com در SNI_REWRITE_SUFFIXES است (هم research.google.com هم colab.research.google.com covered).

    اگر کار نمی‌کنه، چک‌های زیر:

    1. mhrv-rs --version — باید v1.9.17 یا بالاتر باشه
    2. CA cert نصب شده در browser truststore
    3. در browser cookies سایت google.com تازه — colab گاهی session اول https://accounts.google.com/v3/signin redirect می‌کنه که اون مسیر هم via SNI rewrite می‌گذره
    4. در browser DevTools Network tab وقتی colab باز می‌کنید، چک کنید request fail می‌کنه با چه HTTP status — اگر ۴۰۳/۴۲۹ ممکنه CF anti-bot fire شده باشه چون colab notebooks بعضی resource از *.googleusercontent.com بارگذاری می‌کنند که از Apps Script flag می‌شن.

    اگر مشکل با specific request ها هست (مثلاً kernel runtime not connecting چون WebSocket via Apps Script + bidi-streaming compatibility)، اون یه bug جدید است که نیاز به log + URL pattern داره — colab از wss://*.colab.googleapis.com برای kernel استفاده می‌کنه که ممکنه با Apps Script POST/response model سازگار نباشه.

    می‌گذارم open. لطفاً mhrv-rs --version + screenshot از browser DevTools Network tab وقتی colab fail می‌کنه post کنید.

  2. Montazeran8 commented on May 8, 2026

    @Montazeran8

    Reviewed via Anthropic Claude.

    @farshadzz — colab.research.google.com در حالت پیش‌فرض از طریق mhrv-rs کار می‌کنه چون google.com در SNI_REWRITE_SUFFIXES است (هم research.google.com هم colab.research.google.com covered).

    اگر کار نمی‌کنه، چک‌های زیر:

    1. mhrv-rs --version — باید v1.9.17 یا بالاتر باشه
    2. CA cert نصب شده در browser truststore
    3. در browser cookies سایت google.com تازه — colab گاهی session اول https://accounts.google.com/v3/signin redirect می‌کنه که اون مسیر هم via SNI rewrite می‌گذره
    4. در browser DevTools Network tab وقتی colab باز می‌کنید، چک کنید request fail می‌کنه با چه HTTP status — اگر ۴۰۳/۴۲۹ ممکنه CF anti-bot fire شده باشه چون colab notebooks بعضی resource از *.googleusercontent.com بارگذاری می‌کنند که از Apps Script flag می‌شن.

    اگر مشکل با specific request ها هست (مثلاً kernel runtime not connecting چون WebSocket via Apps Script + bidi-streaming compatibility)، اون یه bug جدید است که نیاز به log + URL pattern داره — colab از wss://*.colab.googleapis.com برای kernel استفاده می‌کنه که ممکنه با Apps Script POST/response model سازگار نباشه.

    می‌گذارم open. لطفاً mhrv-rs --version + screenshot از browser DevTools Network tab وقتی colab fail می‌کنه post کنید.

    Hello, I also have a problem opening https://colab.research.google.com/. The error in my browser's Developer Tools console is:

    GET https://colab.research.google.com/ 404 (Not Found)
    
  3. farshad-zamani commented on May 10, 2026

    @farshad-zamani
    Author

    @therealaleph Thank you for following up. I still haven’t been able to create an account on https://dash.deno.com/ because of internet restrictions and compatibility issues between that site and this connection method.

    However, I’m including the logs and screenshot you requested below in case they help identify a way to make https://colab.research.google.com/ work properly without requiring an exit node.


    Log output:
    2026-05-09T19:20:46.013366Z INFO dispatch colab.research.google.com:443 -> sni-rewrite tunnel (Google edge direct)
    2026-05-09T19:20:46.013379Z INFO SNI-rewrite tunnel -> colab.research.google.com:443 via 216.239.38.120 (outbound SNI=www.google.com)

    Image
    I’m also not sure whether these logs are related to loading the same link, but I’m including them below as well:
    2026-05-09T19:19:26.093285Z ERROR Relay failed: bad response: no json in: <title>Web App</title>

    The script completed but did not return anything.

    2026-05-09T19:19:26.559655Z INFO dispatch developers.googleapis.com:443 -> sni-rewrite tunnel (Google edge direct) 2026-05-09T19:19:26.559677Z INFO SNI-rewrite tunnel -> developers.googleapis.com:443 via 216.239.38.120 (outbound SNI=www.google.com) 2026-05-09T19:19:29.445183Z INFO HTTP GET http://x1.c.lencr.org/ 2026-05-09T19:19:42.500484Z INFO HTTP GET http://c.pki.goog/r/r4.crl 2026-05-09T19:19:50.783232Z INFO stats: relay=1650 (145842KB) failures=665 coalesced=6 cache=1/31 (3% hit, 10068KB) scripts=3/3 active h2-success=915/2157 (42%)
  4. therealaleph commented on May 10, 2026

    @therealaleph
    Owner

    Reviewed via Anthropic Claude.

    @farshadzz @Montazeran8 — log confirms the mechanism: mhrv-rs routes colab via SNI rewrite to 216.239.38.120 with outbound SNI=www.google.com, and the browser sees a 404. The 404 comes from Google's edge — the www.google.com-served GFE doesn't route the request to colab's backend even though the cert chain is valid (Google fronts many subdomains under one cert, but route-by-Host-header isn't universal).

    Three options, in order of effort:

    1. Try a different front_domain (5 minutes).
    Edit config.json, change:

    "front_domain": "www.google.com"

    to something like:

    "front_domain": "mail.google.com"

    or accounts.google.com. Each Google edge has its own routing table. One of them might route colab properly. Restart mhrv-rs and reload colab.

    2. Use an exit-node, OAuth-free options:

    • Replit: sign up with email (no OAuth). Create a new Repl → Deno → paste exit_node.ts + wrapper.ts. Free tier works.
    • HuggingFace Spaces: email signup, Docker SDK template runs wrapper.ts. Free tier.
    • Friend/family outside Iran: deploy on their VPS via Docker, share the URL. PSK secures it.

    Then add to config:

    "exit_node": {
      "enabled": true,
      "relay_url": "https://your-exit-node-url",
      "psk": "your-secret",
      "mode": "selective",
      "hosts": ["colab.research.google.com", "colab.googleusercontent.com"]
    }

    3. Wait for PR #977 — adds a relay_url_patterns config field that lets you specify "route this hostname through Apps Script relay instead of SNI rewrite", which is exactly the carve-out colab needs. PR is in community testing — track it for the resolution path.

    For Montazeran8's separate 404: same root cause likely. Try option 1 first — it's the lowest effort and might already work.

    Leaving open as the colab tracking issue. If option 1 (different front_domain) fixes it for either of you, please report which one — I can document the recommended override.

  5. Tooool-alt commented on May 10, 2026

    @Tooool-alt

    Reviewed via Anthropic Claude.

    @farshadzz @Montazeran8 — log confirms the mechanism: mhrv-rs routes colab via SNI rewrite to 216.239.38.120 with outbound SNI=www.google.com, and the browser sees a 404. The 404 comes from Google's edge — the www.google.com-served GFE doesn't route the request to colab's backend even though the cert chain is valid (Google fronts many subdomains under one cert, but route-by-Host-header isn't universal).

    Three options, in order of effort:

    1. Try a different front_domain (5 minutes). Edit config.json, change:

    "front_domain": "www.google.com"

    to something like:

    "front_domain": "mail.google.com"

    or accounts.google.com. Each Google edge has its own routing table. One of them might route colab properly. Restart mhrv-rs and reload colab.

    2. Use an exit-node, OAuth-free options:

    * **Replit**: sign up with email (no OAuth). Create a new Repl → Deno → paste `exit_node.ts` + `wrapper.ts`. Free tier works.
    
    * **HuggingFace Spaces**: email signup, Docker SDK template runs `wrapper.ts`. Free tier.
    
    * **Friend/family outside Iran**: deploy on their VPS via Docker, share the URL. PSK secures it.
    

    Then add to config:

    "exit_node": {
    "enabled": true,
    "relay_url": "https://your-exit-node-url",
    "psk": "your-secret",
    "mode": "selective",
    "hosts": ["colab.research.google.com", "colab.googleusercontent.com"]
    }

    3. Wait for PR #977 — adds a relay_url_patterns config field that lets you specify "route this hostname through Apps Script relay instead of SNI rewrite", which is exactly the carve-out colab needs. PR is in community testing — track it for the resolution path.

    For Montazeran8's separate 404: same root cause likely. Try option 1 first — it's the lowest effort and might already work.

    Leaving open as the colab tracking issue. If option 1 (different front_domain) fixes it for either of you, please report which one — I can document the recommended override.

    I'm using the windows-based version. There is no config.json file overhere. I also get that 404 error.

    Edit: Found it on this address: C:\Users...\AppData\Roaming\mhrv-rs\config
    Tried to check the num.1 option you suggested. I changed the front domain to several sub-domains such as accounts.google.com or mail.google.com but it didn't work for me.

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