Nerd stuff
A deliberately dumb relay between two smart endpoints.
LockPing answers one question — did I lock my PC? — with a phone app, a relay and an agent. The interesting part is what each piece is not allowed to know: the relay routes envelopes it cannot read, and the agent ignores everything that is not sealed by a paired device.
One WSS endpoint, four frame types: hello, envelope, presence, error. The payload of every envelope is an opaque "e1:" ciphertext — the relay routes on the address fields and understands nothing else. Identity is trust-on-first-use pinned to a public key, re-proven on every reconnect with a nonce challenge derived from an X25519 shared secret. Wrong answer: WebSocket close 4403, goodbye.
The QR contains a relay URL, an agent id and a one-time secret (5 minutes, single use). That secret never travels the network: the phone proves knowledge of it with an HMAC over its own identity, the agent answers with the same construction, and both sides keep each other's X25519 public key. From then on everything is a NaCl box with a fresh nonce per message — the same primitive in Go on the PC and tweetnacl in the browser.
The agent's gateway drops everything that is not a sealed message from a paired device — silently. The single plaintext exception is a valid pair_request while a pairing window is open on the PC itself. Lock commands additionally carry a nonce and timestamp, so replaying an old "lock" does nothing.
The agent never polls the OS. On Linux it subscribes to logind's PropertiesChanged on the system D-Bus; on Windows it creates a message-only window and lets WTSRegisterSessionNotification wake it on session changes. It also survives the classic trap of binding to systemd's Class=manager pseudo-session — the session picker is pure, unit-tested logic that re-resolves on every call.
You are installing a program that can lock your PC, so the agent is public under MIT, together with the canonical protocol document — you can read exactly what it does and what it deliberately cannot do (no remote unlock, no screen access, no telemetry). One static binary per OS, no admin rights needed, and the Windows build is signed twice: the exe first, then the installer built around it.
A gauge over your last 20 checks, ranked from Swinging Door to The Bunker — only a spotless window reaches The Bunker. Background polls don't count, so the app cannot punish you for merely being open. Scores live in localStorage; there is no server leaderboard, because that would be a database of when you leave your PC unlocked.