Repository navigation
Conversation
Port the Frankfurt relay's wire onto this server so a client can switch by changing the origin. /r/, /x/ and /deadman forward end-to-end Noise frames and do not read them. /v1/box stays the five-message downlink; the two sockets do not multiplex. Box-key proofs are accepted and not required. The fleet ping stays on relay.ftw.energy. Nothing here changes DNS or the running host. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
FTW Cloud can now speak the Frankfurt relay's protocol, so
cloud.ftw.energycan take the place ofrelay.ftw.energyonce clients point at it. This PR does not change DNS, the running host, or the Frankfurt process.The path is separate from
/v1/box. That socket carries signed cloud envelopes, and its downlink is still onlychallenge,hello_ok,watch,resyncandpurged. Command frames are raw Noise, andready/goneare not those five messages. Multiplexing the two would make this service parse commands, or make the box drop the uplink. Apps also dial with anOrigin, which/v1/boxrefuses.internal/relayforwards bytes and reads two things off them: their length, and, on the exchange socket, the 16-byte id it wrote there itself. It does not import the store, the uplink, or a Noise session.GET(upgrade)/r/<epoch>/<handle>/<box|app|exchange>— same close codes (4400, 4409, 4410, 4429),ready/gone, one box and one exchange socket, four app streams, hourly handles spread over five minutes.POST /x/<epoch>/<handle>— body 608 or 536, reply unchanged, previous epoch accepted during the rotation window, no CORS.POST/DELETE /deadman— sealed push ciphertext, persisted at/state/deadman.json(mode 0600). A fired row is posted only to public HTTPS.X-FTW-Box-KeyandX-FTW-Box-Sigoverftw.cloud.relay.v1. A bad proof is refused. A join with neither header is admitted.ADR 0008 said this service reads and never controls, and that commands stay on the relay. That stance is being revised: the service carries command bytes and does not originate or open them. The ADR text is in
srcfl/ftwand is not edited here.README.md,CLAUDE.mdanddeploy/README.mdsay so.deploy/compose.ymlonly gains a comment that the state volume also holdsdeadman.json.Compatibility
An existing box, webapp or watch switches by changing the origin. Paths, frames, epochs and close-code reasons are the Frankfurt ones. The rendezvous handle remains the session capability. Box-key auth cannot be mandatory yet: current clients send no proof, and a home that has not turned cloud on has no key here.
RequireBoxKeyexists on the handler and is not a flag.POST /fleetis not ported. Core'sDefaultFleetPingEndpointishttps://relay.ftw.energy/fleetand is not derived from the websocket origin. The dead-man origin is derived from that websocket origin, so/deadmanis ported.Before Frankfurt can be turned off
cloud.ftw.energy. Those constants live insrcfl/ftwandsrcfl/ftw-webapp, not here.srcfl/ftwstill says commands stay on the relay.Tests
go vet ./... && go test -race ./...,go test -tags ftwclouddev ./..., andscripts/check-imports.sh.