Secure Peer-to-Peer Communications Platform
Enterprise grade encrypted peer-to-peer communications with zero-knowledge architecture. No servers store your data. No intermediaries access your keys. Complete operational security.
P2Pigeon is a decentralized communications platform designed for organizations requiring the highest levels of security and privacy. Unlike traditional video conferencing solutions that route all traffic through centralized servers, P2Pigeon establishes direct encrypted connections between participants.
Key Differentiators:
- Zero-Knowledge Architecture โ Encryption keys never leave user devices
- Serverless Operation โ No infrastructure to compromise or subpoena
- Metadata Protection โ IP addresses, network topology, and timing information are stripped
- Censorship Resistant โ Distributed hash table discovery prevents blocking
- Open Source โ Full audit capability, no hidden backdoors
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ P2PIGEON SYSTEM ARCHITECTURE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ PRESENTATION LAYER โ โ
โ โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ โ
โ โ โ Video UI โ โ Chat UI โ โ Data Room โ โ Contacts โ โ โ
โ โ โ (RoomPage) โ โ (Nostr) โ โ (Files) โ โ (ED25519) โ โ โ
โ โ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ โ โ
โ โโโโโโโโโโโผโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโ โ
โ โ โ โ โ โ
โ โโโโโโโโโโโผโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโ โ
โ โ PROTOCOL ABSTRACTION LAYER โ โ
โ โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ ProtocolManager.ts โ โ โ
โ โ โ โข Unified API for all communication protocols โ โ โ
โ โ โ โข Automatic protocol negotiation and fallback โ โ โ
โ โ โ โข Event normalization across protocol adapters โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ โผ โผ โผ โ โ
โ โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ WebRTCAdapter โ โServerlessMesh โ โ NostrAdapter โ โ โ
โ โ โ โ โ Adapter โ โ โ โ โ
โ โ โ โข ICE/STUN/TURN โ โ โข DHT Discovery โ โ โข Relay-based โ โ โ
โ โ โ โข DTLS-SRTP โ โ โข Mesh Topology โ โ โข NIP-04 E2E โ โ โ
โ โ โ โข DataChannel โ โ โข VAD Routing โ โ โข Persistence โ โ โ
โ โ โโโโโโโโโโฌโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ โ โ
โ โโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโ โ
โ โ TRANSPORT LAYER โ โ
โ โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ WebRTC โ โ Hyperswarm โ โ Nostr Relays โ โ โ
โ โ โ โ โ DHT โ โ โ โ โ
โ โ โ โข P2P Media โ โ โข Distributed โ โ โข Decentralized โ โ โ
โ โ โ โข NAT Traversal โ โ โข Serverless โ โ โข Redundant โ โ โ
โ โ โ โข Encrypted โ โ โข Holepunching โ โ โข Censorship- โ โ โ
โ โ โ โ โ โ โ Resistant โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ SECURITY LAYER โ โ
โ โ โ โ
โ โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ โ
โ โ โ AES-256-GCM โ โ X25519 โ โ ED25519 โ โ BLAKE3 โ โ โ
โ โ โ Symmetric โ โ Key โ โ Digital โ โ Hashing โ โ โ
โ โ โ Encryption โ โ Exchange โ โ Signatures โ โ โ โ โ
โ โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ โ
โ โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ Metadata Protection โ โ โ
โ โ โ โข SDP Sanitization (removes private IPs, MACs, hardware IDs) โ โ โ
โ โ โ โข ICE Candidate Filtering (strips host candidates, mDNS) โ โ โ
โ โ โ โข Timing Attack Mitigation (randomized delays) โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SERVERLESS MESH TOPOLOGY โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโ โโโโโโโ โ
โ โ A โโโโโโโโโ WebRTC โโโโโโโโโโโบโ B โ โ
โ โโโโฌโโโ (E2E) โโโโฌโโโ โ
โ โ โ โ
โ โ Hyperswarm DHT โ โ
โ โ โโโโโโโโโโโโโโโโโ โ โ
โ โโโโโโโบโ Discovery โโโโโโโโโโโโ โ
โ โ (No Server) โ โ
โ โโโโโโโบโ โโโโโโโโโโโโ โ
โ โ โโโโโโโโโโโโโโโโโ โ โ
โ โ โ โ
โ โโโโดโโโ โโโโดโโโ โ
โ โ C โโโโโโโโโ WebRTC โโโโโโโโโโโบโ D โ โ
โ โโโโโโโ (E2E) โโโโโโโ โ
โ โ
โ โ Zero infrastructure cost โ
โ โ Infinite horizontal scale โ
โ โ No single point of failure โ
โ โ Censorship resistant โ
โ โ 100+ participant support โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Specifications:
| Attribute | Value |
|---|---|
| Discovery | Hyperswarm DHT (Kademlia-based) |
| Signaling | Encrypted P2P via DHT |
| Media | WebRTC DTLS-SRTP |
| Topology | Full mesh (โค8), Selective forwarding (>8) |
| Max Participants | 100+ |
| Server Dependency | None (DHT relay for browser compat only) |
Traditional WebRTC with signaling server. Used when:
- Corporate firewalls block DHT traffic
- Legacy browser compatibility required
- Small team deployments (โค8 participants)
| Layer | Algorithm | Purpose | Key Size |
|---|---|---|---|
| Symmetric Encryption | AES-256-GCM | Message/file encryption | 256-bit |
| Key Exchange | X25519 | ECDH key agreement | 256-bit |
| Digital Signatures | ED25519 | Identity verification | 256-bit |
| Hashing | BLAKE3 | Integrity verification | 256-bit |
| Channel Security | Noise Protocol (XX) | Perfect forward secrecy | Per-session |
| Media Encryption | DTLS-SRTP | WebRTC media streams | Per-stream |
Mitigated Threats:
| Threat | Mitigation |
|---|---|
| Passive surveillance (ISP/State) | E2E encryption, no plaintext transit |
| MITM attacks | ED25519 identity verification, certificate pinning |
| Server compromise | Zero-knowledge architecture, no server-side keys |
| Metadata correlation | IP stripping, timing randomization |
| Replay attacks | Timestamps, nonces, sequence numbers |
| Traffic analysis | Padding, constant-rate options |
Out of Scope:
| Threat | Reason |
|---|---|
| Endpoint compromise | Requires device-level security |
| Participant recording | Social/policy problem, not technical |
// SDP Sanitization
sanitizeSDP(sdp) โ removes:
โโโ Private IP addresses (RFC 1918)
โโโ MAC addresses
โโโ Hardware identifiers
โโโ Network topology hints
โโโ Browser fingerprinting data
// ICE Candidate Filtering
sanitizeIceCandidate(candidate) โ removes:
โโโ Host candidates (local IPs)
โโโ mDNS candidates
โโโ Relay server identifiersVoice Activity Detection (VAD) automatically allocates bandwidth:
| Role | Resolution | Codec | Bitrate | Trigger |
|---|---|---|---|---|
| Primary Speaker | 1080p60 | AV1/VP9 | 8 Mbps | Active speech |
| Recent Speakers | 720p30 | VP9 | 2.5 Mbps | Speech in last 10s |
| Gallery View | 480p30 | VP8 | 1 Mbps | Visible in grid |
| Thumbnails | 240p15 | VP8 | 300 kbps | Minimized |
| Metric | Minimum | Recommended |
|---|---|---|
| Bandwidth (per stream) | 1 Mbps | 8 Mbps |
| Latency | <300ms | <100ms |
| Packet Loss | <5% | <1% |
| Ports | UDP 10000-60000 | Same |
pigeon/
โโโ app/ # Backend services
โ โโโ src/
โ โ โโโ server.ts # Express signaling server
โ โ โโโ hypernat/ # DHT relay for browsers
โ โ โโโ dataroom/ # Hyperdrive file manager
โ โ โโโ sfu/ # Optional SFU for large groups
โ โโโ package.json
โ
โโโ frontend/ # React SPA
โ โโโ src/
โ โ โโโ services/
โ โ โ โโโ protocols/
โ โ โ โ โโโ WebRTCAdapter.ts # WebRTC implementation
โ โ โ โ โโโ ServerlessVideoMesh.ts # P2P mesh engine
โ โ โ โ โโโ HyperswarmSignaling.ts # DHT signaling
โ โ โ โ โโโ sdpUtils.ts # Privacy utilities
โ โ โ โโโ ProtocolManager.ts # Protocol abstraction
โ โ โโโ context/
โ โ โ โโโ CommunicationContext.tsx # Global state
โ โ โโโ pages/
โ โ โ โโโ RoomPage.tsx # Video conferencing
โ โ โ โโโ DashboardPage.tsx # Main dashboard
โ โ โ โโโ NostrChatPage.tsx # Decentralized chat
โ โ โ โโโ DataRoom.tsx # Secure file sharing
โ โ โโโ components/
โ โ โโโ video/ # Video components
โ โ โโโ chat/ # Chat components
โ โ โโโ whiteboard/ # Collaboration tools
โ โโโ package.json
โ
โโโ docs/ # Documentation
- Node.js 18+ (LTS recommended)
- pnpm 8+
# Clone repository
git clone https://github.com/ArqonAi/pigeon.git
cd pigeon
# Install dependencies
pnpm install
# Start backend (signaling + DHT relay)
cd app && pnpm dev
# Start frontend (separate terminal)
cd frontend && pnpm dev
# Access application
open http://localhost:5173# frontend/.env
VITE_SIGNALING_URL=http://localhost:3060
VITE_DHT_RELAY_URL=ws://localhost:3051
# app/.env
PORT=3060
DHT_RELAY_PORT=3051# Build frontend
cd frontend && pnpm build
# Build backend
cd app && pnpm builddocker-compose up -d| Component | Minimum | Recommended |
|---|---|---|
| CPU | 2 cores | 4+ cores |
| RAM | 2 GB | 8 GB |
| Storage | 10 GB | 100 GB |
| Network | 100 Mbps | 1 Gbps |
// Initialize
const protocolManager = new ProtocolManager();
await protocolManager.initialize(configs);
// Join room
const room = await protocolManager.joinRoom(roomId, protocol);
// Media control
await protocolManager.startLocalStream(audioDeviceId, videoDeviceId);
protocolManager.stopLocalStream();
// Messaging
await protocolManager.sendMessage(roomId, content);
// Host controls
protocolManager.muteParticipant(peerId, muted);
protocolManager.kickParticipant(peerId);protocolManager.on('onPeerConnect', (peer) => { });
protocolManager.on('onPeerDisconnect', (peerId) => { });
protocolManager.on('onMessageReceived', (message) => { });
protocolManager.on('onRemoteStreamAdded', (peerId, stream) => { });We welcome contributions. Please read our Contributing Guide before submitting PRs.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
- TypeScript strict mode
- ESLint + Prettier formatting
- Comprehensive test coverage
- Documentation for public APIs
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
This means:
- โ You can use, modify, and distribute this software
- โ You can use it for commercial purposes
โ ๏ธ If you modify and deploy as a network service, you must release your source codeโ ๏ธ Derivative works must use the same license
See LICENSE for the full text.
P2Pigeon is a privacy-focused platform. We chose AGPL-3.0 to ensure:
- Transparency โ Anyone running a P2Pigeon service must share their modifications
- Trust โ Users can verify no backdoors exist in their service provider's version
- Community โ Improvements benefit everyone, not just proprietary forks
Built on:
- Hyperswarm โ Distributed networking
- Hyperdrive โ P2P file system
- Nostr โ Decentralized messaging protocol
- WebRTC โ Real-time communication
- React โ UI framework
- Tailwind CSS โ Styling