A modern, secure peer-to-peer file sharing tool built on Cloudflare Workers.
๐ Live Demo โข ๐จ๐ณ ไธญๆๆๆกฃ โข Features โข Deploy โข Development
- ๐ Instant Sharing - Share files with anyone on the same network instantly
- ๐ End-to-End Encryption - All transfers encrypted using AES-256-GCM
- ๐ P2P Transfer - Direct peer-to-peer transfer via WebRTC, no server storage
- โ๏ธ Cloudflare Powered - Built on Cloudflare Workers for global edge deployment
- ๐ฑ Progressive Web App - Install as a native app on any device
- ๐ Room Sharing - Share a room code to connect with anyone, anywhere
- ๐ฌ Secure Messaging - Send encrypted text messages between devices
- ๐จ Beautiful UI - Modern glassmorphism design with light/dark/system theme modes
- ๐ Encrypted Rooms - Create password-protected rooms with double encryption
- ๐ Smart Relay Fallback - Auto fallback to relay mode when P2P fails (โค5s detection)
- ๐ Background P2P Recovery - Silently attempts to restore P2P after relay fallback
- โ Device Trust - Trust devices to auto-accept file transfers
- โน๏ธ Transfer Control - Cancel ongoing transfers at any time
- ๐ Connection Indicator - Visual indicator showing P2P or relay mode
- ๐ฒ Mobile Optimized - Touch-friendly UI with bottom navigation bar
- ๐ผ๏ธ Image Messaging - Send and receive images in chat
- ๐ Multi-language Support - Available in 9 languages (English, ็ฎไฝไธญๆ, ็น้ซไธญๆ, ๆฅๆฌ่ช, ํ๊ตญ์ด, Espaรฑol, Franรงais, Deutsch, ุงูุนุฑุจูุฉ)
|
Desktop - Peer Discovery |
Desktop - File Transfer |
|
Mobile - Main Interface |
Mobile - File Transfer |
Deploy your own CloudDrop instance to Cloudflare Workers:
Try it first: Visit cloudrop.cc to see CloudDrop in action.
- Node.js (v18+)
- Cloudflare Account (free tier works)
# Clone the repository
git clone https://github.com/DeH40/cloudDrop.git
cd cloudDrop
# Install dependencies
npm install
# Start development server
npm run devThe development server will start at http://localhost:8787.
# Login to Cloudflare (first time only)
npx wrangler login
# Deploy
npm run deployFor better connectivity across restrictive networks, you can configure Cloudflare's TURN service:
- Get your TURN credentials from Cloudflare Dashboard
- Add secrets to your worker using one of these methods:
Method 1: Via Cloudflare Dashboard (Recommended)
- Go to Cloudflare Dashboard โ Workers & Pages
- Select your CloudDrop worker โ Settings โ Variables and Secrets
- Click "Add" under "Secrets" section
- Add two secrets:
- Name:
TURN_KEY_ID, Value: Your TURN Key ID - Name:
TURN_KEY_API_TOKEN, Value: Your TURN API Token
- Name:
- Click "Deploy" to apply changes
Method 2: Via Command Line
npx wrangler secret put TURN_KEY_ID
npx wrangler secret put TURN_KEY_API_TOKENWithout TURN configuration, CloudDrop will use public STUN servers for WebRTC connection.
cloudDrop/
โโโ public/ # Static assets
โ โโโ index.html # Main HTML file
โ โโโ style.css # Styles (dark theme + glassmorphism)
โ โโโ manifest.json # PWA manifest
โ โโโ js/
โ โโโ app.js # Main application logic
โ โโโ config.js # Unified configuration constants
โ โโโ ui.js # UI components & helpers
โ โโโ webrtc.js # WebRTC + relay fallback + P2P recovery
โ โโโ crypto.js # Encryption (AES-GCM + room password)
โ โโโ i18n.js # Internationalization (9 languages)
โโโ src/
โ โโโ index.ts # Worker entry point
โ โโโ room.ts # Durable Object for WebSocket rooms
โโโ wrangler.toml # Cloudflare Workers configuration
โโโ package.json
- Runtime: Cloudflare Workers + Durable Objects
- Real-time: WebSocket for signaling
- Transfer: WebRTC Data Channels (P2P) + WebSocket relay (fallback)
- Encryption: Web Crypto API (AES-256-GCM, ECDH key exchange)
- Frontend: Vanilla JavaScript + Modern CSS
- i18n: 9 languages with auto-detection
CloudDrop implements multiple layers of security:
- Transport Encryption - All WebRTC connections use DTLS
- Application Encryption - AES-256-GCM with per-session keys
- Key Exchange - ECDH (P-256) for secure key negotiation
- Room Passwords - Optional password protection with PBKDF2 derivation
- Zero Knowledge - Server never sees file contents or encryption keys
MIT ยฉ DeH40
Made with โค๏ธ for seamless file sharing