v0.8.0 — DataChannel & Mesh Multi-party (2025-12-18)
Summary
Major feature release introducing peer-to-peer text chat, multi-party Mesh architecture, and security enhancements. This version transforms the project from a simple 1-on-1 demo to a full-featured multi-user communication platform.
✨ New Features
💬 DataChannel Chat
- Peer-to-peer messaging — No server relay for text messages
- Send button & Enter key — Intuitive message sending
- System notifications — Connection status updates in chat
- Per-peer channels — Individual DataChannels for each connection
👥 Multi-party Mesh Architecture
- Room member list — Real-time participant display
- Dynamic PeerConnection management — Automatic connection handling
- Video grid layout — Responsive layout for multiple remote streams
- Up to 50 participants — Per-room limit for performance
- Screen sharing — Display capture with automatic video replacement
- Local recording — MediaRecorder integration with WebM export
- Multi-party adaptations — All features work with multiple peers
🔒 Security Enhancements
- Origin validation — WebSocket origin whitelist via
WS_ALLOWED_ORIGINS
- Identity verification — Server-validated client IDs
- Heartbeat mechanism —
ping/pong keepalive for connection health
🔧 Implementation Details
Frontend Architecture
- Unified state machine — Predictable connection lifecycle
- Multi-PeerConnection support —
Map<string, Peer> for managing peers
- Perfect negotiation — Collision-free offer/answer handling
Backend Improvements
- Connection cleanup sequence — Prevents panic on rapid re-join
- Origin parsing — Flexible CORS-like origin validation
📁 Files Changed
1
2
3
4
5
6
| internal/signal/hub.go ← Origin validation, heartbeat
cmd/server/main.go ← WS_ALLOWED_ORIGINS parsing
web/app.js ← Major restructure for Mesh
web/index.html ← Chat UI, member list
docs/signaling.md ← Updated protocol docs
README.md ← Updated feature list
|
🔌 Configuration
New environment variable:
1
2
3
4
5
| # WebSocket origin validation
WS_ALLOWED_ORIGINS=localhost,yourdomain.com
# Use '*' to allow all origins (development only)
WS_ALLOWED_ORIGINS=*
|
🎯 Migration Guide
For Existing Users
- Update environment variables to include
WS_ALLOWED_ORIGINS
- No code changes required
- Existing 1-on-1 calls continue to work
For New Features
- Join a room with multiple participants
- Click member IDs to initiate calls
- Use chat box for text messaging
- Try screen share and recording
🐛 Known Limitations
- Mesh topology — Each participant relays media to all others (N-1 connections)
- Browser performance — Large rooms (20+) may strain client devices
- No server-side media — Pure P2P, no recording or processing on server
🔮 Future Work
- SFU architecture for large-scale calls (100+)
- Selective forwarding for bandwidth optimization
- Server-side recording capabilities
← Back to Changelog Index