Skip to content

GUI: debugging over USB and Wi-Fi, the Transferd Wormhole, and a hardened mailbox - #2

Merged
LoopyLuci merged 2 commits into
mainfrom
gui-debug-and-wormhole
Nov 28, 2026
Merged

LoopyLuci merged 2 commits into
mainfrom
gui-debug-and-wormhole

Conversation

@LoopyLuci

Copy link
Copy Markdown
Owner

Summary

Adds the Transferd desktop app (gui/) features that were built on this branch:

  • Debugging over USB and Wi-Fi (a1308db): a hybrid debugging protocol, a Debug screen, and settings for what listed computers may do with this device. Specified in gui/docs/DEBUG_PROTOCOL.md.
  • Transferd Wormhole (a1308db): send a file, a folder or a text with a short code. It uses SPAKE2, sealed mailbox messages, and transfer over the overlay with parallel streams and route failover. Specified in gui/docs/WORMHOLE.md.
  • Hardened mailbox (24dd0c5):
    • TLS on the network, with a self-made certificate that other computers pin by fingerprint. Plain ws:// is accepted only for this computer.
    • Every refusal carries a machine-readable code, and retryable ones say when.
    • Per-address rate limits and caps on nameplates, connections and connections per address.
    • Client retries with jittered backoff, honours retry_after, and walks an ordered mailbox list. After a meeting has started it stays on one mailbox.
    • Settings can host a mailbox on this computer. The Wormhole screen shows where wormholes meet, the hosting state, and a share line with the pinned fingerprint.

Verification

  • Full gui suite with TRANSFERD_RELAYD set: 371 passed, 1 xfailed. The xfail is a strict, known relay stall above about 1 MiB, documented in gui/docs/WORMHOLE.md under "Known limits".
  • pyflakes is clean across transferd_gui, tests and run.py.

Not verified

  • The hosted mailbox across a real LAN: binding to all interfaces, the share-line address, and the Windows Firewall prompt. Tests bind to 127.0.0.1.
  • A publicly trusted wss:// certificate, and a real man-in-the-middle. The pin check is tested with a non-matching fingerprint.
  • Load on the mailbox; tests use one or two clients.
  • The look of the window, and a person driving the screens.
  • Debugging with a real phone: no device was available.

Known limits

  • A wormhole relay transfer above about 1 MiB stalls. Root cause not found; it lies on the relay path, outside the wormhole code.
  • There is no public default mailbox. A wormhole needs a mailbox listed in Settings, or one hosted on this computer.

🤖 Generated with Claude Code

LoopyLuci and others added 2 commits November 27, 2026 18:16
Debugging (earlier work): a hybrid debug protocol over the overlay's services, with
the device side under a policy and the client side choosing the route. A second route
joins the session and a log stream survives the USB route being cut. Debug screen and
debugging settings added; overlay test updates for the relay path.

Wormhole (new): a Transferd-native wormhole built into the GUI. A short code (nameplate
plus three PGP words), SPAKE2 key exchange, AES-GCM sealed phases with the side and
phase bound in, and a WebSocket mailbox (server and client) for rendezvous. A file,
folder or text moves over the overlay with parallel streams, progress-paced flow
control and a SHA-256 check before the file is placed. Folders are unpacked under
safe-name, link, entry-count and ratio checks. The Transfer section gains a Wormhole
screen (send with a code, receive with accept or decline, stop and cancel); the
mailbox is set in Settings and the screen is disabled until one is.

Tests: wormhole unit, screen (two real windows) and end-to-end tests (route cut,
mailbox cut, relay). The relay case beyond about 1 MiB is an expected failure,
recorded in gui/docs/WORMHOLE.md under Known limits.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
The mailbox server is built to be left running and used by computers it does not know:

- TLS on the network, with a self-made certificate that other computers pin by its
  fingerprint. Plain ws:// is accepted only for this computer, and the pin is checked
  before anything is sent.
- Every refusal carries a machine-readable code. Refusals that can be retried say when
  (retry_after).
- Per-address rate limits on allocate, claim and add, and caps on nameplates, connections
  and connections per address. A connection that has not bound within 30 s is closed.

The client retries with jittered backoff, honours retry_after, resends a message that was
refused for rate, and walks an ordered list of mailboxes. Once a meeting has started it
stays on the same mailbox.

Settings can host a mailbox on this computer. The Wormhole screen shows where wormholes
meet, the hosting state, and a share line with the pinned fingerprint.

Tests cover the limits, TLS and pins, the address rules, the hosted mailbox, and the
screen's mailbox card and settings. Full suite: 371 passed, 1 xfailed (the known relay
stall above about 1 MiB).

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
@LoopyLuci
LoopyLuci merged commit 52bd024 into main Nov 28, 2026
3 of 8 checks passed
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