Open source · Apache-2.0
Equipment on an always-on IP link sends plain UDP or HTTP. The gateway wraps each message in a standard BPv7 bundle, keeps it on disk, and hands it to a DTN node over an encrypted TCPCLv4 link, or TCPCLv3 for JPL ION. Bundles coming back out of the DTN network become plain UDP again. Neither side has to learn the other's protocol.
Why
Commercial LEO networks carry ordinary IP. NASA has already demonstrated relaying Dragon spacecraft data over Starlink's optical links (NASA). Those paths hand off and can drop for seconds to minutes.
DTN is an operational service on NASA's Near Space and Deep Space Networks, and NASA's Mars network is planned around a DTN relay orbiter (NASA).
IP-native equipment has no bundle stack, and DTN nodes do not take raw IP traffic. Something has to hold data through outages and translate at the edge.
How it works
app --UDP/HTTP--> gateway A (ipn:1) --TCPCLv4--> DTN network --TCPCLv4--> gateway B (ipn:2) --UDP--> app
Every bundle is written to disk before it is sent and deleted only after the DTN peer acknowledges every byte. A dropped link or a restarted gateway resends what was waiting, in order.
BPv7 (RFC 9171) bundles over TCPCLv4 (RFC 9174) with TLS, or TCPCLv3 (RFC 7242) for JPL ION. Large messages go as standard BPv7 fragments. No changes to the DTN network.
The gateway can sign which exact bytes it took from which IP source, and when. The far gateway rejects anything changed on the way. Nodes that do not know the block forward it unchanged.
Evidence
Each run sends 10 frames, kills the DTN node, sends 10 more while it is gone, then starts it again. Every frame has to arrive once and in order.
| DTN node | Link | Result |
|---|---|---|
| NASA HDTN 7fbe90c | TCPCLv4 | 20 of 20 in order, 10 held on disk during the outage, 20 of 20 receipts valid |
| NASA HDTN 7fbe90c | TCPCLv4 over TLS 1.3, both hops | 20 of 20 in order; HDTN verified the gateway's identity in its certificate |
| JPL ION c5a4d87 | TCPCLv3 | 20 of 20 in order, 10 held on disk, 20 of 20 receipts valid |
Plus 30 automated tests, including impersonation, a certificate from the wrong authority, a recording proxy that shows the payload is readable without TLS and not with it, fragments arriving out of order, and outages with gateway restarts.
Security
The DTN listener and the HTTP and UDP inputs bind to the local machine unless you choose otherwise.
TLS on the DTN link, with both ends presenting certificates that name their DTN address the RFC 9174 way, so no node can pose as another and nobody on the path can read the data.
Lists of allowed DTN nodes and IP addresses, a token for HTTP, size limits, and a firewall or VPN in front for far-away peers.
Run it
git clone https://github.com/BSVKey/dtn-custody-demo
cd dtn-custody-demo
node --test test/gateway.test.mjs
node gateway/cli.mjs gateway.json
Node.js 18 or newer, no dependencies. The config fields are listed in cli.mjs.
Limits