Skip to content

[Bug]: T3 Connect treats a spawned but unreachable tunnel as 'running' #7447

Description

@DanielZamb

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. On macOS 26.5.2, connect the host to two active networks:
    • USB Ethernet is the default route and permits ordinary HTTPS, but blocks outbound TCP/UDP port 7844.
    • Wi-Fi permits outbound port 7844.
  2. Enable T3 Connect in the desktop app.
  3. Confirm the local environment is healthy:
   curl -i http://127.0.0.1:3773/.well-known/t3/environment

response line should be a HTTP/1.1 200 OK

  1. Confirm the route-specific behavior against a documented Cloudflare Tunnel edge address:

    nc -b en6 -G 3 -vz 198.41.192.107 7844
    # Operation timed out
    
    nc -b en0 -G 3 -vz 198.41.192.107 7844
    # succeeded
  2. Observe that the managed cloudflared child remains alive with a TCP connection stuck in SYN_SENT on port 7844; no Registered tunnel connection event occurs.

  3. Run the T3 Connect status path and attempt to open the linked environment from a remote client. (Android)

Expected behavior

T3 Code should distinguish “relay client process spawned” from “managed tunnel connected.” Until cloudflared reports a registered tunnel connection, status and user-facing errors should not report or imply that the connector is ready. When registration repeatedly fails, the diagnostic should preserve enough of cloudflared's warning output to direct the user toward blocked Cloudflare Tunnel egress.

Actual behavior

The server returns status: "running" immediately after spawning cloudflared, before observing a registered tunnel connection. The Android app later reports only:

Failed to connect. Reason: relay environment is unavailable

There is no user-facing indication that the connector has never registered or that Cloudflare Tunnel egress is blocked.

Relevant current-main behavior:

  • apps/server/src/cloud/ManagedEndpointRuntime.ts returns running based on child-process liveness and immediately after spawn.
  • The same module already classifies Registered tunnel connection and warning output, but the observed readiness is not reflected in runtime status.
Image

Impact

Major degradation or frequent failure

Version or commit

Desktop Alpha 0.0.33

Environment

macOS 26.5.2 (concurrent Wi-Fi and USB Ethernet conn), T3 Code Android

Logs or stack traces

Screenshots, recordings, or supporting files

No response

Workaround

  • Disable/unplug the filtered Ethernet interface or move Wi-Fi above it in network service order, then restart T3 Code.
  • Alternatively, allow outbound TCP and UDP port 7844 on the default network.

Activity

  1. added
    bugSomething is broken or behaving incorrectly.
    needs-triageIssue needs maintainer review and initial categorization.
    on Aug 18, 2026
  2. Benniphx commented on Sep 15, 2026

    @Benniphx

    Additional confirmation from T3 Code Desktop 0.0.40 on macOS, with the mobile client connecting through T3 Connect.

    On a network that permits normal HTTPS traffic but blocks Cloudflare Tunnel egress, I observed the following:

    • A TCP connection to a Cloudflare edge on port 7844 times out, while TCP 443 to the same edge succeeds.
    • The managed cloudflared process remains alive with its connection in SYN_SENT, but no tunnel connection is registered.
    • The desktop UI still says that the environment is available through T3 Connect. Activity notifications continue to arrive, but the mobile client cannot open the environment.
    • The same host and T3 configuration work from another network that permits port 7844.

    This is not specific to one workplace. It can affect corporate, hotel, guest, and public networks that allow standard HTTPS traffic but block other outbound ports.

    In addition to correcting the readiness status described in this issue, would it be feasible for T3 Connect to offer a fallback transport whose outbound connection uses TCP 443, such as an HTTPS/WebSocket-based relay, or another documented fallback for HTTPS-only networks? Since the standard cloudflared tunnel transport uses port 7844, this may require an alternative relay path rather than a configurable port. If that is not feasible with the current architecture, an explicit diagnostic saying that the managed tunnel did not register and that outbound TCP/UDP 7844 may be blocked would still make the failure much easier to understand.

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

    bugSomething is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions