Minimal, privacy-focused peer-to-peer file transfer built with WebRTC.
Direct browser-to-browser file transfer.
No accounts. No cloud storage. No unnecessary infrastructure.
Features · Architecture · Getting Started · Deployment · Security · Limitations
Relay is a lightweight peer-to-peer file transfer tool built with WebRTC.
Files are transferred directly between browsers whenever possible, without uploading them to a central storage server.
Relay focuses on:
- fast direct transfers
- minimal infrastructure
- privacy-focused architecture
- modern browser experience
- simple self-hosting
Unlike traditional upload-based platforms, Relay avoids storing user files on the server.
- Direct peer-to-peer file transfer
- WebRTC DataChannel transport
- Real-time transfer progress
- Multi-file sharing
- Drag & drop support
- QR room sharing
- Temporary room-based sessions
- Cross-platform browser support
- Responsive modern UI
- Files are not stored on the Relay server
- Transfers occur directly between peers whenever connectivity allows
- Signaling server only coordinates connection setup
- No database required
- No user accounts
- No file retention system
Relay uses WebRTC for direct browser-to-browser communication.
┌─────────────┐ Signaling ┌─────────────┐
│ Browser │ ───────────────────▶ │ Server │
│ Peer A │ ◀─────────────────── │ (WebSocket) │
└──────┬──────┘ └──────┬──────┘
│ │
│ ICE / SDP Negotiation │
└────────────────────────────────────────┘
│
▼
Direct WebRTC Connection
│
▼
┌─────────────┐ ┌─────────────┐
│ File Chunks │ ◀──────────────────▶ │ File Chunks │
│ Peer A │ │ Peer B │
└─────────────┘ └─────────────┘
- User creates or joins a room
- Peers connect through the signaling server
- WebRTC negotiation establishes a direct connection
- Files are chunked and streamed through RTCDataChannel
- Receiver reconstructs and downloads files locally
- React
- TypeScript
- Vite
- TailwindCSS
- Framer Motion
- WebRTC
- RTCDataChannel
- WebSocket Signaling
- Node.js
- Express
- WebSocket Server
WebRTC enables direct peer-to-peer communication between browsers.
Benefits include:
- lower infrastructure costs
- reduced latency
- no centralized file uploads
- faster LAN transfers
- minimal server involvement
Relay uses the server only for signaling and peer coordination.
The server does not participate in actual file transfers.
- Node.js 18+
- npm / pnpm / yarn
git clone https://github.com/byrishi/Relay.git
cd Relaynpm installnpm run devcd server
npm install
npm run devVITE_SIGNALING_SERVER=wss://your-domain.comPORT=3001
NODE_ENV=production| Service | Recommendation |
|---|---|
| Frontend | Vercel / Netlify / Cloudflare Pages |
| Signaling Server | Railway / Render / Fly.io / VPS |
WebRTC requires:
- HTTPS
- Secure WebSocket connections (WSS)
- Proper reverse proxy configuration
server {
listen 443 ssl;
server_name your-domain.com;
location / {
proxy_pass http://localhost:5173;
}
location /ws {
proxy_pass http://localhost:3001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
}Relay is designed around direct peer-to-peer communication and minimal infrastructure.
However:
This project should not be treated as hardened enterprise-grade infrastructure.
Please review the architecture and threat model before using Relay in highly sensitive environments.
- Transfers files directly between peers whenever possible
- Avoids centralized file storage
- Uses encrypted WebRTC transport
- Minimizes server involvement
- Guarantee anonymity
- Persist transfers across disconnects
- Prevent endpoint compromise
- Bypass restrictive enterprise firewalls
- Provide advanced metadata protection
Relay currently uses public STUN servers for NAT traversal.
This works well for many standard home and office environments.
Some restrictive networks may require TURN relay support.
Examples include:
- corporate networks
- university networks
- CGNAT mobile carriers
- restrictive public WiFi
TURN support is planned for future releases.
Relay intentionally prioritizes simplicity and lightweight infrastructure.
Current limitations include:
- Some restrictive networks may fail to establish peer connections
- Safari support may be less stable than Chromium browsers
- Mobile browsers may throttle transfers in background tabs
- Interrupted transfers are not yet resumable
- Both peers must remain online during transfers
- Browser memory limits may affect extremely large files
| Browser | Status |
|---|---|
| Chrome | Supported |
| Edge | Supported |
| Firefox | Supported |
| Safari | Partial |
| Mobile Browsers | Experimental |
Relay/
├── client/
├── server/
├── components/
├── hooks/
├── lib/
├── public/
├── README.md
└── package.json
Relay intentionally prioritizes:
- simplicity over feature bloat
- direct transfers over cloud infrastructure
- transparency over exaggerated claims
- understandable architecture
- lightweight deployment
The goal is to build a focused, self-hostable transfer tool that remains easy to understand and maintain.
Contributions are welcome.
Before opening a pull request:
- Read
CONTRIBUTING.md - Open an issue for major changes
- Keep pull requests focused and minimal
- Follow existing code style
npm run testIf you discover a security issue, please report it privately through SECURITY.md before opening a public issue.
MIT License.
See LICENSE for more information.
Built with:
- WebRTC
- React
- TypeScript
- Open web standards
Inspired by the idea that simple tools should remain simple.
Relay is an evolving open-source project.
It is already usable today, but still actively improving.
If you are looking for:
- direct browser-to-browser file transfer
- minimal infrastructure
- privacy-focused architecture
- self-hostable deployment
then Relay may fit your workflow well.
Feedback, issues, and contributions are always appreciated.
