Building a Privacy-First URL Shortener on Blockchain
说明与用途
一个隐私优先的 URL 缩短器,使用客户端加密并将加密链接存储在区块链上,避免服务器端跟踪和数据泄露。
问题
Traditional URL shorteners log IPs, timestamps, user agents, track browsing patterns, and sell data, creating a privacy nightmare and central database vulnerability.
结果
A fully functional, privacy‑first URL shortener that stores only encrypted URLs on a blockchain, eliminating server‑side tracking and central data breaches.
工作流
- 1. User enters a URL in the client UI.
- 2. Client generates a random IV and AES‑GCM key using Web Crypto API.
- 3. Client encrypts the URL buffer with the key and IV.
- 4. Client sends the encrypted payload to a Cloudflare Worker endpoint.
- 5. Worker writes the encrypted data to the Cronos blockchain via a smart contract or storage API.
- 6. Worker returns a short code to the user.
- 7. When the short code is accessed, the Worker fetches the encrypted payload from the blockchain.
- 8. The browser decrypts the payload locally with the stored key, revealing the original URL.
- 9. Browser redirects to the decrypted destination URL without exposing it to the server.
证据
Encrypted URL stored on Cronos blockchain
Server never sees destination URLs
- 记录日期: 2026-09-06T16:36:48.225Z