Wire Protocol

Authenticated handshake, then raw duplex bytes. Version 2.1 runs over three libp2p stream protocols.

Protocols

Protocol IDPurposeCaller
/tubo/tunnel/2.0Open a remote Pipe and stream bytesConsumer runtime
/tubo/exact-redemption/1Redeem a one-time exact inviteRecipient
/tubo/exact-renewal/1Renew a short-lived Access Lease from the durable bindingConsumer runtime

Tunnel open (2.0)

Bounded JSON frames, then raw duplex bytes after OpenOK:

consumer                          owner (receiving boundary)
   |--- ClientHello ----------------->|   version=2.0, client identity
   |<-- ServerHello ------------------|   pipe_id, fresh challenge, capabilities
   |--- OpenPipe -------------------->|   pipe_id, access_lease, challenge_proof,
   |                                 |   hop_limit, visited_pipe_ids
   |        [ receiving boundary: decode lease, verify signature, subject,
   |          audience, expiry, revocation, epoch; then resolve target and
   |          dial exactly once — no lease, no dial ]
   |<-- OpenOK ----------------------|   session_id
   |========= raw duplex bytes =======|

Exact redemption (1)

The recipient presents the encoded exact invite plus a possession proof for a server-generated challenge. The authority verifies the invite's owner binding, signature, one-time flag, time window, revocation row, and authorization epoch — then atomically records redemption + accepted relationship and returns a short-lived Access Lease capped to the invite's remaining lifetime.

Exact renewal (1)

Post-acceptance, the consumer presents the durable binding, the Pipe ID, and a fresh possession proof. The authority resolves the accepted relationship deterministically, re-checks revocation and epoch equality, and mints a fresh short lease. Renewal is the reason access outlives every bootstrap credential without ever becoming long-lived.

Access Lease (canonical)

A compact signed value binding: issuer (Exact Pipe Authority), subject (recipient identity), audience (exact Pipe ID), JTI, issued/not-before/expires-at (minutes, strict expiry with bounded clock-skew tolerance on not-before), and authorization epoch.

Versioning

Protocol 2.1. Incompatible changes bump the protocol ID; capability negotiation is optional-intersection — removing a capability on both sides degrades deterministically to the ordinary supported path.