From 34cfb057bac62c9ac1396a82f7fd76b2c079ced8 Mon Sep 17 00:00:00 2001 From: Fredrik Johansson Date: Sun, 21 Jun 2026 16:19:39 +0200 Subject: [PATCH] Add FUTURE.md: vision, architecture, and roadmap --- FUTURE.md | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 FUTURE.md diff --git a/FUTURE.md b/FUTURE.md new file mode 100644 index 0000000..3094c69 --- /dev/null +++ b/FUTURE.md @@ -0,0 +1,78 @@ +# Future Vision + +WASTE's design philosophy is still sound: small trusted groups, no central server, encrypted everything, equal nodes. That's essentially what Signal's sealed sender and private groups do today, just without a self-hosted option. This gap is worth filling. + +--- + +## Architecture + +Two clean layers, connected by the IPC port. + +### Daemon +The real application. A long-running background process that handles everything: + +- Peer mesh and connection management +- Cryptography and handshake +- NAT traversal and relay fallback +- File transfer + +Exposes a local JSON API over TCP (`127.0.0.1:17337`). Can run headlessly — SSH into a box and the mesh stays alive even with no UI attached. + +### UI Layer +Talks to the daemon over the IPC port. The separation means the UI is replaceable without touching the core. + +Target: a web frontend (React or similar) wrapped in a native binary using a Tauri-style approach — native packaging, OS webview, no Electron weight. Avoids the wxWidgets ugliness of the old wxWASTE fork and the Qt licensing headaches of the VIA fork. + +--- + +## Protocol Modernization + +### NAT Traversal +The main unsolved problem from the original WASTE — one party always needed an open port. + +- Try UDP hole punching (STUN) first +- Fall back to an encrypted relay (DERP-style) when hole punching fails +- Relay sees only opaque encrypted blobs — end-to-end encryption holds +- Run the relay on a Hetzner VPS; `waste-relay` already implements the blind-forward model + +### Bootstrapping & Rendezvous +No DHT needed at small group scale (10–50 nodes). Keep it simple: + +- Each peer generates an Ed25519 keypair on first run — the public key **is** their identity +- Share a small signed invite file (`.waste-invite`) out of band: email, Signal, whatever +- The invite contains: current IP:port hint + public key + short-lived signature +- Once two peers connect, they gossip each other's addresses to mutual friends +- A local known-peers list in the data directory is sufficient at this scale + +### Identity +- Persistent Ed25519 keypair, generated once +- Public key = stable identity, not a mutable nickname +- No phone number, no central registry — closer to Signal's model than WASTE's original unregistered aliases + +### Transport (Long-term) +Current transport is TCP with custom framing. QUIC is worth revisiting once the core is solid — it gives multiplexing and better NAT traversal behavior essentially for free. + +--- + +## Roadmap + +| Priority | Item | +|---|---| +| 1 | Deploy `waste-relay` to Hetzner; verify cross-internet NAT traversal | +| 2 | Invite file format (`.waste-invite`) — solve bootstrapping without manual IP sharing | +| 3 | Peer gossip — auto-connect to friends-of-friends after initial invite | +| 4 | File transfer — chunked, encrypted, resumable | +| 5 | Message persistence — SQLite via `modernc.org/sqlite` | +| 6 | UI — web frontend consuming the IPC port; native packaging | +| 7 | UDP hole punching — full STUN implementation in `internal/nat` | +| 8 | QUIC transport — replace TCP framing for better NAT behavior | + +--- + +## What to Keep from WASTE + +- **Small group** — not a public network, not federated, not discoverable +- **No registration** — no phone number, no email, no central service +- **Encrypted everything** — at rest and in transit, end to end +- **Equal nodes** — no peer is "the server"; the relay is dumb infrastructure only +- **The soul** — a private overlay for people you actually trust