Pay or PoW. A friendly site wearing a spiked collar.
Spikes402 is a small open-source reverse proxy that sits in front of a website. On the paths you choose, bots and scrapers must either pay a few sats over the Bitcoin Lightning Network (L402) or do some work (a proof-of-work puzzle, like Bitcoin mining in miniature). Everything else passes through untouched. Payments go straight to your own node; Spikes402 never holds anyone's money.
This page is free. The premium section is protected by
Spikes402 itself: you will get an HTTP 402 Payment Required and a puzzle to solve.
This demo runs in proof-of-work-only mode: Lightning payments are not enabled here yet, so the puzzle (about 10 seconds of one CPU core) is the only way in. The premium content is a short note, not a real paywalled product.
From a terminal, the example bot in the repository solves it for you:
git clone https://github.com/Choffolo/spikes402 cd spikes402 && go build -o bin/ ./cmd/... bin/spikes-bot -mode pow https://spikes402.dev/premium/
Experimental prototype (AGPLv3). Not independently reviewed yet, so do not use it with real money on mainnet. Code, docs and security policy: github.com/Choffolo/spikes402.