Pure P2P browser chat and file transfer for two people
日本語 | 한국어 | Español | Français
- Pure P2P WebRTC transfer, with no file relay through the server
- One shared session for both chat and file transfer
- No account, no install, open in the browser and use it
- Two-person flow with room code or share link
- Human-friendly 6-character room codes like
BOOK23 - URL includes
?code=ROOMCODEso refresh can restore the room context - Large file streaming support in modern browsers
- Multilingual UI: Chinese, English, Japanese, Korean, Spanish, French
Visit 0trace.org
Method 1: Docker
docker run -d -p 2029:2029 ghcr.io/momo2029/0trace:latestThen open http://localhost:2029.
Method 2: Build from Source
git clone https://github.com/momo2029/0trace
cd 0trace
./dev.sh- One side creates a room.
- 0trace generates a 6-character room code and a share link.
- The other side opens the link or enters the room code.
- Both browsers establish a direct WebRTC connection.
- Chat messages and files appear in the same conversation timeline.
If the page is refreshed, the URL keeps the ?code= parameter so the same browser can try to restore that room. If both sides leave and the room stays empty, it expires automatically after about 5 minutes.
0trace is intentionally strict:
- Only 2 people per room
- No TURN relay fallback for file data
- No server-side transfer fallback
- If a direct connection cannot be established, both sides need to switch networks and try again
That tradeoff keeps the product simple and keeps file contents off the server, but it also means some network combinations will fail.
Browser A <- WebSocket signaling -> Rust backend <- WebSocket signaling -> Browser B
| |
+------------------- WebRTC P2P data channel (chat + files) -----------+
Tech Stack
- Backend: Rust + Axum + Tokio + WebSocket
- Frontend: Vanilla JavaScript + WebRTC API + File System Access API
- Protocol: WebRTC DataChannel + custom message protocol
See ARCHITECTURE.md for details.
- File contents are transferred directly between the two browsers
- The server is used for signaling and room coordination only
- WebRTC uses DTLS/SRTP encrypted transport
- Anyone with the room code or share link can join the room, so treat them as sensitive
- Empty rooms expire after about 5 minutes
- Designed for exactly 2 participants
- Pure P2P means some NAT or enterprise network combinations may fail
- When direct connectivity fails, users must switch networks and retry
- Large file streaming depends on modern browser support
./dev.sh
make test
make buildSee CONTRIBUTING.md.
Issues and Pull Requests are welcome.
- Demo: https://0trace.org
- GitHub: https://github.com/momo2029/0trace
- Issues: https://github.com/momo2029/0trace/issues