Skip to content

feat(wrangler): named tunnel support#13822

Draft
edmundhung wants to merge 5 commits intomainfrom
edmundhung/named-tunnel-wrangler
Draft

feat(wrangler): named tunnel support#13822
edmundhung wants to merge 5 commits intomainfrom
edmundhung/named-tunnel-wrangler

Conversation

@edmundhung
Copy link
Copy Markdown
Member

Fixes #[insert GH or internal issue link(s)].

Describe your change...


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because:

A picture of a cute animal (not mandatory, but encouraged)

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 5, 2026

🦋 Changeset detected

Latest commit: 4b7ba42

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 5, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@13822

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@13822

miniflare

npm i https://pkg.pr.new/miniflare@13822

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@13822

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@13822

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@13822

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@13822

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@13822

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@13822

wrangler

npm i https://pkg.pr.new/wrangler@13822

commit: 4b7ba42

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented May 5, 2026

I'm Bonk, and I've done a quick review of your PR.

This PR adds named tunnel support to wrangler dev via --tunnel=<name>, resolving tunnel configurations from the Cloudflare API and starting cloudflared tunnel run with the appropriate token.

  1. [t] hotkey silently no-ops for named tunnels — The [t] (extend expiry) hotkey at packages/wrangler/src/dev/hotkeys.ts:123 is enabled whenever args.tunnel is truthy, which includes named tunnel strings. But for named tunnels, extendExpiry() is a no-op since expiryTimeout is never set in startTunnel. The hotkey should be hidden for named tunnels since they don't have an expiry concept. Suggested fix:
- disabled: () => !args.tunnel,
+ disabled: () => args.tunnel !== true,

This way the [t] hotkey only appears for quick tunnels (args.tunnel === true), not for named tunnels (args.tunnel === "my-tunnel") or when tunnels are disabled.

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented May 5, 2026

I'm Bonk, and I've done a quick review of your PR.

This PR adds named tunnel support to wrangler dev via --tunnel=<name>, resolving tunnel configurations from the Cloudflare API and starting cloudflared tunnel run with the appropriate token.

One actionable issue found:

The [t] (extend expiry) hotkey at packages/wrangler/src/dev/hotkeys.ts:123 is enabled for named tunnels but silently does nothing, since named tunnels don't have expiry/reminder timers. Suggested fix: change disabled: () => !args.tunnel to disabled: () => args.tunnel !== true so it only appears for quick tunnels. Posted as a PR comment with the diff suggestion.

github run

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

✅ All changesets look good

@edmundhung edmundhung force-pushed the edmundhung/named-tunnel-wrangler branch from 12dbf4b to e983ebc Compare May 8, 2026 17:53
@edmundhung edmundhung force-pushed the edmundhung/named-tunnel-wrangler branch from e983ebc to 4b7ba42 Compare May 8, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

2 participants