Skip to content

Connections

Your node speaks to other nodes over several transports, with the same messaging layer on top. No Kunuleco server sits in the middle of a conversation. On a local network your nodes talk straight to each other, and across the internet they go over Veilid or Tor, whose relays are run by other people and carry traffic they cannot read.

The transports

Transport Scope What it is for
mDNS and direct TCP Local network Same Wi-Fi or LAN. Nodes find each other with no setup
Veilid Internet Private routes that cross NAT without port forwarding
Tor Internet A persistent .onion address, so a node behind NAT can still be reached

The messaging layer on top is called CapTP. It is the same whichever transport carries it, so the rest of the node does not need to know how the bytes travelled.

This is also why nodes on one LAN keep working with no internet at all. They find each other over mDNS and carry on.

The order the node tries them in

There is no single priority list. The order depends on whether you are making first contact with someone or sending to someone you are already connected to.

First contact, join. The node first looks for a live LAN session to the host. An invite line carries the host's identifier and its Tor and Veilid addresses, so a join with one tries those addresses first, pinned to that identifier, together with any LAN neighbour already proven to be the host. If nothing has proved the host within 5 seconds, the node also asks the directory and tries what it lists, Veilid, then Tor, and the first way in that proves the host and gets an answer wins. A join by name alone has no addresses to try first, so it goes to the directory at once, and the directory lists nodes, not people. A join by short code checks the code's signed record and shows you the host before it dials. A join with an in-person seed from meet races the LAN addresses and the Tor and Veilid addresses in the seed. The details are in Reference: Transports.

Sending to someone you are connected to. A tell uses a connection that already exists. It tries the LAN session first, then any other live CapTP session with that person, then Tor, then Veilid. It never opens a new connection. If none of those is up, the message goes to your outbox. Speech in a presence goes to the other members in the same order, and Tor comes before Veilid on purpose, because a Veilid route can drop a message without saying so.

The node's owner can steer this. transport disable <mdns|veilid|tor> switches a transport off for the whole node and join skips it. Since 0.2.240 it stays off across a restart. transport force <mdns|veilid|tor> makes join use only that one until you run transport force none. Any other name, ipfs included, is refused as an unknown transport.

The exact order, with the source lines, is in Reference: Transports.

What each transport protects

A local-network sighting is only a hint. Whatever mDNS announces, the signed CapTP hello decides who the peer is, and a node that cannot prove the name it claims is refused.

Since 0.2.236 every connection between two nodes runs inside an encrypted channel before anything else is sent, on the LAN, a direct dial, Tor and Veilid alike (captp/noise.py:1-5, captp/protocol.py:1770-1784). The channel is Noise with one fixed suite, so nothing is negotiated. Each node then proves which account it speaks for with a signed hello that is bound to that one channel, so a hello recorded on one connection is useless on another. Every message after the hello is still signed as well. The node at each end reads the traffic, and there is no end-to-end message encryption between people yet.

Who proves itself first depends on what the dialling node knows. When it already knows the identity it wants, from an invite, a short code or a saved contact, the far node proves itself first. When it does not, the dialling node sends its own signed hello first, and the far node says nothing until that hello checks out (captp/protocol.py:1793-1832). In that second case a node that answers the dial learns who is calling before it has proved anything, though it cannot reuse what it learned.

Tor is for reachability, not for hiding where your node is. Kunuleco uses Tor so that a node behind NAT can still be reached, and it makes no location-privacy promise. Until 0.3.127 a node told a peer whose hello had checked out its IPFS (kubo) addresses, including over Tor. Since 0.3.127 the hello carries no IPFS addresses, and a node refuses a hello that does. Location privacy is still a recorded non-goal (TPT-105, ruled 2026-09-30), and it may be revisited later.

Local network (mDNS)

  1. Your node announces a _kunuleco._tcp.local. service.
  2. The announcement carries your handle (Name#TAG) and the CapTP port to dial, 4243 by default. None of it is signed.
  3. Another node on the LAN sees it and dials that port.
  4. The two nodes exchange signed hellos, and the hello decides who is there.

Two nodes that discover each other may both dial at once. CapTP merges the two connections into one session. Nothing listens on port 4242 any more.

Veilid

Veilid carries messages over private routes. Your node talks to a local veilid-server, creates a route, and publishes it in a Veilid record whose key travels in its invites and in the node's signed directory entry, so a peer always reads the current route. The node refreshes its route every two minutes. Veilid works through NAT and carrier-grade NAT with no port forwarding.

Tor

Tor gives your node a persistent onion service. The .onion address stays the same across restarts because its key is stored with your identity. A peer connects to it through Tor's SOCKS port, and the result is a real TCP connection rather than Veilid's message routes. Expect more delay than on the other transports.

IPFS

Kunuleco no longer runs IPFS. 0.3.127 stopped using it for connections, and 0.3.129 removed the kubo daemon. A note's bytes live in the node's own store, named by a content address, and another node fetches them from the node it got the note from. Joins go over the LAN, Veilid or Tor.

Invite lines and short codes

An invite line is what you share. It reads join <host name#disc> <presence> <host AID> tor=<onion> vdht=<record key>, so it names the host, pins its identifier, and carries the node's own Tor and Veilid addresses. It reaches the host even when the directory is down. The Urchin client draws it as a QR code.

A short code like lantern-willow-quiet-ember (four words, typed with hyphens or spaces in any case) is a lookup key at a small directory service at kunul.eco. Since 0.2.236 only a node registers there, and a short code that works from another node exists only for a Hall or shared room the node hosts. The node signs the code's record, and since 0.3.127 the four words are computed from the node's identifier and the record's signed fields. A joining node checks the signature, works the words out again, refuses a record they do not match, and shows you which node made the code before it dials. When the directory cannot be reached, the joining node reads a copy of the record that the node keeps on Veilid until the code ends. A code your own presence gets works only on your node, and the reply says so and tells you to share the invite line instead. Anyone holding a code can use it, so treat it like a door code.

For an in-person connection, meet hands over a kunul1… seed and QR code. It skips the directory, and since 0.2.236 it also carries the node's Tor and Veilid addresses, so it can reach you from elsewhere too. Only a connection made over the LAN counts as meeting in person.

Finding someone by name

Since 0.2.236 only the node registers with the directory, and since 0.2.242 a person's sign-in sends nothing about them to it. Until a later release restores it, your node can find a person on another node by name only on the same local network or from what it already knows. A join <name#disc> for someone you have never met answers Could not find <name#disc>. They may need to run invite first. Ask them for an invite line.

When someone is offline

A tell is saved to your chat history. If they are not connected, the message waits in your outbox (outbox lists it). When they come back on a direct CapTP session, such as the LAN, the node sends what is queued by itself. outbox flush retries everything now.

Since 0.3.0 a message stays in the outbox until their node answers that it saved it or handed it to them. A message that was sent and not yet answered is still listed, and the node sends it again under the same id, so they see it once. While the two nodes stay connected, your node asks again by itself, at least every two minutes, for an hour after your last tell or outbox flush. Someone who was signed out gets your messages within about two minutes of signing in. At most 64 messages to one person can wait unconfirmed, and tell refuses a 65th.

Seeing your own connectivity

Command Use it to
transport See which transports are running and how many peers each has
ping <user> See which transports have a live connection to that person right now. It sends nothing
contacts online Try to reach each of your contacts and report which transport answered
/network (client) Watch the live network view

More diagnostics are under help debug.