Many paths, drawn as graphs
Each way out of the house is a small graph: the client, the servers it passes through, and a rule on every line saying which traffic takes that hop.
A route can be one server, or a chain where only some traffic continues. The everyday route sends overseas traffic to a fast US server and forwards only the AI and banking domain groups to a server on a residential connection, because those sites are the strictest about where you appear to be. Routes are edited by dragging servers onto a canvas and drawing lines between them. The same graphs drive the home gateway and every phone or laptop subscription.
The control plane runs entirely on Cloudflare: a Worker serves the panels and renders subscriptions, D1 holds users, servers and route graphs, and KV keeps snapshots. Each server runs a small agent that the Worker reaches through its own tunnel, so no server depends on another one being up. When one server's address became unreachable from home, I added a second way in through a CDN and a switch in the panel. The route names stay the same, so nobody re-imports anything.
- visual route editor
- per-hop domain groups
- display-only nodes that show quota left
- per-server live health
- access history
- direct-connection rules
Failing safely, automatically
The rule from the start: if the gateway breaks, nobody at home should notice anything worse than a slower Google. Several layers enforce it.
- RouterWatchdog on the main router
A script on the router checks the gateway continuously and withdraws the policy route the moment it stops answering. It finds the MacBook by its network card's hardware address, so the cable can go into any port in the house.
- GatewayOne engine, kept alive by the OS
The MacBook runs a single routing engine as a system service that restarts itself. Two heartbeats, one from the MacBook and one from the router, report to the cloud, so the panel still knows what is happening when the MacBook is off.
- ServersSelf-tests through the real protocol
Every 15 minutes the Worker asks each server to run a real client handshake against itself. This exists because once a server looked perfectly healthy while every client had silently stopped working.
- PeopleAutomatic screening
Each subscription can opt into nine checks: hourly and daily volume, sustained speed, upload ratio, always-on behaviour, concurrent sessions, new connections per minute, unique destinations, a blacklist and per-target rate. A tripped check pauses that one subscription and raises an alert in the dashboard.
- PanelOne button, no terminal
The home panel turns all of this into a status light and one button: pause, resume or re-apply, plus a cable check and a route picker. It polls slowly when idle and quickly after a click, to stay inside the free tier's daily request limit.
The retired MacBook
The gateway is a 2019 MacBook Pro that would otherwise sit in a drawer. With the lid closed and a USB 2.5 GbE adapter, it handles the whole house.
It runs the routing engine in TUN mode as a root service, with a small local status page as a fallback when the cloud panel is unreachable. The router's policy route points every device at it. Nothing on the phones or the TV needs configuring.
The first USB adapter dropped almost one in ten packets it sent under load, which looked like random Wi-Fi trouble until we measured it. A different chipset fixed it.
The dashboard
The real control panel, running on invented data. Edit a route in the node editor, change someone's quota, or open a subscription's QR code. Nothing here reaches a real server.
Subscription and routing dashboard
demo data · in Chinese, as I use it · open full screen ↗Things to try: 节点编辑 (node editor) opens the route canvas. Drag a server in and click a line to choose which domain groups take that hop. 编辑 on a person shows their subscription items with a live preview, including display-only lines that appear only when, say, fewer than 14 days are left.
The home panel
What my family sees. Use the box in the corner to unplug the gateway's cable or power it off, and watch the router take the house direct.
Home gateway panel
demo data · open full screen ↗Both panels read the same data, as they do in real life. A route you edit in the dashboard shows up in the home panel's route picker and traffic diagram.
What broke, and what changed
Most of the design came from incidents. Each one left behind a check, a rule or a page of recovery notes.
| When | What people saw | Cause | What changed |
|---|---|---|---|
| Jun 2026 | Every client "connected" but no page loaded | The site the servers imitate changed its TLS behaviour | The 15-minute self-test and failure emails |
| 2026 | Speed test passes, no site opens | IPv6 attempts on servers that only have IPv4 | Servers forced to IPv4 for outbound traffic |
| Aug 2026 | The whole house offline at once | Gateway clock jumped to 2024, a TLS and DNS deadlock | Recovery steps that need no DNS |
| Aug 2026 | AI sites refusing or failing over TLS | Dual-stack sites reached over IPv6, bypassing the gateway | IPv6 off at the router, with a written rule to fix both sides together |
| Sep 2026 | Slow Wi-Fi upstairs only | A mesh node showed "online" but its radio was not broadcasting | Check what the radio actually broadcasts, not the saved config |
| Oct 2026 | 5 GHz Wi-Fi gone for 90 seconds | Automatic channel choice moved into a radar-check band | Documented, with the option to pin a channel |
| Oct 2026 | One server unreachable from home only | Its address was blocked on the home network | A second way in through a CDN, switchable per server |
Built with AI agents
Claude and Codex wrote the code across three of my computers and cloud sessions. That only worked because of a handoff system I built for them.
Agents forget everything between sessions, and several of them touched this project from different machines. They coordinate through one private repository: shared rules, a plan where every unfinished idea is written down, a short log after every meaningful step, and a rule to push every change immediately. One rule came straight from this project: a behaviour gets one implementation. When an agent copied a panel feature without the code it depended on, I had to report the same kind of bug three times.