Skip to content

DeH40/CloudDrop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

54 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

CloudDrop

CloudDrop Logo

A modern, secure peer-to-peer file sharing tool built on Cloudflare Workers.

๐ŸŒ Live Demo โ€ข ๐Ÿ‡จ๐Ÿ‡ณ ไธญๆ–‡ๆ–‡ๆกฃ โ€ข Features โ€ข Deploy โ€ข Development

Cloudflare Workers WebRTC License


โœจ Features

Core Features

  • ๐Ÿš€ 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

Advanced Features

  • ๐Ÿ” 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, ุงู„ุนุฑุจูŠุฉ)

๐Ÿ–ผ๏ธ Screenshots

Desktop Main Interface
Desktop - Peer Discovery
File Transfer
Desktop - File Transfer
Mobile Interface
Mobile - Main Interface
Mobile File Transfer
Mobile - File Transfer

๐Ÿš€ One-Click Deploy

Deploy your own CloudDrop instance to Cloudflare Workers:

Deploy to Cloudflare Workers

Try it first: Visit cloudrop.cc to see CloudDrop in action.

๐Ÿ› ๏ธ Development

Prerequisites

Local Development

# Clone the repository
git clone https://github.com/DeH40/cloudDrop.git
cd cloudDrop

# Install dependencies
npm install

# Start development server
npm run dev

The development server will start at http://localhost:8787.

Deploy to Production

# Login to Cloudflare (first time only)
npx wrangler login

# Deploy
npm run deploy

โš™๏ธ Configuration

Optional: TURN Server (for NAT traversal)

For better connectivity across restrictive networks, you can configure Cloudflare's TURN service:

  1. Get your TURN credentials from Cloudflare Dashboard
  2. Add secrets to your worker using one of these methods:

Method 1: Via Cloudflare Dashboard (Recommended)

  1. Go to Cloudflare Dashboard โ†’ Workers & Pages
  2. Select your CloudDrop worker โ†’ Settings โ†’ Variables and Secrets
  3. Click "Add" under "Secrets" section
  4. Add two secrets:
    • Name: TURN_KEY_ID, Value: Your TURN Key ID
    • Name: TURN_KEY_API_TOKEN, Value: Your TURN API Token
  5. Click "Deploy" to apply changes

Method 2: Via Command Line

npx wrangler secret put TURN_KEY_ID
npx wrangler secret put TURN_KEY_API_TOKEN

Without TURN configuration, CloudDrop will use public STUN servers for WebRTC connection.

๐Ÿ“ Project Structure

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

๐Ÿ”ง Tech Stack

  • 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

๐Ÿ”’ Security

CloudDrop implements multiple layers of security:

  1. Transport Encryption - All WebRTC connections use DTLS
  2. Application Encryption - AES-256-GCM with per-session keys
  3. Key Exchange - ECDH (P-256) for secure key negotiation
  4. Room Passwords - Optional password protection with PBKDF2 derivation
  5. Zero Knowledge - Server never sees file contents or encryption keys

๐ŸŒŸ Star History

Star History Chart

๐Ÿ“„ License

MIT ยฉ DeH40


Made with โค๏ธ for seamless file sharing

About

A modern, secure peer-to-peer file sharing tool built on Cloudflare Workers.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors