diff --git a/README.md b/README.md index 549e027..d214630 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ Nothing here depends on TransferDaemon or any other repository. [TransferDaemon] | [docs/CRYPTO.md](docs/CRYPTO.md) | Cryptographic constructions, key derivation labels, and informal security arguments. | | [docs/RELAY.md](docs/RELAY.md) | The blind relay: token registration, forwarding, and `Locate`. | | [docs/IMPLEMENTATION.md](docs/IMPLEMENTATION.md) | How to build a conforming node, which requirements are mandatory, and how to test interoperability. | +| [docs/INTEGRATION_AUDIT.md](docs/INTEGRATION_AUDIT.md) | Current TransferDaemon sync status, Continuum compatibility gaps, and integration prerequisites. | | [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md) | Hosting relays and a DHT bootstrap node on the public Internet. | Start with `PROTOCOL.md` if you are implementing the wire format. Start with `OVERLAY.md` if you want to know what the network does. @@ -53,7 +54,7 @@ Start with `PROTOCOL.md` if you are implementing the wire format. Start with `OV ── overlay ──────────── pairing, services, routes, streams, mesh DNS ── frames ───────────── session: hello, streams, pings, receipts ── tunnel ───────────── per link: AES-256-GCM, counter, replay window - ── link ─────────────── TCP, relay datagrams, or any LinkTransport + ── link ─────────────── built-in TCP and relay routes (custom-link seam not wired to OverlayNode) ``` --- diff --git a/crates/transferd-overlay/src/link.rs b/crates/transferd-overlay/src/link.rs index a0c77f6..2f57e0e 100644 --- a/crates/transferd-overlay/src/link.rs +++ b/crates/transferd-overlay/src/link.rs @@ -6,9 +6,10 @@ //! the same connection (or, for a relay, on a connection it made earlier). That is what makes //! the overlay work behind NAT and CGNAT with no firewall change at all. //! -//! Adding a new medium (a serial line, a satellite link, a QUIC transport) means implementing -//! [`LinkTransport`] and registering it — no wire change, no session change. See -//! `docs/PROTOCOL.md`. +//! [`LinkTransport`] and [`LinkRegistry`] define a low-level plug-in seam. They are not currently +//! injected into [`crate::node::OverlayNode`], whose live route setup uses the built-in TCP and +//! relay paths. Implementing and registering a transport alone does not make it available to a +//! running node. See `docs/PROTOCOL.md`. use async_trait::async_trait; use std::collections::VecDeque; diff --git a/docs/IMPLEMENTATION.md b/docs/IMPLEMENTATION.md index 593a056..aad9f6d 100644 --- a/docs/IMPLEMENTATION.md +++ b/docs/IMPLEMENTATION.md @@ -17,6 +17,14 @@ The reference implementation is in this repository, under [`crates/`](../crates/ The wire protocol is independent of any user interface and of the TransferDaemon application's control plane (its gRPC API and control hub). The crate names describe this codebase's internal layout. They are informative and may change; the specification is what matters for interoperability. +### Custom-link status + +`LinkTransport` and `LinkRegistry` are currently low-level building blocks, not a runtime +extension point: `OverlayNode` does not accept a registry, and its route setup uses the built-in +TCP and relay paths. An implementation that needs a new medium must currently integrate it into +the node's route setup and authenticated handshake; implementing the trait by itself is not +sufficient. + ## Building a Conforming Node A minimal conforming node must: diff --git a/docs/INTEGRATION_AUDIT.md b/docs/INTEGRATION_AUDIT.md new file mode 100644 index 0000000..2a06076 --- /dev/null +++ b/docs/INTEGRATION_AUDIT.md @@ -0,0 +1,115 @@ +# Integration audit: Transferd and Continuum + +**Reviewed:** 2026-12-03 + +**Scope:** Transferd at `ci/local-pipeline` and the current Continuum checkout. This review +does not modify either protocol's wire format. + +## Summary + +There is no Continuum-to-Transferd runtime integration today. The repositories implement +different transport and trust models, so adding a dependency or routing Continuum's existing +QUIC connection through Transferd's service proxy would not create a working or secure +integration. + +The established repository integration is Transferd's byte-identical core copy in +[TransferDaemon](https://github.com/LoopyLuci/TransferDaemon), maintained by `core.manifest` +and `scripts/sync-core.sh`. That contract is separate from Continuum. + +## Findings + +### 1. Continuum's main session is QUIC over UDP + +Continuum's client creates a Quinn UDP endpoint in `connect_to_server`, connects with ALPN +`apq-2`, and uses QUIC bidirectional streams for pairing, input, clipboard, and file transfer. +The server binds a Quinn endpoint and dispatches incoming QUIC streams. See +`src/continuum-transport/src/client.rs`, `server.rs`, and `types.rs`. + +The separate RFB implementation is a TCP server library with its own VNC authentication. It is +not started by Continuum's standard QUIC server path and does not provide the same pairing, +session, or authorization behavior. + +### 2. Transferd exposes TCP services, not Continuum QUIC connections + +Transferd's `OverlayNode::expose` publishes a local TCP service behind a peer-identity ACL. +`OverlayNode::connect` returns a stable local TCP endpoint. That is suitable for byte-stream +services, but it does not carry the UDP datagrams Quinn requires. A TCP proxy is not a +transparent substitute for Continuum's QUIC endpoint. + +Transferd's `Link` and `LinkTransport` APIs are also not an adapter for arbitrary applications: +they exchange Transferd overlay `Frame`s and participate in its session, tunnel, and routing +semantics. Continuum does not speak those frames. + +### 3. The trust models are not bound together + +Continuum's current connection flow uses its pairing code/PAKE and session permissions. +Transferd uses its own hybrid node identity, signed invites, peer ACLs, and encrypted overlay +sessions. Neither side currently maps or verifies the other's identity. Treating a Transferd +peer as an authorized Continuum client without an explicit binding would bypass a security +boundary. + +### 4. Transferd's advertised custom-link seam is not live in `OverlayNode` + +`LinkTransport` and `LinkRegistry` exist and have isolated registry tests, but a repository-wide +search found no runtime registration or use outside `link.rs` and the public re-export. The +`OverlayConfig` has no registry field, and `OverlayNode` currently establishes its built-in TCP +and relay routes directly. Implementing and registering a custom transport alone therefore +does not make it available to a running node. + +### 5. Existing TransferDaemon sync is branch-sensitive + +At the review baseline (`dd37733`, 2026-12-03), the Transferd local `core-sync` check and +`selftest` were run on `ci/local-pipeline`: + +```text +preflight: PASS +selftest: PASS +core-sync: FAIL +``` + +The mismatch lists `.cargo/audit.toml`, `.github/workflows/core-ci.yml`, +`crates/transferd-crypto/Cargo.toml`, `crates/transferd-crypto/src/ghostkey.rs`, and +`crates/transferd-overlay/src/{dns,link,node,proxy}.rs`, plus `docs/IMPLEMENTATION.md`. +This check compared the current +`ci/local-pipeline` worktree with the sibling TransferDaemon checkout; it does not establish +that Transferd `main` is out of sync. At that baseline the candidate branch was eight commits +ahead and six behind `origin/main`. The local sibling checkout was on the old +`chore/core-sync` branch, so its mismatch is not evidence that the production integration is +broken. + +The canonical downstream integration is current: TransferDaemon `main` at +`b1b0ed1` contains the merge “Sync core files to Transferd 04489fa” and its +`core-sync` workflow passed on 2026-12-03. Do not sync candidate-branch files into +TransferDaemon's mainline copy until the Transferd changes are integrated into `main`. + +## Recommended next steps + +1. **Choose the product path before changing code:** (a) carry Continuum's full QUIC session + over Transferd, (b) move only file transfer onto Transferd streams, or (c) expose a + separately configured RFB service through Transferd. These have different compatibility, + performance, and authentication consequences. +2. **Specify identity binding and authorization.** Define how a Transferd peer identity maps + to Continuum permissions, how revocation works, and whether both protocols' authentication + remain mandatory. Do not reuse the pairing code as a Transferd credential. +3. **For full-session transport, add an explicit transport abstraction** that covers the + stream/datagram semantics Continuum uses, then implement and test an adapter. Do not tunnel + QUIC through a TCP byte stream as a shortcut. +4. **For a narrower service integration,** make the listener opt-in, keep it loopback-bound by + default, require Transferd ACLs and the service's own authentication, and test that denied + peers cannot reach it. +5. **Wire or defer `LinkTransport` deliberately.** A usable plug-in needs a runtime injection + point in `OverlayConfig`/`OverlayNode`, a defined authenticated-handshake contract, and + tests that exercise a custom link through a real peer session. Until then, treat the + registry as a low-level building block, not a supported node extension. +6. **Keep the TransferDaemon copy tied to Transferd `main`.** After Transferd changes land in + `main`, run the documented sync/check and the core tests in both repositories. + +## Validation performed + +- Read Transferd's overlay, link, protocol, implementation, local-CI, and core-sync sources. +- Traced Continuum's QUIC client/server, stream types, configuration, and separate RFB server. +- Ran `python ci/ci.py run --only core-sync,selftest` in Transferd: preflight and pipeline + self-tests passed; the downstream comparison failed for the candidate-branch differences + listed above. +- GitHub Actions for TransferDaemon main commit `b1b0ed1ca3d8c27a1d0d95ac687fa7b4f5e9fa53` + reported `core-sync` successful on 2026-12-03.