Paid exits

Note · 2026-11-30

Interoperability: who can sell to whom, and how they find each other

Five device classes, three transport models, and the asymmetry between what a router, a phone, a microcontroller and a laptop can each do. The letters are not two products — they are what the hardware allows in each direction.

A conversation went like this: routers should be able to buy from phones, sell to phones, and sell to each other. Every mode should work on routers. A should work between phones. Then: what about an ESP32? What about an Ubuntu box?

Most of that is possible. Exactly one quadrant is not, and it is not the one people expect. But answering the follow-ups forced a correction to the framing itself: there are three transport models, not two. A and B are both FIPS-relative, and the classic TollGate — captive portal, NAPT, Cashu — is neither of them. The ESP32 only speaks that third one, and that changes every pairing it appears in.

Everything here is checked against source, not against the conversation. Three claims did not survive that check; they are marked.

The alphabet

Letters in these notes follow freaky’s A / B / C — indexed on how much the arriving client knows, and they stack: A the client runs fips and finds exits itself, B a phone is the exit and another finds it by mDNS, C the client knows only IP and a TollGate carries it. All three can run on one router at once. The full definition, including what the letters do not distinguish, is on The alphabet, settled.

Where an older note says “Model A” or “Model B”, read A and C: those words were indexed on whether the customer held a key, which is a different question.

The four quadrants: who sells, who buys

Two roles, two device classes, four cells. Read the labels with the settled alphabet: A means the customer runs FIPS and is a real mesh peer; C means the customer is keyless and gets carried. (The older wording for those two was “Model A” and “Model B”.)

Top-left — router sells, router buys. The easiest cell to prove, and the narrowest: an operator sets both ends up, so nobody installs anything. fips already ships OpenWrt packages — .ipk and .apk for aarch64_cortex-a53 and x86_64, v0.5.3, with musl targets and a CI workflow that builds them. fips-exitd still needs a musl build, but its dependencies are libc and its own net crate — it talks to fips0 over raw sockets rather than linking the mesh. That is a build, not a port.

The catch is real and nobody had named it: a router that both sells and buys is refused today. In the apps’ mode an exit and a client on the same node see each other’s tunnel packets on their raw sockets and drop them, counted as refused. So “routers do both” is a design question for the exit’s author, sitting directly in the middle of the requirement.

Top-right — router sells, phone buys. This is the product. The customer side is done: fips2go 0.14.0 finds paid exits on Nostr, buys access, and tunnels chosen apps — that is A. The seller side needs fips-exitd on OpenWrt plus payment-to-access wiring. For C, the router is the gate and owns the forwarding, so keyless customers work too.

Bottom-left — phone sells, router buys. The hardest. It needs two things that do not exist: a phone that is an exit, and a router that is an fips client (client.md phases 1–3 of 8). And B is impossible outright — a phone cannot carry a router’s traffic.

Bottom-right — phone sells, phone buys. The cell that decides whether “phone as a TollGate” is a product at all. A works only if the customer installs fips2go and the seller can be an exit — which it cannot, on a phone. C is structurally impossible.

Note where freaky’s B lives: it is his own row, not a customer-capability variant. A phone selling to another phone is the one place his B appears, and it needs exactly what this cell lacks.

What each link can carry, and what it costs the customer

Same four pairs, read as capabilities instead of cells. Four things are worth pointing at.

C survives in exactly one place: the router. Not because routers are better, but because C requires owning the packet path, and that is a kernel property. Wherever the seller owns its kernel, both A and C are reachable. Wherever the seller is a phone, only A is reachable — and only once a phone can be an exit.

The install burden inverts. Router-to-router: nothing, because an operator provisioned it. Phone-to-router under A: fips2go, from an APK or Zapstore, or the App Store on iOS with no sideloading path. Phone-to-phone: fips2go on both ends.

And the discovery row is not one thing. It is three mechanisms with three different reach limits, which is the next section.

Discovery is three problems

Discovery: three channels, and when the customer can be told

The useful question is not “can we advertise” but “how early”. Before association, a customer has no IP, no DNS and no HTTP. Anything that needs those is already too late.

1. A vendor element in the beacon. The router writes a few bytes into its own beacon; a phone reading scan results sees it before joining. TollGate already has this — OUI 212121, applied over set_vendor_elements — and the decoder is wired.

Two honest caveats. The emitter has no production caller: the mechanism ships, the decode path is tested, and nothing ever sends it. And the element is an unsigned hint — the code comment says so — so it proves “a TollGate is here” and never “this one is genuine”. Fine for discovery, never for price or trust. iOS exposes no equivalent, so iPhones never see it at all.

2. mDNS / DNS-SD. Reliable, symmetric, standard — and post-association only, because it needs an IP. TollGate deliberately excludes it for this reason: discovery-signaling-decision.md:128 says post-association broadcast “cannot answer a pre-association question”. FIPS uses it heavily, but for a different job: finding peers once you are on the link.

So mDNS is the right channel for “two fips nodes find each other”, and the wrong one for “look at this network before you join it”.

3. Wi-Fi Aware (NAN). freaky’s suggestion, and it is the interesting one. Devices publish and subscribe to named services and open a direct data path — no access point, no association, no IP needed first. Android has it since API 26 with real framework and HAL support.

It does not help here, for two independent reasons:

Which gives the sharper conclusion: Wi-Fi Aware is the best discovery channel available for a product that does not contain a TollGate.

What phones and routers actually share

Overlap and gaps: what phones and routers actually share

This is the figure to keep, because it explains every result above in one picture.

The overlap is identity and transport. A fips key, an fd… address, Noise IK, the .fips name space, the paid-exit buying protocol, mDNS and Nostr. All portable. That is why A can span phone-to-router at all: the identity layer does not care what the kernel is.

The gaps are everything that needs a kernel. The router has forwarding, nftables, beacon control, and an always-on process. The phone has Wi-Fi Aware, a camera, a screen, a wallet, and a human. Neither can substitute for the other.

So the glue is directional, never symmetric. The router advertises with the beacon and the phone reads it with information elements. The phone advertises with mDNS and the router answers over mDNS. There is no single mechanism both speak symmetrically — which means every “just use X for discovery” answer is only ever half an answer.

Note also what each side cannot do, because these are the ones that decide products: a phone cannot be an exit (fips2go refuses its own npub by design), and a phone cannot beacon its own advert (Android gives no app control over its AP’s beacon, and it cannot start an AP without a system permission anyway).

Five device classes, three models

This note covers five classes — ESP32-S3, phone, OpenWrt router, x86 Ubuntu, and a fips exit (a role more than a machine: any of the Linux-class ones can be it). Every pairing between them is decided by three questions, in this order:

  1. Can this device hold a FIPS key? If no, it is Model C only — a classic portal gate, with a MAC or a lease as its entire notion of identity.
  2. Does it own a kernel? If no, it cannot be a seller at all, under any model.
  3. Is it also a buyer? If yes, and it is a FIPS exit, it is refused today: two roles on one node drop each other’s tunnel packets.

Almost every confusing result in the tables below is one of those three answering “no”.

Three transport models, not two

Three transport models: Cashu gate, FIPS peer, FIPS exit carrying a keyless customer

This is the correction the ESP32 forced. The letters presume both ends are FIPS-aware. Most TollGates ever shipped are not.

C · the classic Cashu gate. The customer associates, gets a DHCP lease, sees a captive portal, pastes a token, and the gate opens NAPT. No mesh, no key, no FIPS. Identity is a MAC or a lease — which is exactly the weakness: it says who is asking without proving it.

A · FIPS peer. Both ends hold a key. The customer is the identity, and the seller seats their address into an exit account.

B · FIPS exit carrying a keyless customer. One key, at the seller. The customer is forwarded into the mesh under the seller’s identity, so per-customer metering lives at the seller because the exit never sees them.

The rule that follows is worth stating plainly: wherever the seller owns a kernel, all three models are available. Wherever the seller is a phone, none of them are — not because of FIPS, but because Android will not let an app own forwarding or start an AP.

The device that has no FIPS at all

ESP32 in every direction

The ESP32 is a complete TollGate and a poor peer, and the asymmetry is the whole story.

It sells: an AP, a captive portal on port 80, Cashu via lnurl_pay, lwIP NAPT with CONFIG_LWIP_IPV4_NAPT=y, and — unusually — its own price advertisement in the beacon via esp_wifi_set_vendor_ie, and the matching scanner callback that reads other gates’ adverts. It also has a client mode: it can join an upstream TollGate and pay it, then resell. Reseller mode, one chip deep.

It cannot hold a key: there is no fips reference anywhere in the repository — no port of the mesh, and no Rust toolchain for xtensa. So every A-shaped pairing is dead, and the whole device lives in column C.

Two consequences worth the space:

A FIPS-only TollGate silently excludes the cheapest gate you ship. That is a product decision hiding inside a protocol choice.

Two OUI conventions already coexist. The router path uses 21:21:21; the ESP32’s price IE carries C0:FF:EE, marked in its own design doc as a placeholder. A phone cannot read both conventions as “a TollGate” until one of them wins.

x86 Ubuntu: the device that can be everything

x86 Ubuntu: seller under all three models, buyer from all three

Ubuntu is the mirror image of the ESP32: no platform wall at all, and almost no deployment convenience.

As a seller it can do A natively — fips tarball plus the fips-exitd release, both x86_64 glibc — and B buildably, since a Linux box owns its forwarding and can hold CAP_NET_ADMIN. The classic portal is the one thing it does not have packaged: opennds is an OpenWrt component, so C on Ubuntu is hostapd plus nftables plus a portal, assembled by hand.

As a buyer it has the widest reach of anything here: it can pay a fips exit through fips-exit-client, and it can pay a classic portal with a browser. Which is why it belongs in a bench rather than a pocket: if Ubuntu cannot pay a gate, the gate is broken.

What it does not solve is worth saying out loud: no Wi-Fi Aware, and being Ubuntu on a phone’s hotspot changes nothing about what the phone can forward.

Everything against everything

Every pairing and which model it can speak

The compact answer to the whole question. Read it by row.

The ESP32 row is all classic-portal, and its fips-exit cell is empty. That single empty cell is the argument: the cheapest gate cannot buy from a FIPS exit at any price.

The phone column narrows to one model, and that is the point. A phone can sell under A — to customers who also run fips — because then nothing has to be intercepted: the customer’s packet arrives already carrying its own mesh address. It cannot host a portal, so C is closed to it, and B waits on a phone being able to be an exit. “Cannot sell” was the wrong summary; “cannot be a portal gate” is the right one, and it is a much smaller claim.

Routers and Ubuntu are interchangeable sellers. Both own a kernel, so both speak A and C; neither hosts a portal out of the box, which is a packaging gap rather than a platform one.

And a node that both sells and buys is refused, which is why the diagonal cells carry a ~. An exit and a client on the same box see each other’s tunnel packets on their raw sockets and drop them. Until that is resolved, “routers do both” is a design question, not a deployment.

Two corrections to the call

“B will be available in the next days.” Checked at fips-exit v0.3.0, released the same evening. client.md says “phases 1 to 3 of eight are implemented” — the daemon, the apps’ mode, and finding an exit. “The whole machine” and “a network” are design. There is no OpenWrt code in the tree, and the releases are x86_64 and aarch64 glibc only, no musl.

That matters less than it sounds, because of the next correction.

“C on the router waits for client.md phase 5.” It does not. client.md’s “network” mode is a client mode: a router buying from a foreign exit. But if the router is the seller — which is the product here — it already owns its forwarding. C needs a userspace forwarder plus a byte counter on the box that is already 192.168.1.1. That is ours to build, and it does not wait for anyone.

“fips needs musl packaging.” It does not — v0.5.3 already ships .ipk and .apk for aarch64_cortex-a53 and x86_64, musl targets, built in CI. Only fips-exitd needs one, and its dependencies are libc and its own net crate.

What is left, honestly

Three things, in dependency order.

  1. Who collects. fips-exit-pay has a complete shop — packages, Lightning, on-chain, Cashu, Spilman channels. TollGate has its own Cashu rail. Running both on one gate means charging the customer twice. One side collects and the other opens access; this is a business decision that determines the architecture, and it is upstream of every line of integration code.

  2. How the gate learns the customer’s npub. Under A the customer is a key, and the exit’s own documentation already has the shape: “A device is put in by nobody but itself: it asks, from its own address.” So the gate listens rather than guesses — but something has to ask. Whether fips2go does that today is unverified.

  3. fips-exitd on OpenWrt, plus the payment-to-access wiring, plus the gate client tested against a real daemon instead of a fake one. The client exists (it is what speaks the control socket); it has only ever run against a stub.

None of that is the interesting risk. The interesting risk is item 1: a correct implementation of the wrong business model charges people twice and nobody notices until the complaints.