TollGate · components · October 2026

What TollGate is made of

Start with one node: three daemons. Then how one of them enforces what was paid for, how customers pay it, how gates pay on behalf of devices with no TollGate software, and finally the libraries underneath and the ways it all gets deployed: one router, a mesh exit, a whole fleet.

3 daemons · tollgated · mintd · merchantd 4 enforcers · ip · fips · external · loopback 2 gates · proxyd · exitd 3 crates · protocol · core · net 1 unit · the byte
01

One node is three daemons

peers TollGate protocol · CBOR · :4747 / :4748 buyers market · JSON · :3340 tollgated Offers · channels · each payer's budget meters and gates through its enforcer holds no money merchantd sells byte vouchers for sat · usd · eur buys what the node needs upstream holds all the money fund / deposit /run/merchantd.sock settle · burn · public quotes paid on creation · private mintd this node's Cashu mint, in one unit: bytes · one voucher buys one byte public :3338 for anyone · private :3337 on loopback, for merchantd only

The protocol never touches money, so the daemon that speaks it holds none. Pricing lives in the market, so merchantd can be swapped or moved without touching delivery. Issuing is the one power that needs guarding, so mintd does nothing else. Each has a terminal dashboard: tolltop, minttop, merchanttop.

02

One tollgated, many instances, four enforcers

tollgated is one generic daemon, never a special build. Each job is a named instance with its own config, ports, identity and sockets in /run/tollgate-<name>/. What an instance decides (an access level and a rate per peer) is carried out by its enforcer.

ip

Gates, shapes and meters each peer on the Linux kernel's forwarding path, by source address.

nftablestctollgate-ip

fips

Hands the same decisions to a FIPS node, for peers identified by their mesh key.

FIPS mesh

external

Hands them to another program over the enforcer protocol on a Unix socket. exitd is one.

enforcer.socktollgate-fips-exit

loopback

Shapes a socket of its own. Runs anywhere, including macOS; used for tests and demos.

portable
03

The main way in: your own node

your device tollgated, buying or tollgate_net::client the gateway tollgated mintd · merchantd a Spilman channel, in the gateway's vouchers no proxy, no portal laptops · routers · apps · agents

A TollGate is meant to be used by running TollGate. The customer's node pays the gateway itself, hop by hop, and a router can resell what it buys.

04

The fallback: a gate buys for you

phone no client proxyd portal · wallet tollgated enforcer: ip pays as its IP its traffic: gated, shaped, metered as that peer mesh node no client exitd portal · SOCKS5 tollgated enforcer: exitd FIPS socket exitd shapes at SOCKS; tollgated keeps the books

For phones, browsers and sandboxed agents. Each device gets one real TollGate client session, keyed by its address and dialled from it (IP_TRANSPARENT), so the gateway treats it as any other peer. The proxy never carries the phone's data.

05

Every payment ends as byte vouchers

this node's byte voucherspasted or scanned free voucherswhen the mint gives them away sat · usd · eur vouchersbought into bytes at merchantd Lightninginvoice at a sat mint · QR byte vouchers in the gate's own wallet proxy-wallet.sqlite device credited kept across restarts proxy-credit.json budget at tollgated channels funded from it deadline an hour out every second: max(bytes moved, reserved rate × 1 s) reserve a rate: time at a speed · reserve nothing: pay for what you use, idle costs nothing

The protocol prices nothing: one voucher buys one byte, and what a byte costs in sats is settled in the market. A gate can now sell only pay for what you use (portal.accumulative_only) and serve an operator's own theme (portal.theme_dir). The rule itself is worked through on Paying for it.

06

Putting it together: the whole stack

many routers gates library + node built on tollgate-fleet in development · NixOS · GL-MT3000 NixOS gateway module DHCP · portal · tollgated · mint fleet steers routers via fleet.json fleet-agent on each router · pulls every 5 s runs the suite on its gateway, for every router tollgate-suite-wrt v0.1.0-rc.2 · OpenWrt .ipk / .apk · Linux proxyd captive portal for LAN phones one session per device tollgate-suite library pay · session · budget · spoof portal · nft · options exitd SOCKS5 exit for FIPS nodes one session per mesh node links tollgate-net · drives tollgated tollgate-rs v0.1.0-rc.2 · Rust · MIT tollgate-net tollgated mintd merchantd tolltop minttop merchanttop enforcers: ip · fips · external · loopback client: tollgate_net::client::run tollgate-core budgets · grants · access sans-IO · no_std tollgate-protocol wire format · CBOR TCP framing · no_std tollgate-net-esp32 separate project · same core · own wallet and enforcer Cashu ecash · NUTs Spilman channels FIPS mesh Lightning
protocol and node vouchers money gates fleet FIPS mesh

Read it bottom up: each layer builds on the one beneath it, and every arrow points at what it uses. tollgate-core never does I/O and knows nothing about networks: it would meter watt-hours or litres the same way. tollgate-net is what makes it about bytes. The suite and the fleet add no protocol of their own.

07

Where it runs

Your own node

tollgate-rs on its own: build it, depend on the crates, or install a package. Buy, sell, or both.

OpenWrt .ipkmacOS .pkgRust crates

One router

The tollgate-suite package: all six tollgate-rs binaries plus proxyd, each with a procd init script. Guest Wi-Fi, portal, speeds.

24.10 .ipk25.12 .apkaarch64_cortex-a53

A FIPS exit

exitd and a second tollgated instance sell internet to the mesh, on the router (fips-exit-setup) or any Linux server (make linux).

<npub>.fipsSOCKS :1080tollgated<name>

A fleet

Many routers as plain access points, bridged over FIPS to one NixOS gateway. Phones roam and keep what they paid. How it works

NixOS moduleGL-MT3000fleet
08

Where the code lives

RepositoryHoldsState
tollgate-rsThe protocol and its design docs; tollgate-protocol, tollgate-core, tollgate-net with tollgated, mintd, merchantd, their dashboards and the clientv0.1.0-rc.2 · tested between real nodes
tollgate-suite-wrtThe tollgate-suite library, proxyd, exitd, the OpenWrt and Linux packages; built against a pinned tollgate-rs commitv0.1.0-rc.2 · host-tested, not yet on a router
tollgate-fleetThe NixOS gateway module, the fleet command, the router agent and image builds, a Grafana dashboardv0.1.0 in development · not yet on hardware
tollgate-net-esp32A node for constrained devices on the same tollgate-core, with its own wallet and enforcerseparate project

Before this stack: TollGate v1, a Go module for OpenWrt (tollgate-module-basic-go) gating by MAC address with NoDogSplash, shipped in TollGate OS and listed on the release explorer. The Rust stack replaces it with Spilman channels, per-node byte mints and a resource-agnostic core.

09

Looking at a running node

tolltop --instance ipthe LAN's payers, budgets and rates
minttopthe mint: keysets, issued and redeemed
merchanttopthe market: sales, prices, holdings
/etc/init.d/tollgated instanceseach instance, its config and sockets
logread -e tollgate-ipone instance's log
fips-exit-setupturn the FIPS exit on
fleet statusevery router in a fleet
makebuild the suite against TOLLGATE_RS_REV