Paid exits

Checklist · 2026-11-30

What still needs to be built

Every component in dependency order, then who owns it and why — with what exists today, what is design-only, what nobody has started, and which items are ours to claim because we have merge rights and a hardware bench.

Everything the notes have argued for, reduced to things that either exist, are design-only, or do not exist at all. Letters follow the settled alphabet.

Status key: ✅ exists and is released · 🟡 design or partial, not released · ⬜ nobody has started · ❌ refused by design · ❓ an open question that blocks the item above it.

Owner key (§6): us · fr34aky · joint — who should do it, not who wrote it.


0 · Decisions that block everything below

These are not tasks. They are answers that determine what the tasks are, and doing the tasks first is how you build the wrong thing twice.


1 · A — client knows FIPS

The mode with the most shipped parts, and the only one tested end to end on a phone.

Item Status Notes
fips node on Android ✅ fips2go 0.14.0, pinned fr34aky/fips@android-hooks
find paid exits on Nostr ✅ kind 30078, d=fips-exit, access=paid with price/packages/mints/port
buy access + tunnel chosen apps ✅ in-app wallet, per-app split tunnel
fips node on OpenWrt ✅ fips v0.5.3 .ipk/.apk, aarch64 + x86_64, musl
fips-exitd on OpenWrt 🟡 needs a musl build. Deps are libc + its own net crate, so a build not a port
gate client ⇄ real fips-exitd 🟡 client written; only ever tested against a fake daemon
TollGate → payment → access wiring ⬜ the rail exists on the TollGate side; the exit side is unconnected
publish TollGate’s own advert ⬜ kind 10021 is built and signed but never sent to a relay
end-to-end on hardware ⬜ router + phone + real money on testnet, never done
reseller path: router buys, customers pay the router ⬜ the model just chosen (§0.1). Upstream half needs no new billing code

2 · B — a phone IS the exit

Blocked upstream, and the block is a considered product decision rather than a missing branch.

Item Status Notes
fips2go has no exit role ⬜ not a refusal. shim/src/exit.rs:329 only stops a client selecting its own npub as its exit (loop prevention). No exit implementation and no forwarding path exist in the app
fips-exitd on Android ⬜ needs raw sockets on fips0 and a TUN by name; an app has neither
phone finds another phone’s exit by mDNS 🟡 freaky: “should be working already when mDNS is enabled on the SSIDs” — not verified
phase plan for phone-as-exit ⬜ ask him; there is no design doc

Depends on §0 item 2 — even if the phone were an exit, the buyer still has to be seated, and that path is unverified.

Note: the exit role itself is not blocked by Android. A phone’s own traffic passes through the VPN interface normally, so a phone serving a fips customer is an app that terminates and forwards. What is missing is the implementation.

3 · C — client knows only IP

The most work, and the only mode that reaches a device which speaks nothing but IP.

Item Status Notes
fips-exit-client for OpenWrt 🟡 freaky: “hopefully available in a few days”. client.md is phases 1–3 of 8; no OpenWrt code in the tree today
fips-gateway (DNAT/SNAT to the mesh) ✅ exists in fips, needs CAP_NET_ADMIN + nftables — router-only by construction
downstream accounting (who bought what, used how much) ⬜ the real work. The exit collects upstream, but it cannot see a C client, so the router’s own ledger lands entirely in TollGate
upstream supply: router buys a package at the exit ⬜ no new accounting — the ordinary fips-exit-pay client path. Proves the reseller model
a fips-exit provider behind upstream_session_manager ⬜ the code change the decision implies. The seam exists (UpstreamSessionManagerInterface, ProofForwarderTarget, UsageTrackerInterface, TollGateProber); what is missing is an upstream kind that speaks to an exit instead of to a portal. Not a ResellerMode flag — that path scans SSIDs and logs into a portal page, and an exit has neither
billing keyless customers at a reseller ❓ §0.5. Either the router becomes a payment system, or they are served sponsored
per-client sessions that survive restart 🟡 TollGate keeps sessions in memory; restart loses metering
C-open variant (sponsored hotspot) ⬜ no billing at all — everybody on the LAN gets out. Nearly free, and a separate product
ESP32 as a C client ✅ it is already a complete classic-portal gate on its own
ESP32 as a seller or gateway ⬜ firmware only: esp_netif NAPT + DHCP + portal are ordinary ESP-IDF. The chip is the router, so no netfilter is involved

4 · Discovery — and the opt-in relay feature

Two tiers, complementary rather than alternatives.

Item Status Notes
relay that exists only on the mesh ✅ ws://npub1lx2m36…dpz.fips, in the default list, no DNS or certificate
six public relays beside it ✅ so one network refusing an advert cannot hide an exit
advert TTL + republish ✅ valid 3h, republished hourly; a dead exit drops out on its own
local discovery by mDNS 🟡 freaky’s “later” — not built
TollGate service discovery via Nostr relays (opt-in) ⬜ new, see below

4.1 TollGate service discovery over Nostr relays — opt-in

The feature. A TollGate publishes what it sells — price, metric, step size, mint, services behind the gate — as a signed Nostr event on relays it chooses. Clients can then find gates before they are in range of one, and compare them.

Why opt-in is the right default. Publishing a gate’s location and price is a disclosure, not a convenience. A TollGate is often someone’s home connection: the advert tells the world that an address sells bandwidth, at what price, and when it is up. The person who runs it must choose that. Default off, one line to enable, and the advert must say only what they configured — nothing inferred.

What has to be true for it to be honest

Registry hygiene, learned from the exit side

Acceptance test for the whole feature

A fresh TollGate with discovery off publishes nothing, anywhere, and a client cannot find it. Turn discovery on with one setting, and a client on another network finds it, sees the correct price and services, and connects. Turn the gate off and the entry is gone within one TTL. Spoof the advert from a different key and the client still refuses to treat it as that gate.

4.2 fips-exit-pay against the TollGate spec

The question raised was whether the payment service is already a TollGate implementation — answered in full here: yes as a product, no as a protocol. It is ahead of TollGate on one thing (continuous payment by Cashu channel) and behind on another (it cannot serve a keyless customer). The tasks that follow are the interoperability work, not a merge.

Item Status Notes
Layer comparison, both directions ✅ four layers: advert, payment, identity, enforcement. Done in the note
Confirm the advert event shape 🟡 TollGate is kind 10021 with metric/step_size/price_per_step. The exit’s is a parameterised replaceable event with access. The exit side is read from docs, not from code or a live event — capture a real event before relying on the mapping
Decide: translator or unified format ⬜ A translator process is cheap and needs nobody’s permission. A unified format needs the spec owners. Do the translator first, then argue from it
Advert translator (fips → kind 10021, and back) ⬜ Makes the two worlds mutually discoverable without either side changing. Our repo, our merge rights
Package ↔︎ step conversion rules ⬜ Bytes convert cleanly. “Until 18:00” does not convert to steps without a clock, and the until clock already trusts the device’s wall clock. Write the rules down or a translator will round silently
Propose an optional access tag on TIP-01 ⬜ paid / open / allow-list. Additive and ignorable, so existing clients keep working. The translator is the argument for it
A tag for channel / pay-as-you-go pricing ⬜ Only if channels see use. TollGate cannot express continuous payment today
Reseller integration: router buys from a fips exit ⬜ Now the chosen model (§0.1). Needs no spec change and no new billing code, because the exit sees one customer: the router
Interop test: one wallet, two gates ⬜ Buy at a fips exit and at a TollGate with the same Cashu wallet and mint. If the tokens are not interchangeable the divergence is deeper than the advert

What the reseller decision changes here. With the exit collecting, the router’s relationship to the exit is the ordinary client one, so §4.2’s whole comparison is about discovery and vocabulary, not about payment plumbing. The translator matters more than ever; the rails do not need to agree.

The finding that matters most. The question “how does the gate learn the customer’s identity” — §0 item 2, unanswered for months — does not arise between fips nodes. The client is admitted because its source address is its key. It only arises when a TollGate bills someone who is not a fips peer, which is exactly the client-knows-only-IP case. That narrows §0 item 2 from “a core unsolved problem” to “a problem in mode C”.

5 · Cross-cutting, before any of this ships

Item Status Notes
two roles on one node ❌ an exit and a client on one box drop each other’s tunnel packets, counted as refused — blocks “routers do both”
two OUI conventions ❌ 21:21:21 vs C0:FF:EE
MAX_MEMBERS = 32, no batch put 🟡 1000 customers after an exit restart is 1000 round-trips
drop then usage loses the last window 🟡 settle-then-drop, or a readable post-life
the until clock depends on the device’s wall clock 🟡 a clock ahead voids a package at birth
payment rail trust model ✅ settlement authority must not be the issuer — settled, and why the earlier design was closed
no continuous-payment model in TollGate ⬜ fips-exit has Cashu channels (pay per byte as you go); TollGate can only sell a prepaid block. A tag and a rail would both be new

6 · Who should do it, and why

Expanded into its own note: What we should claim, and what we should leave alone.

The useful question is not “what is left” but “what is ours”. Three things decide it: who owns the code, who can test it, and who can merge it.

What is not ours to claim

What we should claim, in value order

1 · Prove it on hardware — the thing nobody else can do.

Our unique asset is not code, it is the ability to say “this works on a real router”. We have merge rights to tollgate-module-basic-go and tollgate-installer, a labgrid bench of OpenWrt routers wired into the fleet, and physical-router-test-automation to drive them.

Three venues, which matters for scheduling: a physical router on the bench, a local QEMU VM (about two minutes to iterate), and a cloud venue for fire-and-forget runs. All three support a fakewallet mint, so the payment path can be proven with free tokens and the real money swapped in afterwards — the difference between a test that runs nightly and one that runs when someone has coins.

Reputationally this is worth more than any integration PR: “we showed it on hardware” is a stronger claim than “we built the wiring”.

2 · Client accounting — after §0.1 is answered.

The largest single item on this page, and it lands entirely on TollGate. But it hangs off “who collects”, and building it before that is answered means building it twice — once for “router collects”, once for “exit collects”. Do not start without §0.1.

3 · Opt-in discovery.

Genuinely ours: merchant.go builds and signs the kind-10021 advert and never sends it. The advert exists; the publisher does not. A small PR in a repo we can merge.

The honest caveat: this also carries the most product risk. An advert reveals location and price, so it must be opt-in and not opt-out-with-a-note.

4 · Make the installer an interop tool.

The wizard already deploys to OpenWrt over SSH. Letting it also roll out fips, fips-exitd and the gate as optional roles turns “flash a router” into “stand up a gate that can sell”. Small work, and ours to merge.

The second use is bigger: drive the hardware matrix every night through installer + labgrid + PRTA. That is a test machine nobody else has.

5 · Be the interoperability layer between the two payment systems.

This is the item that fits our position better than any other. We can merge to TollGate, we cannot merge to fips-exit, and neither side is going to rewrite its payment rail to match the other. A translator — advert in, advert out — plus one optional spec tag is small, ours to merge, needs no coordination, and makes both systems mutually discoverable. It is also the only way the two shops coexist without either being rebuilt: §4.2.

6 · Reconcile the two OUI conventions.

C0:FF:EE (ESP32) against 21:21:21 (router). A day’s work, and it blocks every cross-device discovery path. We hold both sides — the ESP32 repo and the router repo.

The split, as a table

Item Who Why
exit, mesh relay, advert format fr34aky his code, and he is fast
fips / fips-exitd packaging fr34aky already shipping
Android exit (§2) fr34aky his product decision
gate client ⇄ real daemon us we have the router
end-to-end + hardware matrix us only we can run it
opt-in discovery us our repo, our merge rights
installer roles us our merge rights
OUI reconciliation us, with his agreement his format, our two repos
client accounting us, after §0.1 largest TollGate-only item
advert translator + access tag us our repo, no coordination needed (#4.2)
fronting integration (router buys from the exit) us needs no spec change at all
the four §0 questions joint nothing gets built before these

7 · Suggested order

  1. ✅ §0.1 — who collects. Settled: the exit collects, the router resells. Nothing downstream is blocked on it any more; §0.5 is the one fork it left open.
  2. gate client against a real daemon — the biggest test gap, and we own the bench. Evidence before code.
  3. §4.1 opt-in discovery — small, useful, merges in our repo, needs none of the above. 3b. §4.2 advert translator — makes a TollGate and a fips exit mutually discoverable, and is the evidence for the access tag proposal. Do it after step 2, because it is a test against the real advert, not a document.
  4. A end-to-end on hardware, with testnet money. This is the claim that counts.
  5. §3 downstream accounting — largest piece. No longer blocked by step 1, but see §0.5 for the keyless fork.
  6. §2 phone-as-exit — wait for his answer; do not build toward it blind.

Steps 2, 3 and 4 are independent and can run in parallel. Step 5’s shape depends on §0.5, not on §0.1, which is now settled.

What not to do: open a large integration PR against tollgate-module-basic-go before steps 1 and 2 stand. We would be merging code tested only against a stub, and covering the test gap with authority.