cipherlink is a Cloudflare Worker that receives an encrypted ref query parameter, decrypts it with X25519 plus AES-GCM, and redirects to the decrypted destination.
- Requests without
refredirect toURL_BASE. - Valid encrypted payloads redirect to absolute
httporhttpsURLs. - Malformed payloads return
400 Invalid encrypted payload. - Decrypted targets with unsupported protocols return
400 Invalid redirect target. - Missing or invalid required configuration returns
500 Service misconfigured.
Set these bindings before running or deploying:
URL_BASE: fallback absolutehttporhttpsURL.PRIVATE_KEY_RAW: X25519 private key encoded as Base64URL raw 32-byte key material.
Use Wrangler secrets for PRIVATE_KEY_RAW:
bunx wrangler secret put PRIVATE_KEY_RAWInstall dependencies:
bun installRun the full local verification:
bun run checkStart the Worker locally:
bun run devDeploy:
bun run deployRegenerate Cloudflare Worker types after changing wrangler.jsonc:
bun run cf-typegenMIT