Skip to content

feat(client): use the FTW Cloud tunnel without relay fallback - #95

Merged
frahlg merged 2 commits into
mainfrom
feat/cloud-tunnel
Oct 17, 2026
Merged

frahlg merged 2 commits into
mainfrom
feat/cloud-tunnel

Conversation

@frahlg

@frahlg frahlg commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

The web client still uses the Frankfurt relay while iPhone reaches its box through FTW Cloud. This change puts the web client's existing box session inside the same Cloud tun protocol, over WebSocket.

A current QR supplies the Cloud home id. Existing web users pair again; there is no migration bridge or relay fallback. The public bundle and CSP permit only FTW Cloud for the box connection. Passkeys keep the app.ftw.energy RP ID.

The outer Noise session authenticates FTW Cloud with its pinned service key. The inner Noise session still ends at the box: API reads, history and commands keep their existing handlers and checks. The readable copy can stay off. Pairing explains the stable home id, addresses and timing visible to Cloud. Its envelopes never enter UI state. A Web Lock gives a home one connection across visible tabs; a hidden tab releases it. Reconnects use fresh session ids and do not replay commands. Recovery blobs carry the home id, remain 512 bytes, and use format 3. Old copies require a fresh QR.

Paired Core change: srcfl/ftw#1683 enables QR v3 for linked boxes. Ship that Core release before publishing this client. The wire and registry do not change. This follows the decision on srcfl/ftw#1632; #87 stays paused.

Validation:

  • npm run check passed. All 1,126 enabled tests passed (npm test -- --maxWorkers=2 --testTimeout=15000); the longer runner timeout lets the existing bucket timing test finish on this Mac. Two opt-in tests skip by default. npm run build passed.
  • Go/Swift Cloud golden vectors, both Noise layers, pairing, reads, history, command results, key rotation, reconnect, old session ids, backgrounding, two tabs and stale-data UI.
  • Local real ftwcloudd at b2448d2 and Core with its relay unreachable: the shipped pairing/connect stack streamed, confirmed 30 commands and resumed five times. No physical hardware was used.
  • Browser review of live, stale and connecting labels, and an old QR refused before a passkey prompt. The built preview also shows the Cloud privacy text: https://feat-cloud-tunnel-ftw-webapp.sourceful-labs.workers.dev/. Human UI review remains required before publication.
  • Registry, push catalogue and design tokens match Core.

This does not deploy either app or stop Frankfurt. Core's old relay socket, iPhone's fallback, relay dead-man notifications and fleet collection still need the retirement step. Browser Cloud push, reading the optional Cloud copy, WebTransport and escrow hosting remain separate work.

Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ftw-webapp 9dea374 Commit Preview URL

Branch Preview URL
Oct 17 2026, 06:05 AM

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T06:06:04.741778Z 7ee3ea2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant