Our own keyless Bun service (not Linky's): watches relays for kind-1059 wraps
carrying the plaintext marker ["skatespots","push"] on the recipient copy,
extracts only {recipient, wrapId}, and sends a Web Push. NEVER decrypts - the
client fetches + decrypts the named wrap itself.
Endpoints: GET /health, GET /vapid-public-key, POST /auth/challenge ->
/subscribe|/unsubscribe with a one-time NIP-98 (kind 27235) challenge proof.
State is a JSON file; VAPID keys from env. Wired like the other standalone
servers (typecheck:push + check:push in npm test, deploy:push, Caddyfile +
systemd unit). Verified locally end-to-end: auth -> subscribe -> marked wrap ->
watcher -> push attempt, and proof replay rejected.
Client half (service worker, subscribe hook + Settings toggle, marker on DM
sends) is the next step.
11 lines
337 B
Caddyfile
11 lines
337 B
Caddyfile
# Caddyfile for the push service host.
|
|
#
|
|
# Caddy obtains a Let's Encrypt certificate automatically (HTTP-01), so ports 80
|
|
# and 443 must be reachable. The service itself binds localhost only.
|
|
#
|
|
# sudo cp Caddyfile /etc/caddy/Caddyfile && sudo systemctl reload caddy
|
|
|
|
push.skate-spots.org {
|
|
encode gzip
|
|
reverse_proxy 127.0.0.1:8788
|
|
}
|