End-to-end encrypted relays for OCapN

Jessica Tallon — October 15, 2026

Creating a direct connection between any two computers (not just from client to server) over the internet is notoriously difficult. Many home networks are behind NATs which prevent new inbound connections. Sometimes these NATs are from the ISP (carrier-grade NATs) which are impossible to work around with port forwarding and/or UPnP. While hole punching techniques can break through NATs, it's far from guaranteed. Thus, we need something that works in the general case: relays.

Relays are servers, accessible over the public internet, that act as a proxy between two computers that cannot directly connect. In Goblins 0.12 we introduced a federated relay named "prelay". While OCapN traffic is encrypted in transit, the prelay crucially lacks end-to-end encryption (E2EE). E2EE secures all the messages so they can only be read by their intended recipient, preventing intemediatory parties (like the relay) from tampering with or reading them. Due to the lack of E2EE, the relay was named "prelay" (pre-relay) to dissuade its use. Thanks to a grant from NLnet, we're happy to announce that the next release of Goblins will include a federated, E2EE relay implementation!