Paid exits

Note · 2026-11-30

What we should claim, and what we should leave alone

Sorting the build list by who can actually finish each item: what needs merge rights and a hardware bench, what would duplicate work already in flight, and what is worth asking for rather than building.

The build list in the checklist is long, and most of it is not ours to do. Sorting it by who can finish it is more useful than sorting by size, because several items are already in someone else’s hands and doing them again would produce two half-working versions of the same thing.

Three facts decide the sorting:

That last point is not a limitation to work around. It is the reason most of the exit side should be left alone.

Leave alone: someone faster is already on it

fips-exitd, the mesh relay, the advert format. Three releases in one day, plus a new advert mechanism and a relay that exists only on the mesh. A PR from us arriving mid-flight would be a merge conflict with an opinion attached. We are a consumer of this code and should behave like one: read it, test against it, report what breaks.

fips-exit-client for OpenWrt. Announced as “hopefully available in a few days” and documented as phases 1–3 of 8. Writing our own means writing it twice and inheriting maintenance of the copy nobody uses.

fips packaging for OpenWrt. Already shipped as .ipk and .apk. There is no work here at all.

An exit role on Android. A deliberate product decision on his side, wrapped in the two-roles tension described below. Worth one clear question; not worth building toward blind.

Claim: the four things only we can finish

1 · Close the largest untested seam — gate client against a real daemon

The TollGate-side client for the exit daemon’s control socket is written and has only ever run against a test double. That is the weakest joint in the whole design: everything downstream assumes the socket behaves as we modelled it, and no one has checked.

This is squarely ours. We have a router, we have the automation, and a fake daemon cannot falsify our assumptions about the real one.

What “done” looks like: a real fips-exitd on a real router, the client connecting, an account created, bytes counted, the cutoff firing, and the numbers matching what the exit itself reports.

2 · Produce hardware evidence for each pairing

Written as a table in the interoperability note, true only on paper. The value of filling it in with measurements is out of proportion to the effort, because “we ran it on a router and here are the numbers” is a categorically stronger claim than “we reasoned about the code”.

The matrix, in the order worth doing:

  1. x86 exit → router client. Every component exists. Nothing to build.
  2. x86 exit → ESP32 client. Possible today, never attempted. Cheap.
  3. router sells → phone buys, with payment. The whole chain, end to end.
  4. router as buyer from a phone exit. Needs the phone exit first.

Item 3 is the one that counts, and it can start before real money: the bench already runs a fakewallet mint, so the payment path can be proven for free and the money swapped in afterwards. Separating those two is the difference between a test that runs every night and a test that runs when someone has coins.

3 · Opt-in discovery — the advert exists, the publisher does not

merchant.go builds and signs a kind-10021 advert and serves it as the body of GET /. It is never sent to a relay. So a TollGate is discoverable only by someone already on its network, which is the opposite of what discovery is for.

Publishing is a small change in a repo we can merge, and it needs nothing from the exit side. The design constraints — default off, publish only what the operator configured, never let a spoofed advert be load-bearing — are in the checklist.

The caveat is product risk, not technical risk: an advert discloses that an address sells bandwidth and at what price. Default off is not caution, it is the only defensible default.

4 · Make the installer an interoperability tool

The wizard already deploys to OpenWrt over SSH. Letting it also install fips, fips-exitd and the gate client as optional roles turns “flash a router” into “stand up a gate that can sell” — and it is in a repo we can merge.

The second use is larger than the first: drive the hardware matrix on every change through installer + labgrid + physical-router-test-automation. That is a test machine nobody else in this project has, and it is the durable contribution — not any single feature.

Claim: client accounting — now unblocked

The decision has been taken: the exit collects, and the router resells. That settles the shape of the work, and it is worth being precise about what it settles and what it does not, because one reading of it would be wrong.

What it settles. The router is a reseller, not a marketplace. It buys access from an exit as an ordinary paying customer and sells connectivity onward. So the router must know its own customers — who bought what, used how much, when to stop — and it must know its own position with the exit. That is two ledgers, not one, and they are different problems:

What it does not settle. The awkward case is a keyless customer at the reseller: someone with no fips key and nothing installed. The exit cannot bill them, because it cannot see them. So either the router bills them itself — which means the router needs its own payment rail, its own portal, its own settlement, and is no longer a pure reseller — or such customers are served under the sponsored model where nobody is billed at all.

That fork only appears in the client-knows-only-IP case. For a fips customer the reseller’s job is trivial: the customer pays the router, the router pays the exit, and the router’s own upstream package is the thing that runs out first. Worth confirming with whoever made the call, because it decides whether the downstream ledger is a payment system or a metering system.

What to build first, now that it is decided. The upstream half: a router that buys a package from a fips exit and treats it as its supply. That needs no new billing code, validates the reseller relationship end to end, and is testable on the bench with the fakewallet mint. The downstream ledger follows, and it is only worth writing once the keyless question above is answered.

Ask, do not build: the two-role question and the OUI collision

Two roles on one node. An exit and a client on the same box currently drop each other’s tunnel packets, counted as refused. Since “routers should buy and sell” is the central ambition, this is on the critical path — but it is an architectural decision in someone else’s code (namespaces? separate identities?), so it is a question to ask with a concrete proposal attached, not a patch to send.

Two OUI conventions. The router path uses 21:21:21; the ESP32 design carries C0:FF:EE, marked a placeholder in its own document. No scanner can read both as “a TollGate”. We hold both codebases, so we can do the work — but one of them must win, and that is a format decision that belongs to whoever owns the format. Bring the comparison, let him choose.

Do not do: open a large integration PR now

The temptation is to show up with a big pull request against tollgate-module-basic-go that wires everything together. It would be code tested against a stub, merged on merge rights rather than evidence, and it would cover the test gap with authority — the worst possible outcome, because it looks like progress.

Steps 1 and 2 above are the antidote, and they are cheap.

The split

Item Who Why
exit daemon, mesh relay, advert format freaky his code, and he is fast
fips / fips-exitd packaging freaky already shipping
OpenWrt exit client freaky in flight, days away
Android exit role freaky his product decision
gate client ⇄ real daemon us it is our client, and we have the router
hardware matrix, measured us only we can run it
A end-to-end with payment us the claim that counts
opt-in discovery publisher us our repo, our merge rights
installer roles + nightly matrix us our merge rights, our bench
client accounting — downstream only us the exit collects, so the router’s upstream ledger is fips-exit-pay’s
two-role design joint his architecture, our requirement
OUI reconciliation us, with his agreement his format, our two repos

What to do this week

  1. Put a real fips-exitd on a bench router and run the gate client against it.
  2. Record the result, including what broke, before writing any integration code.
  3. Publish the gate’s advert behind a default-off flag.
  4. Stand up the reseller relationship: a router that buys a package at a fips exit and treats it as its supply. No new billing code — this is the fips-exit-pay client path — and it proves the model that was just chosen.
  5. Ask the two questions — two roles on one node, and which OUI wins — with the evidence from step 1 attached, plus the keyless-reseller question below.

Only item 5 needs anyone else’s input.