Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/mobile
Steps to reproduce
- Link a host to T3 Connect and connect the iOS app to it once through T3 Connect, so the app learns the host's Tailscale route (
https://<host>.<tailnet>.ts.net). - Wait an hour, until the app's T3 Connect access token expires.
- Put the phone on a network where the relay's hostname (
*.t3coderelay.com) is unreachable butapp.t3.codesand Tailscale work. The phone's mobile network here is like this. I have not tried it, but blocking the relay hostname in a DNS filter on the phone should give the same. - Open the app.
Expected behavior
The app connects over the Tailscale route, which answers. The troubleshooting guide gives this as the fix when the device can't reach T3 Connect: "add a direct route to the host, such as its Tailscale address".
Actual behavior
The app shows no connection and retries every ~12 s; here it did so for 8 minutes, until I turned on a VPN on the phone that made the relay reachable, and then it connected at once. By the code below, a live connection over the Tailscale route also drops when its hour-long token runs out, since its renewal goes through the relay as well.
The host's server trace shows each attempt get as far as the Tailscale address and the cloud, and stop at the relay:
GET https://<host>.<tailnet>.ts.net/.well-known/t3/environmentfrom the app (T3Code/248): 200.POST /api/t3-connect/mint-credential, called by the cloud: 200.- Nothing more. With a VPN on the phone, the same attempt continues with
POST /oauth/tokenat the relay address (200), thenPOST /api/auth/websocket-ticket/rpc(200), and the socket opens.
A learned route has authorization: "t3-connect", so the resolver calls authorizeDpop with the route as directEndpoint. authorizeDpop checks the descriptor at the Tailscale address, but when no token is cached it gets one from exchangeDpopToken, which reads the descriptor and posts /oauth/token at bootstrap.endpoint.httpBaseUrl, the relay. HTTP requests over the route (authorizeDpopHttp) and the renewal of a live socket (renewDpopBeforeExpiry) mint through the same function, so they need the relay too. The server issues a T3 Connect DPoP token for one hour, so a learned route depends on the relay at least once an hour.
The host can redeem the credential at any of its addresses: /oauth/token checks the DPoP proof against the URL of the request it received, and the credential the cloud mints is bound to the device's key. So the fix is to exchange it at the route's own address, after checking the descriptor there. I have a PR for this.
Impact
Major degradation or frequent failure
Version or commit
Host 0.1.11-nightly.20261118.4864 (3e1b7c4); the code is the same on main at 8cf97b5. iOS app build 248.
Environment
Host: desktop app on Linux, Tailscale Serve on 443. Phone: iOS app (CFNetwork/3860.600.12, Darwin/25.5.0) on a mobile network where *.t3coderelay.com is unreachable.
Logs or stack traces
No response
Screenshots, recordings, or supporting files
No response
Workaround
Pair the Tailscale address directly with t3 pair --tailscale on the host and open the link on the phone. A paired route has its own bearer session and does not need the relay.
Model and harness: Claude Opus 5.5, Claude Code in T3 Code
Activity