![]()
A secure, fast, and browser-based file sharing system built using Python & Django.
It supports direct peer-to-peer transfer and a backup Upload & Share mode, so file sharing always works — no matter the network.
P2P File Transfer allows users to share files in two smart ways:
- Files are sent directly from sender to receiver
- Works best on same Wi-Fi / local network
- Extremely fast ⚡
- No server storage involved
- End-to-End Encrypted
- Used when P2P is not possible (different networks / offline user)
- File is encrypted and uploaded temporarily
- A secure shareable link is generated
- File is auto-deleted after a short time
This hybrid approach ensures the transfer never fails.
- 🚫 No need for Google Drive, WhatsApp, or Email
- ⚡ Much faster than cloud apps on local Wi-Fi
- 🔐 Files stay private with encryption
- 🌍 Works on any modern browser (mobile & desktop)
- 🧪 Great real-world project for learning networking concepts
- ✅ Live P2P Transfer (WebRTC based)
- ✅ Upload & Share fallback mode
- End-to-End Encryption (E2EE) for P2P transfers
- Encrypted storage for uploaded files
- Private rooms using unique Room IDs
- No account or name required
- Chunk-based transfer (handles large files safely)
- Real-time progress bar & speed indicator
- Auto cleanup of uploaded files
- Dark mode with modern UI
- Mobile & desktop responsive
- Separate tabs for Send / Receive / Settings
- Backend: Django (Python)
- Realtime: Django Channels + WebSockets
- P2P: WebRTC
- Encryption: Web Crypto API / Fernet
- Frontend: Vanilla JavaScript + CSS
git clone https://github.com/ShivamXD6/P2P_File_Transfer
cd path/to/root/directory
pip install uvSECRET_KEY="example_secret_key" # https://stackoverflow.com/a/57678930
ENCRYPTION_KEY="example_encryption_key" # https://cryptography.io/en/latest/fernet/#cryptography.fernet.Fernet
DEBUG=True # For developmentpython -m uv run manage.py migratepython -m uv run manage.py runserver 0.0.0.0:8000localhost:8000