P2P Direct Transfer WebRTC
Send files, chat messages, and make video calls directly between two agents using WebRTC. The NFLTR server handles signaling only — actual data flows peer-to-peer. Zero data touches the server.
How It Works
NFLTR uses `WebRTC` data channels for file transfer and chat, and WebRTC media tracks for video/audio. The server provides signaling (SDP offer/answer exchange) over the existing gRPC connections, then steps aside. STUN handles NAT traversal automatically.
Modes
File Transfer
# Send a file peer-to-peer
nfltr p2p send report.pdf agent-b
# Send a directory
nfltr p2p send ./build-output/ agent-b
# Receive files (on Agent B)
nfltr p2p recv --output ./downloads/
Chat
# Start an encrypted P2P chat
nfltr p2p chat agent-b
# Interactive terminal chat with typing indicators
# All messages go directly between agents
Video Call
# Start a P2P video call
nfltr p2p call agent-b
# Opens a local browser window with WebRTC video/audio
# Direct peer connection — zero server relay
How It Differs from A2A
| Feature | A2A Messaging | P2P Direct |
|---|---|---|
| Data path | Through server | Direct peer-to-peer |
| Protocol | gRPC | WebRTC |
| Best for | Small messages, commands | Large files, media |
| Server sees data | Yes (encrypted in transit) | No — signaling only |
| Video/audio | Not supported | Full WebRTC media |
| NAT traversal | Via server relay | STUN/ICE direct |
Security
🔐 E2E Encrypted
WebRTC DTLS + SRTP encryption. AES-256-GCM for data channels. The server cannot decrypt any transferred data.
🔑 Mutual Auth
Both agents authenticate via HMAC before establishing the WebRTC connection. No anonymous peers.
🌐 STUN Traversal
Built-in STUN client discovers public IP and port mappings. Works behind most NAT types.
📊 Zero Knowledge
The server only sees signaling metadata. File contents, chat messages, and video streams never leave the direct connection.
If direct P2P fails (symmetric NAT on both sides), NFLTR falls back to end-to-end encrypted relay through the server. The data is still encrypted — the server cannot read it.
Use Cases
- Large file transfer — Send multi-GB files directly between agents without server bandwidth limits.
- Secure collaboration — Real-time chat with zero-knowledge encryption for sensitive discussions.
- Remote support — Video calls between technicians and on-site operators for visual troubleshooting.
- Data replication — Synchronize databases or backups between sites without cloud storage intermediaries.
- Media streaming — Stream camera feeds or screen shares between peer agents.
Transfer files directly — no server in the middle
WebRTC-powered peer-to-peer with automatic NAT traversal.
CLI Reference E2E Encryption →