Skip to content
Projects

TheGreatAzizi/Secure-Pastebin-Cloudflare-Worker

View on GitHub

TheGreatAzizi/Secure-Pastebin-Cloudflare-Worker has 30 GitHub stars and 6 forks. GitHot measured 0 stars in 24 hours and 0 in 7 days. Last checked 2026-11-13 11:53 UTC. Last push 2026-10-21.

How these counts are measured

๐Ÿ” Secure Pastebin โ€” End-to-End Encrypted Message Sharing. Zero-knowledge, password protected, self-destructing. Live demo: https://sp.theazizi.ir #InternetForAll

What you can do

  • ๐Ÿ”’ AES-256-GCM Encryption - Military-grade encryption in your browser
  • ๐Ÿ›ก๏ธ Zero-Knowledge Architecture - Server cannot read your data. Ever.
  • ๐Ÿ”‘ Optional Password Protection - Extra layer with PBKDF2 key derivation
  • ๐Ÿ”ฅ Burn After Reading - Self-destruct after first view

Measured star growth

in 24h
0
in 7 days
0
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.md

Original

DevSponsors

Secure Pastebin Logo

๐Ÿ” Secure Pastebin

End-to-End Encrypted Message Sharing on Cloudflare Workers
Zero-Knowledge โ€ข Password Protected โ€ข Self-Destructing

๐Ÿš€ Live Demo โœจ Self-Hosted Ver

AES-256 Zero-Knowledge Cloudflare MIT License


โœจ Features

Feature Description
๐Ÿ”’ AES-256-GCM Encryption Military-grade encryption in your browser
๐Ÿ›ก๏ธ Zero-Knowledge Architecture Server cannot read your data. Ever.
๐Ÿ”‘ Optional Password Protection Extra layer with PBKDF2 key derivation
๐Ÿ”ฅ Burn After Reading Self-destruct after first view
โฑ๏ธ Expiration Control 1 hour to 30 days
๐ŸŒ Auto RTL Support Persian, Arabic, Hebrew auto-detection
๐Ÿ“ฑ Fully Responsive Works on all devices
๐Ÿšซ No Registration No emails, no accounts, no tracking

๐Ÿ” How It Works

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     AES-256-GCM      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Browser   โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ โ”‚  Cloudflare โ”‚
โ”‚  (Encrypt)  โ”‚                      โ”‚     KV      โ”‚
โ”‚  Key in URL โ”‚ โ†โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ”‚  (Storage)  โ”‚
โ”‚   Fragment  โ”‚                      โ”‚             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
  1. Client-Side Encryption: Message encrypted in browser before sending
  2. Key in URL Fragment: Decryption key never reaches server (after #)
  3. Zero Storage: Server only sees ciphertext, never plaintext
  4. Optional Password: PBKDF2 with 100,000 iterations for extra security

๐Ÿš€ Deployment Guide

This guide uses Cloudflare Dashboard (no CLI required) - the exact method used for sp.theazizi.ir

Prerequisites

  • Cloudflare account (free tier works)
  • 5 minutes of your time

Step 1: Create KV Namespace

  1. Go to dash.cloudflare.com
  2. From left sidebar: Storage & Databases โ†’ KV
  3. Click "Create a namespace"
  4. Name: PASTEBIN_KV
  5. Click "Create"

โš ๏ธ Important: Remember this exact name - PASTEBIN_KV


Step 2: Create Worker

  1. Go to Workers & Pages โ†’ Create application
  2. Click "Create Worker"
  3. Name your worker (e.g., secure-pastebin)
  4. Click "Deploy" (we'll replace the code next)

Step 3: Bind KV to Worker

This step is critical - connects your KV to the worker:

  1. In your Worker dashboard, click "Settings" tab
  2. Go to Bindings section
  3. Click "Add"
  4. Select "KV Namespace"
  5. Configure:
    • Variable name: PASTEBIN_KV (must match exactly)
    • KV namespace: Select the one you created in Step 1
  6. Click "Deploy"

Step 4: Add the Code

  1. In your Worker, go to "Edit code" (or Quick Edit)
  2. Delete all existing code
  3. Copy the entire worker.js from this repo
  4. Paste into the editor
  5. Click "Save and Deploy"

Step 5: Add Custom Domain (Optional)

To use your own domain like sp.theazizi.ir:

  1. In Worker dashboard, go to "Triggers" tab
  2. Click "Add Custom Domain"
  3. Enter your subdomain (e.g., sp.yourdomain.com)
  4. Add CNAME record in your DNS pointing to your worker
  5. Wait for SSL certificate (automatic)

๐Ÿ› ๏ธ Local Development (Optional)

If you prefer Wrangler CLI:

# Install Wrangler
npm install -g wrangler

# Login to Cloudflare
wrangler login

# Create KV namespace
wrangler kv:namespace create "PASTEBIN_KV"

# Update wrangler.toml with your KV ID
# Deploy
wrangler deploy

๐Ÿ” Security Details

Encryption

  • Algorithm: AES-256-GCM
  • Key Derivation: PBKDF2 (100,000 iterations)
  • IV: Random 12-byte per message
  • Key Location: URL fragment (never sent to server)

Privacy

  • No server-side logs
  • No analytics or tracking
  • No registration required
  • Messages auto-expire
  • Burn-after-read option

๐Ÿ“ Project Structure

secure-pastebin/
โ”œโ”€โ”€ worker.js          # Main Cloudflare Worker code
โ”œโ”€โ”€ README.md          # This file
โ””โ”€โ”€ LICENSE            # MIT License

๐ŸŒ Internet Freedom

#InternetForAll

Internet access is a fundamental human right.
Restricting internet access violates human rights and limits freedom of expression, access to information, and the ability to communicate securely. We believe in free, open, and secure internet for everyone โ€” regardless of borders, politics, or censorship.

This tool is built to ensure private, secure communication remains accessible to all.


๐Ÿค Contributing

Contributions welcome! Areas to improve:

  • File attachments (encrypted)
  • QR code generation for sharing
  • Custom themes
  • Browser extension

๐Ÿ“œ License

MIT License - see LICENSE file


๐Ÿ‘ค Author

TheGreatAzizi


Built with โค๏ธ for a free and open internet

Explore related projects