p2p-chat lets two people chat directly over TCP with end-to-end encryption. There is no central server, no sign-up, and no message storage — just two peers connecting directly, with every message encrypted using NaCl box (X25519 key exchange + XSalsa20-Poly1305 authenticated encryption).Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Project516/p2p-chat/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Install Go and start chatting in under two minutes.
CLI reference
Every command, subcommand, and in-chat slash command documented.
Encryption
Learn how NaCl box keeps every message private and authenticated.
Architecture
Understand the host/connect model and message framing internals.
Key features
No central server
Peers connect directly over TCP. Nothing is routed through a third party.
End-to-end encrypted
NaCl box encrypts every message with a per-session shared key derived via X25519.
Ephemeral keys
A fresh key pair is generated for every connection — no key material persists to disk.
Simple CLI
Two subcommands (
listen and connect) and four in-chat slash commands cover everything.How it works
One peer runslisten to wait for an incoming connection. The other runs connect to dial in. Once the TCP connection is established, both sides perform an X25519 key exchange and derive a shared encryption key before any chat messages are sent.
Host starts listening
Run
go run . listen localhost:5555 to bind a TCP listener on the chosen address.Keys are exchanged
Both sides generate an ephemeral X25519 key pair, exchange public keys, and derive a shared NaCl box key. No key touches disk.