You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support Ephemeral Direct Tunnels via Cloudflare Quick Tunnels (trycloudflare.com) and Tailscale tailcat#37309
Support Ephemeral Direct Tunnels via Cloudflare Quick Tunnels (trycloudflare.com) and Tailscale tailcat
Problem
Today, connecting remote environments, transferring files, and previewing agent-started web servers in T3 Code runs into two architectural bottlenecks:
Relay Cost & the 3-Host T3 Connect Limit: T3 Connect relies on T3's managed relay infrastructure, which forces a 3-host limit due to bandwidth and hosting costs (Discussion #14800). Any traffic—including large binary downloads, terminal streams, or proxied dev-server previews—routed through T3 Connect adds load and cost to T3's central relay.
High Friction of Full Mesh VPNs / Named Tunnels: While full Tailscale or Cloudflare Zero Trust tunnels are common workarounds, they require account creation, OAuth/SSO configuration, persistent tailnet device management, or OS-level VPN permissions that aren't possible on every client device or ephemeral sandbox (Discussion #26726, Discussion #20224).
Meanwhile, T3 Code already bundles and manages cloudflared (~/.t3/tools/cloudflared) for T3 Connect (Issue #25567, Issue #31468), and Tailscale recently open-sourced Tailcat (tailscale/tailcat)—an accountless, peer-to-peer netcat-style CLI built on Tailscale's WireGuard and NAT-traversal data plane without the Tailscale control plane.
Proposal
Add native, opt-in support for accountless, ephemeral direct tunnels using Cloudflare Quick Tunnels (cloudflared tunnel --url) and Tailscale Tailcat (tailcat) as transport and port-exposure drivers alongside T3 Connect, LAN, and Tailscale.
Because neither transport passes data through T3's relay servers, T3 incurs zero bandwidth or infrastructure cost, while users get instant encrypted connectivity for environments, dev servers, and file transfers.
Quick Tunnel Pairing: t3 serve / Desktop can spawn cloudflared tunnel --url http://localhost:3773 using the already-installed cloudflared binary (Issue #25567) and encode the generated https://<random>.trycloudflare.com endpoint into the t3 pair QR code / pairing token.
Tailcat Pairing: For Desktop-to-Server or Server-to-Server links (including linked environments in Discussion #14800), T3 can listen over a Tailcat address, establishing a direct peer-to-peer WireGuard connection across NATs without touching T3 Connect's relay.
Impact: Users can connect unlimited machines, VMs, and containers with valid HTTPS (trycloudflare.com) or WireGuard encryption (tailcat) without consuming any of their 3 T3 Connect relay slots.
2. Instant Local Browser Rendering & Port Forwarding for Remote Agent Web Servers
When an agent starts a dev server (e.g., Vite on localhost:5173) on a remote machine, streaming the remote browser tab as compressed video frames causes input/scroll latency (Discussion #26726).
With Quick Tunnels, T3 Code (or the agent via an MCP tool / Processes UI button from Discussion #17456) can expose localhost:5173 on demand via cloudflared tunnel --url http://localhost:5173 (optionally gated by --allowed-mail or a signed T3 preview cookie/token). The user's local desktop or mobile browser renders the app natively with full WebSocket/HMR support and zero T3 relay traffic.
With Tailcat, T3 Desktop can tunnel the remote localhost port directly over a P2P WireGuard stream to a local loopback port on the reviewer's machine—keeping the dev server completely off the public internet while enabling local DOM inspection, annotations, and Playwright testing (Discussion #26726).
In Discussion #17605, contributors noted that downloading large build artifacts (100 MB+ APKs, archives, logs, or Office files) over T3 Connect routes all bytes through the managed relay with unknown size/timeout limits. Similarly, Discussion #31985 highlights the 50 MiB upload cap when sending large local files to a remote agent.
Tailcat is specifically designed for piping files and directories directly between machines and AI agent sandboxes over a direct NAT-traversed WireGuard stream.
When a user clicks Download (Discussion #17605) or attaches an oversized file (Discussion #31985), T3 can negotiate an ephemeral Tailcat stream (or temporary Quick Tunnel) so gigabyte-scale files transfer directly peer-to-peer between client and environment.
4. Zero-Config Ephemeral Cloud Sandboxes & No OS VPN Pop-ups
Provisioning disposable cloud sandboxes (Discussion #27949, Discussion #18019) currently requires either burning a T3 Connect slot or setting up a Tailscale OAuth client to join/remove ephemeral nodes on a tailnet. Both Cloudflare Quick Tunnels and Tailcat require zero pre-configured secrets or accounts, and automatically vanish the moment the sandbox process stops.
Because Tailcat runs entirely in userspace without installing a system VPN profile or modifying OS routing tables (OpenVPN Tailcat overview), it never triggers the recurring macOS "Tailscale would like to add VPN configurations" dialog reported in Discussion #20224.
Known Limitations & Design Guardrails
Cloudflare Quick Tunnel Limits: Per Cloudflare's Quick Tunnels documentation, Quick Tunnels cap at 200 in-flight requests, do not support Server-Sent Events (SSE)—meaning T3's WebSocket RPC works, while SSE endpoints must use WebSockets or Tailcat—and generate a new *.trycloudflare.com hostname on restart. If the host environment pairs via T3 Connect (1 slot), the server can dynamically push updated Quick Tunnel port-preview URLs over the existing control channel whenever a dev server restarts.
Security & Origin Isolation: Any dev-server port exposed via Quick Tunnel should default to an authenticated proxy wrapper or --allowed-mail PIN (Cloudflare Quick Tunnels), combined with the Origin / Host loopback isolation checks discussed in Discussion #26726 so an exposed app on :5173 cannot reach T3's own loopback control ports.
[!NOTE]> 🤖 Researched and drafted with Gemini 4 Argon
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Support Ephemeral Direct Tunnels via Cloudflare Quick Tunnels (
trycloudflare.com) and TailscaletailcatProblem
Today, connecting remote environments, transferring files, and previewing agent-started web servers in T3 Code runs into two architectural bottlenecks:
Meanwhile, T3 Code already bundles and manages
cloudflared(~/.t3/tools/cloudflared) for T3 Connect (Issue #25567, Issue #31468), and Tailscale recently open-sourced Tailcat (tailscale/tailcat)—an accountless, peer-to-peer netcat-style CLI built on Tailscale's WireGuard and NAT-traversal data plane without the Tailscale control plane.Proposal
Add native, opt-in support for accountless, ephemeral direct tunnels using Cloudflare Quick Tunnels (
cloudflared tunnel --url) and Tailscale Tailcat (tailcat) as transport and port-exposure drivers alongside T3 Connect, LAN, and Tailscale.Because neither transport passes data through T3's relay servers, T3 incurs zero bandwidth or infrastructure cost, while users get instant encrypted connectivity for environments, dev servers, and file transfers.
*.trycloudflare.com)magicsock) with DERP fallbackcloudflaredbinary (Issue #25567)tailscale/tailcat)--allowed-mailone-time PIN email verificationtailcataddress + optional key allowlistKey Features & How This Solves Existing Discussions
1. Remove the 3-Host Limit for Self-Routed Environments
t3 serve/ Desktop can spawncloudflared tunnel --url http://localhost:3773using the already-installedcloudflaredbinary (Issue #25567) and encode the generatedhttps://<random>.trycloudflare.comendpoint into thet3 pairQR code / pairing token.trycloudflare.com) or WireGuard encryption (tailcat) without consuming any of their 3 T3 Connect relay slots.2. Instant Local Browser Rendering & Port Forwarding for Remote Agent Web Servers
localhost:5173) on a remote machine, streaming the remote browser tab as compressed video frames causes input/scroll latency (Discussion #26726).localhost:5173on demand viacloudflared tunnel --url http://localhost:5173(optionally gated by--allowed-mailor a signed T3 preview cookie/token). The user's local desktop or mobile browser renders the app natively with full WebSocket/HMR support and zero T3 relay traffic.localhostport directly over a P2P WireGuard stream to a local loopback port on the reviewer's machine—keeping the dev server completely off the public internet while enabling local DOM inspection, annotations, and Playwright testing (Discussion #26726).3. Direct, Unthrottled File Transfers (Uploads & Downloads)
4. Zero-Config Ephemeral Cloud Sandboxes & No OS VPN Pop-ups
"Tailscale would like to add VPN configurations"dialog reported in Discussion #20224.Known Limitations & Design Guardrails
*.trycloudflare.comhostname on restart. If the host environment pairs via T3 Connect (1 slot), the server can dynamically push updated Quick Tunnel port-preview URLs over the existing control channel whenever a dev server restarts.--allowed-mailPIN (Cloudflare Quick Tunnels), combined with theOrigin/Hostloopback isolation checks discussed in Discussion #26726 so an exposed app on:5173cannot reach T3's own loopback control ports.All reactions