Files
waste-go/FUTURE.md
Fredrik Johansson f437fe94f4 docs: rewrite FUTURE.md to reflect current shipped state
Mark as done: TUI, WebRTC/ICE/STUN, multi-network, invite system,
file transfer, YAW/2.1 forward-secret signaling.

Remove stale content: "TCP with custom framing" transport section,
old roadmap priorities (waste-relay, UDP hole punching, QUIC) that
are now handled by WebRTC/pion.

Remaining work: per-network share dirs, peer gossip (anchor-free
reconnection), file transfer UX improvements, native UI, optional TURN.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 14:59:27 +02:00

5.2 KiB

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 (WebRTC DataChannels, DTLS, ICE)
  • Cryptography and handshake (Ed25519 identity, nacl/box signaling, YAW/2.1 FS)
  • NAT traversal (ICE/STUN via pion/webrtc — no custom relay needed)
  • File transfer (dedicated binary DataChannels per 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.

TUI (shipped)

A terminal UI (cmd/tui) using Bubble Tea. Three-pane layout: rooms, messages, peers. Supports group chat, DMs, room switching, invite generation. Works over SSH.


Protocol

NAT Traversal (WebRTC ICE/STUN)

Solved by using WebRTC DataChannels via pion. ICE gathers host + server-reflexive (STUN) candidates and performs UDP hole punching automatically. The anchor (cmd/anchor) doubles as a STUN server on UDP/3478.

The one remaining gap: symmetric-NAT pairs fail without TURN. An optional TURN relay (coturn in relay mode) can recover these. The protocol spec (§11) explicitly leaves this as an opt-in — no relay is the default.

Signaling YAW/2.1 (shipped)

Forward-secret signaling via per-session ephemeral X25519 keys. See PROTOCOL.md §2.1 and internal/anchor/client.go. Falls back transparently to 2.0 static-key sealing for peers that don't speak 2.1.

Multi-Network Support (shipped)

One daemon, multiple simultaneously-joined networks. Per-network HKDF-derived identities prevent cross-network correlation. Network-scoped SQLite stores, IPC commands carry network_id.

Invite System (shipped)

waste:<base64> URIs encoding anchor URL + network name. --join flag on daemon and TUI. Generated via IPC generate_invite or Ctrl+I in the TUI.

File Transfer (shipped)

Dedicated binary DataChannel per transfer (f:<xid>). SHA-256 integrity verification. 64 KiB chunks with backpressure. Auto-accept. Downloads to <data-dir>/downloads-<netid>/.


Remaining Work

Per-Network Share Directories

The -share-dir flag is still global. A peer on two networks shares the same directory with both. The fix: make share dir per-network, configurable via an IPC command set_share_dir {network_id, path} or a config file, so Alice can share work files on "work" and music on "friends" independently.

Peer Gossip (§8.4)

The peer_gossip wire type exists in proto but is not implemented. When a peer knows about other peers (from prior connections), it could share address hints so the mesh can reconnect without the anchor. This makes the anchor optional once the initial handshake has happened — the network self-heals if the anchor goes down.

File Transfer UX

  • Manual accept/reject (currently auto-accept)
  • Transfer cancellation via file-cancel
  • Progress display in TUI
  • Resume after disconnection

Native UI

Web frontend (React) + Tauri/native packaging. The IPC protocol is already the full boundary — the UI is a pure consumer.

TURN relay (optional)

For symmetric-NAT pairs. Opt-in, off by default. Operates blind (relay sees only opaque DTLS-encrypted blobs). Run coturn in relay mode on the same VPS as the anchor.


Roadmap

Status Item
shipped Daemon + anchor server
shipped WebRTC DataChannels (ICE/STUN hole punching)
shipped Ed25519 identity, nacl/box signaling (YAW/2.0)
shipped IPC protocol — join/leave/chat/DM/state
shipped Message persistence (SQLite, per-network)
shipped TUI (cmd/tui, Bubble Tea)
shipped Invite system (waste: URI, --join flag)
shipped Multi-network support (HKDF derived identities)
shipped File transfer (dedicated binary DataChannels)
shipped Forward-secret signaling (YAW/2.1 ephemeral X25519)
next Per-network share directories
next Peer gossip (anchor-free reconnection)
next File transfer UX (manual accept, cancel, TUI progress)
future Native UI (React + Tauri)
future TURN relay (opt-in, for symmetric-NAT pairs)

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 anchor is dumb infrastructure
  • The soul — a private overlay for people you actually trust