Relay modes

Every way two nodes meet.

A relay is a link like any other: its own socket, its own probes, its own measured round trip, scheduled beside every other path. That is what lets one pair of nodes use a shared relay, two federated relays, several relays at once or a punched direct path, and move between them without rebuilding the tunnel.

Nexus Atlas: Traversal Network5:26 · plays from YouTube
01 · One shared relay

Two nodes behind NATs meet on one relay.

Each node opens an outbound session to a relay and proves the relay’s identity against the key published for it. The relay keeps a session per node, keyed by the node’s static public key, and forwards a frame addressed to a key to that key’s session. When both nodes hold a session on the same relay, the relay is a path between them, ready in under a second, with no public address and no inbound rule at either end.

  • Sessions that keep themselves alive. A keepalive every 20 seconds holds the NAT binding open, and the relay echoes it, so each node knows its own round trip to the relay even when the peer is away. After a relay restart, its nodes re-attach within seconds.
  • Absent peer or dead relay, told apart. A relay that holds no session for the destination answers so, and the node reports the peer absent rather than the relay down.
  • The same choice at both ends. When a pair shares several relays, each end advertises its round trip to every relay it can still reach, and both rank the shared relays by the combined round trip, my leg plus yours. They elect the same relay with no negotiation.
  • What the relay sees. The relay forwards opaque encrypted envelopes addressed by static key; it authenticates clients but holds no key that opens what it forwards. It observes outer addresses, node identities, timing and byte counts, and reports its sessions only under salted hashes. Who holds the keys on each path

Configured with [traversal] and a [[link]] of type relay: discovered from the signed relay map, or pinned with its address and key.

NATNAT Node ANode BRelay outboundoutbound opaque envelopes
Both sessions run outward, so neither NAT needs an inbound rule. The relay pairs them by the nodes’ static keys.
02 · Federated relays

Each node keeps its nearest relay. The relays carry the hop between them.

A node in Europe homes on Zurich, its peer in North America on New York. Neither reaches across the world for its first hop. The sending node names the peer’s relay in a via hint on each frame; its own relay, which does not hold the peer, forwards the frame once, over an authenticated relay-to-relay session keyed from the signed relay map, and the peer’s relay delivers it as an ordinary frame.

  • Exactly one hop. A frame that arrives from another relay is delivered or refused, never forwarded again, so loops cannot form. Every frame counts against the sender’s session quota and against a per-pair rate limit at both relays.
  • Where the peer is, without a list. A node learns its peer’s relay from a sealed presence record: filed under an id only that pair of nodes can compute, sealed so only the peer can open it, fetched by exact id, gone within ten minutes. Nothing anywhere lists which node is on which relay.
  • Ranked on one scale. The relays measure each other once a minute, and the signed map carries the resulting relay-to-relay matrix. A federated pair is ranked as my leg, plus the relay-to-relay round trip, plus your leg, against every shared relay. The matrix, live
  • End to end, or not at all. A federated path puts a second relay on the path, so a node takes one only with end-to-end sealing ([crypto] e2e) on, unless an operator explicitly allows plain forwarding. Neither relay holds a key that opens what it forwards.

Configured with [traversal] federation and [crypto] e2e; the directory that finds the peer’s relay is on with relay election. How federation works, in depth

Node ANode BZurichNew York A’s home relayB’s home relay one hop via hint: New York · relay pair from the signed map
Each first hop stays short. The two relays carry the frame between them in exactly one hop, and keep no list of clients.
03 · Both at once

Several relay paths at once, and nothing lost when one goes.

Shared relays and federated pairs are not exclusive. relay_paths sets how many relay paths a pair keeps active, counting both kinds, and every further relay waits on standby. With the broadcast scheduler, every packet rides every active path, so the loss of one relay costs nothing: with two relay paths active and a relay stopped under a ping stream, not one of 7,500 pings was lost.

  • Dead in two sweeps. Each end probes its relays every five seconds. A relay that fails two sweeps in a row leaves both ends’ ranking in the same round, and both elect the same next-best path, measured at 10 to 14 seconds after the stop.
  • Make before break. When a relay returns or a better one appears, the new path comes up first and the old one keeps carrying for a grace period before it steps back to standby.
  • One path, one gap. With a single relay path and no direct path, losing that relay leaves a gap while the election moves. Two active paths, or a direct path beside the relays, close it.

Configured with [traversal] auto_relay and relay_paths, and [scheduler] strategy = "broadcast" for traffic that must not wait.

Node ANode B ElectedStopsStandby, promoted
Two relay paths active, the broadcast scheduler sending every packet on both: when one relay stops, the other already carries everything.
04 · The direct path first

The relay brings the session up. The direct path takes it over.

Before trying a direct path, each node asks the relays how it looks from outside, from the very socket its data uses. Then the two nodes swap the addresses they found over the relay they already share, and probe each other at the same moment. The probes are the punch: the direct path appears on the link it was always going to use, the scheduler ranks it first on measurement, and the relay stays one rank below as a warm standby.

  • Two addresses, or no answer. Telling an easy NAT from a hard one takes replies from two different server IP addresses; two ports on one address cannot do it. Each relay publishes an observation address, and a node classifies its mapping by pairing two different relays.
  • Driven by new information, never by a timer. A failed punch costs nothing. When an address changes, after a tower handover for instance, the relay path carries on and the direct path is punched again from the new candidates.
  • The same LAN, found by itself. Two nodes on the same network find the local path from their own candidates and move onto it within seconds.
  • Relays as standbys, not the path. With a punched direct path up, stopping both relays cost no loss over two minutes.

On by default with [traversal]: punch, and punch_links to name the links that may punch. The connection sequence

NATNAT Node ANode B direct, punched relay, warm standby
The direct path is the link that was already there, with the peer’s address found at run time. It wins on measurement; the relay stays one rank below.
05 · Carrier-grade and symmetric NAT

When every destination gets a new port, the pair stays relayed.

A carrier NAT that mints a fresh mapping per destination, a symmetric NAT in the older vocabulary, makes the address the relay saw valid only toward the relay. Atlas does not guess the next port. The punch is tried over the peer’s candidates, finds nothing to aim at, and goes quiet; the relay carries the session, and netcheck reports endpoint_dependent so the operator can see exactly why.

Mapping at the NATDirect pathWhat carries the session
Endpoint-independentPunchedDirect, relays on standby
Endpoint-dependent (carrier-grade, symmetric)Not availableRelay, shared or federated
Address changes mid-sessionPunched againRelay first, direct again once punched
Same LANFound locallyLocal path, relays on standby

Staying relayed is a measured answer, not a failure: the session is up, outbound only, and the relayed path bonds with every other bearer the node has.

NATCarrier NAT Node ANode B new port per destination the relay carries the session
Atlas does not guess the next port. The pair stays relayed, and netcheck says why.
06 · The hosted exit

When the far end is the internet: the full tunnel.

Every relay host also runs a hosted exit, an Atlas endpoint a phone, laptop or field node terminates its bonded tunnel on. The exits are published in their own signed map, with region, city and a load hint, and a client ranks them by measured round trip, as it ranks relays. The whole device then goes through the bond, with DNS kept inside the tunnel.

  • The default route belongs to the daemon. On Linux the daemon installs the default route into the tunnel the moment the tunnel exists and puts it back if it goes; the leak guard closes the uplinks to everything but the daemon’s own traffic, tunnel up or down. On Android the app routes the whole device.
  • Outbound only. The exit has a public address, so a node behind carrier NAT dials it directly, with no relay in between.
  • Your own exit, the same way. A node you run becomes a private exit with one [exit] section naming the members it forwards for, and it is reached over the relays like any member.
  • An exit is inside the tunnel. It decrypts the traffic it carries to the internet, so it sees what any internet gateway sees. The exit boundary

Configured with a [[peer]] whose allowed_ips carries 0.0.0.0/0, and [leak_guard]; a private exit with [exit].

DeviceHosted exitInternet cellularWi-Fi every packet of the device, DNS inside the tunnel
The internet sees the exit’s address. The exit is the far end of the tunnel, so it sees what any internet gateway sees.
07 · Who runs the relays

Ours, yours, or both on one node.

The hosted relays and a relay you run are the same software. What differs is who operates it, where it is published, and who trusts it.

Hosted

The public network

Five regions on four continents: Los Angeles, New York, Zurich, Hong Kong and Sydney. Each relay is verified from the outside before it is published, listed in the Ed25519-signed relay map with its key, and measured against the others once a minute. See the live map

Yours

A relay in your own network

The same relay package runs in your cloud, data centre or field site, next to the operation. Your nodes pin it by address and key in their configuration, and it never appears in the public map or on this site.

Both

One node, both kinds of relay

A node can hold relay links to your relay and to ours at once. The election ranks them on one scale, so the public network adds geographic redundancy beside the relay you control, and static configuration always wins over discovery.

Federation stays inside the signed map

Relays federate only with relays listed in the signed relay map, over sessions keyed from it. A relay you keep out of the public map serves your nodes directly.

Revoked nodes are refused

A relay refuses a revoked node key and tears down its sessions within one poll; your own relay can read a revocation file of its own.

Sized by packets, not sessions

One relay address forwards a fixed number of packets per second whatever its session count, at about 2.8 KiB of memory per session. Sizing a relay deployment

Get early access

Bring us the network you cannot control.

Apply as a pilot partner if you have a deployment ready to test, or start evaluating Nexus Atlas Traversal as a future customer. Tell us enough to understand the endpoints, carriers, regions, and operational constraints involved.

01

Pilot partner

Run an early deployment with direct engineering contact and help shape priorities through real-world feedback.

02

Customer evaluation

Research architecture, security, deployment options, and commercial fit before committing to a pilot.

Already enrolled? Open the console
Early-access applicationUsually answered by the product team

Your application is sent to the Nexus Atlas product team. You can also email office@nexusatlas.io.