Skip to content

Commit 9909b9b

Browse files
therealalephclaude
andcommitted
docs(tunnel): document ngrok *.ngrok-free.dev block + alternative hosts (#924)
Multiple Iran-ISP users (#924 Recruit1992, #913 ehsan272727) report that ngrok's free tier now exclusively hands out *.ngrok-free.dev domains for new accounts, with no path to claim the older *.ngrok-free.app TLD. Some Iran ISPs (TCI, Irancell, IRMCI confirmed) block *.ngrok-free.dev at DNS or TCP. Symptom: curl from Iran network to ngrok URL times out, but works from non-Iran. Updates README.md and ngrok.md to: 1. Note the ngrok TLD shift (.app grandfathered, .dev for new accounts). 2. List ISPs confirmed to block *.ngrok-free.dev. 3. Add an "Alternative hosts" section recommending HuggingFace Spaces (Docker SDK) as the most Iran-friendly option in 2026 — permanent *.hf.space URL with no tunnel layer. 4. Update the URL behavior column for Method 2 since ngrok now gives a permanent dev domain by default (not "new URL each session"). No code changes — docs only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c437598 commit 9909b9b

2 files changed

Lines changed: 57 additions & 32 deletions

File tree

assets/github-actions-tunnel/README.md

Lines changed: 39 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,47 @@ its own guide with step-by-step instructions.
3131
| # | Method | Guide | Account Required | URL Behavior | Iran ISP friendly? |
3232
|---|---|---|---|---|---|
3333
| 1 | cloudflared Quick Tunnel | [cloudflared-quick.md][quick] | None | New URL each session | ⚠️ See note below |
34-
| 2 | ngrok Tunnel | [ngrok.md][ngrok] | ngrok (free) | New URL each session | ✅ Works |
34+
| 2 | ngrok Tunnel | [ngrok.md][ngrok] | ngrok (free) | **Permanent URL** | ⚠️ `.dev` TLD blocked on some ISPs |
3535
| 3 | cloudflared Named Tunnel | [cloudflared-named.md][named] | Cloudflare + domain | **Permanent URL** | ⚠️ See note below |
3636

37-
> **⚠️ Important — cloudflared methods may not work from Iran ISP.** Apps Script
38-
> outbound runs from Google datacenter IPs, which Cloudflare's anti-bot system
39-
> flags as bots and serves a 403 / Persian Google Docs error page (#849). This
40-
> blocks the Apps Script → trycloudflare.com / your-domain step. **If you're on
41-
> Iran ISP, start with Method 2 (ngrok) instead** — ngrok's edge IPs are not
42-
> on Cloudflare's flagged list. cloudflared Methods 1 and 3 may still work for
43-
> users on networks where Cloudflare's anti-bot heuristics aren't firing
44-
> against Apps Script's outbound, so they're documented for completeness.
45-
46-
**New to Full tunnel mode?** If you're on Iran ISP, start with [Method 2 (ngrok)][ngrok]
47-
— it's the most reliable. If you're on a network where CF anti-bot doesn't
48-
fire against Google datacenter IPs, [Method 1 (cloudflared Quick)][quick] is
49-
the simplest (no third-party signup).
50-
51-
**Need a stable URL that survives restarts?** Use [Method 3][named] — requires
52-
a one-time Cloudflare CLI setup but the URL never changes.
37+
> **⚠️ ngrok `*.ngrok-free.dev` block (early 2026).** Free-tier ngrok now
38+
> auto-assigns `*.ngrok-free.dev` domains exclusively for new accounts (the
39+
> older `*.ngrok-free.app` is grandfathered for existing accounts only and
40+
> cannot be claimed). Some Iran ISPs (TCI, Irancell, IRMCI confirmed via
41+
> #924) block `*.ngrok-free.dev` at DNS or TCP. Symptom: `curl` from your
42+
> network to your ngrok URL times out, but works from a non-Iran machine.
43+
> Workarounds: try **Method 1 (cloudflared Quick)** as a different TLD, or
44+
> pay $10/mo for ngrok Personal plan to get `*.ngrok.app` instead.
45+
>
46+
> **⚠️ cloudflared methods may not work from Iran ISP.** Apps Script
47+
> outbound runs from Google datacenter IPs, which Cloudflare's anti-bot
48+
> system sometimes flags as bots and serves a 403 / Persian Google Docs
49+
> error page (#849). cloudflared Methods 1 and 3 may still work for users
50+
> on networks where Cloudflare's anti-bot heuristics aren't firing against
51+
> Apps Script's outbound — try them and check.
52+
53+
**New to Full tunnel mode?** Try [Method 2 (ngrok)][ngrok] first — it's the
54+
fastest setup and gives a permanent URL on the free tier. If `*.ngrok-free.dev`
55+
is blocked on your ISP (curl times out), switch to [Method 1 (cloudflared
56+
Quick)][quick] — different TLD, sometimes passes where ngrok's `.dev`
57+
doesn't. If both fail, see the **Alternative hosts** section below.
58+
59+
**Need a stable URL on a CF-friendly domain?** Use [Method 3][named] — requires
60+
a one-time Cloudflare CLI setup with your own domain.
61+
62+
## Alternative hosts (when GitHub Actions tunnels don't work)
63+
64+
If both ngrok and cloudflared paths are blocked on your network, run
65+
`mhrv-tunnel-node` somewhere that doesn't rely on a third-party tunnel:
66+
67+
- **HuggingFace Spaces (Docker SDK)**: free, permanent `*.hf.space` URL,
68+
no tunnel layer needed. Create a Space → pick Docker SDK → small
69+
Dockerfile that runs `ghcr.io/therealaleph/mhrv-tunnel-node:latest`.
70+
16 GB storage, 2 vCPU. Most Iran-friendly option in 2026.
71+
- **Replit (Deno repl)**: signup with email, free tier. Run
72+
`mhrv-tunnel-node` and the Repl exposes a public URL.
73+
- **Your own VPS**: Hetzner / Vultr / DigitalOcean / ArvanCloud. ~$3-5/mo.
74+
See [tunnel-node README](../../tunnel-node/README.md) for Docker setup.
5375

5476
## Shared Requirements
5577

assets/github-actions-tunnel/ngrok.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -100,26 +100,29 @@ The tunnel shuts down after 6 hours. To start a new session:
100100
1. Go to the **Actions** tab
101101
2. Select **Full Tunnel (ngrok)**
102102
3. Click **Run workflow > Run workflow**
103-
4. Check the tunnel URL in the logs:
104-
- **Free tier with a static domain assigned** (default for new ngrok accounts):
105-
the URL is the same across runs — no `CodeFull.gs` update needed.
106-
- **Free tier without a static domain** (older ngrok accounts, or after
107-
`ngrok config delete-domain`): the URL is a fresh random
108-
`*.ngrok-free.app` each time. Copy it and update `TUNNEL_SERVER_URL`
109-
in `CodeFull.gs`, then redeploy.
103+
4. Check the tunnel URL in the logs. Each ngrok free account gets one
104+
auto-assigned **dev domain** that's permanent across runs — the URL is the
105+
same every time you re-run the workflow, so no `CodeFull.gs` update is
106+
needed after the initial setup.
110107

111108
## Limitations
112109

113110
- Requires an ngrok account (free tier: 1 online tunnel, limited connections
114-
per minute)
115-
- ngrok's free tier now includes one **static domain** per account, so the
116-
`*.ngrok-free.app` URL stays the same across workflow runs once assigned.
117-
Older accounts that opted out, or accounts that explicitly deleted the
118-
domain, get a fresh URL on every run and must redeploy `CodeFull.gs` each
119-
session.
120-
- 6-hour maximum per session (GitHub Actions limit)
111+
per minute).
112+
- **ngrok TLD note**: ngrok handed out `*.ngrok-free.app` domains until early
113+
2026; new free-tier accounts now get `*.ngrok-free.dev` instead, with no
114+
way to switch back. **Some Iran ISPs block `*.ngrok-free.dev` at the DNS
115+
layer.** If your tunnel works on a non-Iran network but `curl` from your
116+
Iran network times out at TCP, the `.dev` block is why. Workarounds:
117+
- Switch to **cloudflared Quick** (Method 1) — different TLD, often passes
118+
where ngrok's `.dev` doesn't.
119+
- Switch to **HuggingFace Spaces (Docker)** — run tunnel-node directly on
120+
a Space, get a permanent `*.hf.space` URL with no tunnel layer.
121+
- Pay for ngrok's $10/mo Personal plan to get a `*.ngrok.app` domain
122+
(the older, more widely allowlisted TLD).
123+
- 6-hour maximum per session (GitHub Actions limit).
121124
- Slightly higher latency than cloudflared methods (extra hop through ngrok's
122-
relay servers)
125+
relay servers).
123126

124127
## Troubleshooting
125128

0 commit comments

Comments
 (0)