Fail Closed at Socket Time: A Loopback Probe for Zero-Bill Indie APIs
A weekend API stays free only if the process cannot leave the machine. Agent-written patches still compile when they import a billed SDK and open a TCP session on the first request. A fail-closed egress probe at boot lets a solo founder ship today, keep the wallet closed, and defer every third-party host until a human edits an allowlist. Vibe-coded backends fail as engineering when the network is…
A fail-closed egress probe at system startup allows a solo developer to release an API as a free weekend service while keeping the product's pricing hidden behind an allowlist. The JSON file allows only loopback IPs such as 127.0.0.1, localhost, and ::1, along with ports 8000 and 8080. If the server attempts to connect to any other host or port, it raises an error before the ASGI server binds.
This wallet-latch solution requires only three files: the allowlist.json policy, the egress_guard.py wrapper, and the test_egress_guard.py test suite. No cloud account is needed to run the code.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.