Skip to content

What an Internet relay can see

Jeffrey Walter Mixon edited this page Nov 7, 2026 · 1 revision

An Internet relay lets a Knit conversation carry on after the people in it have left radio range of each other. Your phone leaves a sealed copy of each message on a relay, and your contact's phone collects it the next time it's online. Knit calls these relays "spools" internally, and the software that runs one is Knit Spool.

Relays are optional and start switched off. This page explains how they work, what a relay stores and for how long, and what a relay's operator can and can't learn from running one. For the announcement that introduced them, see Keep the conversation going after you part on the Knit website.

Checked against Knit 2.11.0-beta.0.

A mailbox, not a messaging server

A typical messaging server knows its users: an account for each, a phone number or email address, often a contact list, and who sent what to whom, since it routes every message itself.

A Knit relay holds none of that. It has no accounts and no user records, and it never decrypts anything. It keeps a set of sealed blobs filed under conversation numbers it can't trace back to anyone, hands them to whoever asks for that number, and deletes them when they expire. Phones push to it and pull from it. Relays never talk to each other, so a conversation that uses two relays gets two independent copies, and the phones merge whatever they find.

In mesh terms, a relay is one more carrier, like a phone holding a message for someone else. The differences are that it's always reachable over the Internet and that it can't read a message's envelope.

Turning relays on

The switch is in Settings › Internet relays. The first time you turn it on, Knit shows what a relay can see (your IP address, when you send and roughly how much) and what it can't (your messages or photos, who you're talking to, or who else is in a group). Until you accept, Knit opens no connection to any relay. The switch applies to every conversation at once. There's no per-chat setting.

Knit lists one public relay, run by Knit's developer. It's in the list from the start but used only once the switch is on. You can turn it off, or remove it, and a removed default stays removed. You can also add relays of your own:

  • Paste a relay's address. Knit accepts only encrypted wss:// addresses.
  • Open a relay invite link someone sent you, or share it to Knit. The sheet that opens names the relay's host in the largest type, says what the relay will see, and adds it once you confirm. If relays are off, the same sheet carries the first-time explanation and turns them on.
  • When you add a contact whose link names a relay you don't use, Knit offers to add it through the same sheet.

Anyone can run a relay with Knit Spool, which is free software under the AGPL. A private relay requires an access key, which travels inside its address and so inside its invite link. The link keeps it after the #, a part browsers never send to a web server. Your own contact link lists up to three relays you use, but never one that needs a key.

How a conversation finds itself on a relay

Each direct chat and each group gets a conversation number, which the protocol calls a scope ID. The phones in the conversation work it out from a secret only they share, the one their end-to-end encryption already uses. The relay sees a random-looking 32-byte number that it can't compute from anyone's Knit identity or tie to a person.

That number changes over time. A direct chat gets a new one whenever its encryption session is replaced, and a group gets a new one whenever someone leaves. To the relay, the new number looks unrelated to the old one. Phones keep pulling from the old number for up to 48 hours, so nothing in flight is lost.

Two phones meet on a relay only when both have relays switched on and share at least one relay. Your phone syncs every conversation at every relay on your list that's switched on. It never dials a relay because a contact asked it to.

Someone you added from a contact link, and have never been near, can still reach you this way once each of you has added the other. Your two phones work out a temporary number from your two identities and use it to set up encryption. Once that's done, they switch to the conversation's ordinary number and drop the temporary one within 48 hours.

A group uses relays only when every member's version of Knit supports its current encryption.

What goes up, and how it comes back down

Whenever a phone with relays on holds a frame for one of its own conversations, it seals the frame and pushes it to its relays. That covers messages it sent, messages it received, and copies it's carrying for others in a group it belongs to. The frame is the exact signed one that travels over the radios, and the seal is a second layer of encryption keyed to the conversation. Messages, reactions, delivery receipts, profile updates and group changes all go up this way. Every message goes up, even when the radios are also delivering it.

flowchart LR
    A["Your phone"] -->|"sealed copy"| R[("Relay")]
    A -.->|"radio"| N["Phone near you"]
    R -->|"pulled when it connects"| B["Contact's phone"]
    B -->|"radio, hop count 0"| C["Phone near your contact"]
Loading

A phone that's connected to a relay receives new blobs for its conversations as they arrive. After a reconnect it catches up the same way two phones do on the mesh. The relay keeps a fingerprint of each conversation's set, and when the fingerprints differ, the phone lists what's there and pulls only what it's missing.

Before a pulled frame goes anywhere, the phone checks it. The blob's ID has to match its contents and the seal has to open. The sender's signature has to verify against the key the phone already has pinned for that person, and the frame has to be a type that belongs in that conversation. Anything that fails is discarded. A frame that passes enters Knit as if a neighbour had handed it over by radio, with its hop count reset to zero, and is carried and flooded like any other. One phone with an Internet connection can bring a group's messages to members nearby who have none, and send their replies back out.

Since relayed frames are the same signed frames, a relay can't change one without the signature failing, and it can't make up a message. If it replays an old blob, the copy is dropped as a duplicate or as expired.

Photos and files travel separately, in sealed 48 KiB pieces, fetched by a phone that holds a message referring to them. In a direct chat, Knit holds a photo back from the relay while the radios are carrying it, and never uploads one the recipient's phone already has.

Nearby room posts never go to a relay. They're plaintext by design and meant for the people physically around you. There's one exception: when you have a direct chat with a post's author and a relay is the only way to reach them, the delivery tick for their post can travel back sealed inside that direct chat.

What a relay keeps, and for how long

For each conversation number, a relay stores the sealed blobs, when each arrived, a fingerprint of the set, and the IDs it has deleted, so a phone doesn't upload those again. It has no table of users and nothing that links one conversation number to another.

Knit asks relays to keep each copy for 48 hours from when it arrived, whether or not anyone has collected it. A relay can set a shorter limit of its own, and when a conversation runs out of space, the oldest copies go first. A relay holds recent traffic and can't restore your history to a new phone. When you turn relays off, uploads stop at once, and copies already on a relay expire on the same 48-hour clock.

What a relay can learn

What it sees What that tells it
Conversation numbers That some conversation is active, without whose
When each blob arrives, and its size A conversation's rhythm, and which blobs are photos or files, rounded up to 48 KiB pieces
IP addresses Where each phone connects from, and which addresses follow the same conversation
One connection per phone How many conversations that phone follows
Typing cues When someone in a conversation is typing, while Typing indicators is on

Knit connects straight to the relay, so the relay sees the public IP address of whatever network your phone is on. The main thing it can piece together is that two addresses keep following the same conversation number. Photos give away more than text: a relay can tell that a conversation exchanged about 2 MB at a certain time, though not what it was. In a direct chat, a photo that goes up late, after the radios stopped carrying it, hints that the two of you were apart at the time.

A relay can also carry the ringing for an Internet call, and walkie-talkie audio where it offers that. Voice calls lists what each kind of call shows, and who sees it.

What a relay can't learn

A relay can't read what you send. Direct and group messages are end-to-end encrypted before they reach it, and the conversation seal sits on top. Unlike a phone that carries your message on the mesh, a relay can't see the envelope either: no sender, no recipient, no send time and no group member list. It doesn't know names, Knit identities or contacts. Receipts and reactions look like any other sealed blob, so it can't tell whether a message was delivered or read.

The conversation seal's key changes only when the conversation number does. Someone who later got both a member's phone and a relay's stored blobs could read the envelopes of that period's copies, but not their contents, which the end-to-end encryption protects with keys that keep changing.

Tickets

With no accounts, a relay uses tickets to decide who may use its costlier services, such as storing photos or providing a call server. A ticket is a pass signed by a ticket service, which the relay checks without learning who holds it. Each ticket carries a pseudonym that changes every day, so a relay can link one phone's connections within a day, including across networks, and no further. The relay software doesn't log tickets or pseudonyms.

Knit's public relay carries text for everyone. It takes small photos and files with a free ticket. Your phone fetches one from Knit's ticket service only on days it sends a photo or file through that relay, using an anonymous key it made itself and never backs up. Knit tells you the first time it does this, and you can turn free tickets off in Internet relays.

Knit Anywhere comes with supporting Knit on Ko-fi or GitHub Sponsors. Supporters get an invite link that carries a ticket key. With it, Knit's public relay carries larger photos and files and offers a server for calls. The ticket service knows which supporter key it's issuing for. The relay sees only the ticket and that day's pseudonym.

Your controls

  • Use Internet relays turns the whole feature on or off.
  • Each relay has its own switch, so you can park one without losing its address or access key.
  • Free tickets for small photos can be turned off per relay.
  • Typing indicators, in Settings › Chats, stops typing cues over relays and radios alike.
  • Diagnostics lists each relay's connection state and, for each conversation, how many messages your phone and the relay hold.

Going deeper

Clone this wiki locally