Choosing a transport
Changing transports does not change the CapTP session. It changes who you can reach and what the path between you proves.
| Transport | Network trust | Use it for | What the path proves |
|---|---|---|---|
iroh | Untrusted | Peers outside the browser that need discovery or NAT traversal, and Spritely Goblins through glowcap’s adapter | The node id is a key, so dialing it proves who answered. QUIC encrypts the channel. |
webrtc | Untrusted | Browsers talking directly | The DataChannel is encrypted. Who the peer is is vouched for by the signaling service that introduced it. |
noise-tcp | Untrusted | glowcap peers with a direct TCP route | The Noise handshake proves the dialed key and seals the stream end to end. Interoperability with another CapTP implementation is untested. |
noise-relay | Untrusted | glowcap peers, sealed, through a relay | The same Noise handshake, peer to peer. The relay only sees ciphertext. |
onion | Untrusted | Connecting to Goblins as shipped, on the standardized path | Tor proves you reached the service you dialed and hides where both ends are. It proves this only to the dialing side, inside the Tor daemon, so glowcap does not treat it as proof of who the CapTP peer is. |
keyed-tcp | Trusted only | A stable key name on a network you already trust | Dialing demands that key, but nothing proves possession, and the frames are cleartext. |
keyed-relay | Trusted only | Peers through a relay, cleartext | Same key demand. The relay reads every frame, and nothing proves who is on the far side. |
tcp | Testing only | Cleartext testing against Goblins, through glowcap’s adapter | A host:port. Nothing is proved and nothing is encrypted. |
inproc | Testing only | Both peers in one process | No network between them, so nothing to prove and nothing to encrypt. |
Browser traffic
A browser cannot open raw TCP or iroh QUIC. It has two choices:
- WebRTC opens a direct encrypted DataChannel, usually between two browsers. Both peers need a shared signaling capability to trade connection details, and ICE (the browser’s path finding) must find a route. Across the open internet it may also need STUN or TURN servers, which help cross a NAT.
- A WebSocket relay carries a browser connection to a registered peer, or dials a TCP or iroh peer for it. A
noise-relayregistration keeps traffic encrypted between peers. When the relay dials iroh, it can read the traffic and vouches for the peer’s key.
The relay is simpler to run. Add WebRTC when direct browser-to-browser traffic is worth the extra signaling and NAT work.
Similar transports
keyed-tcp,noise-tcp, and iroh all name a peer by key.noise-tcpand iroh encrypt and authenticate. Only iroh adds discovery and NAT traversal.- iroh and WebRTC are both encrypted peer-to-peer channels. iroh is the non-browser path. WebRTC is the browser path.
tcpandkeyed-tcpuse the same sockets.tcpnames an address.keyed-tcpnames an identity and carries the address as a hint.- Three paths reach Goblins.
onionis the transport the OCapN draft standardizes and the one Goblins ships.tcpandirohreach Goblins through adapters glowcap provides: cleartext loopback, and encrypted QUIC.
id bundles several of these routes under one durable key. It is a locator format rather than a transport. Multi-home peers explains it.
Setup lives on the Noise, iroh, WebRTC, onion, and relay pages. Transports explains how each symbol names a peer.