Open source · Apache-2.0

A gateway between IP links and DTN networks

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

Two kinds of space network that do not speak to each other

IP links in low Earth orbit

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 for everything further out

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).

The gap

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

UDP or HTTP in, BPv7 bundles out, and back

app --UDP/HTTP--> gateway A (ipn:1) --TCPCLv4--> DTN network --TCPCLv4--> gateway B (ipn:2) --UDP--> app

Held through outages

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.

Standard protocols only

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.

Optional signed receipt

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

Through NASA HDTN and JPL ION, each restarted mid-stream

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 nodeLinkResult
NASA HDTN 7fbe90cTCPCLv420 of 20 in order, 10 held on disk during the outage, 20 of 20 receipts valid
NASA HDTN 7fbe90cTCPCLv4 over TLS 1.3, both hops20 of 20 in order; HDTN verified the gateway's identity in its certificate
JPL ION c5a4d87TCPCLv320 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

Not an open door into a DTN network

Closed by default

The DTN listener and the HTTP and UDP inputs bind to the local machine unless you choose otherwise.

Encrypted and authenticated

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.

Only who you allow

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

Clone, test, and point it at your DTN node

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

What it does not do yet