Peer-to-Peer Rust Secure Chat Encryption
A simple, secure, and colorful peer-to-peer chat application built with Rust. It establishes direct TCP connections between users, bypassing central servers, and provides optional end-to-end encryption for secure communication.
- Direct P2P: Connect directly to another user's IP and port.
- End-to-End Encryption: Secure your messages with AES-256-GCM. Communication is unencrypted by default unless a password is provided.
- Challenge-Response Authentication: Securely authenticates users without sending passwords or hashes over the network.
- Colorful CLI: A visually appealing command-line interface with unique colors for each user.
- Auto-Reconnection: Automatically retries failed connections.
- Cross-Platform: Works on Windows, macOS, and Linux.
git clone https://github.com/thepangel/prusce.git
cd prusce
cargo install --path .The application can run in both encrypted and unencrypted modes.
# Connect to another user without encryption
prusce peer_ip>gt; peer_port>gt; your_local_port>gt;
# Connect with a custom username
prusce peer_ip>gt; peer_port>gt; your_local_port>gt; --username your_username>gt;
# Connect with end-to-end encryption (recommended)
prusce peer_ip>gt; peer_port>gt; your_local_port>gt; -u your_username>gt; -p your_password>gt;
# Example: Connect to 192.168.1.100 on port 8080, listen on port 3345, with encryption
prusce 192.168.1.100 8080 3345 -u myuser -p "a-very-secret-password" - Listens on your specified local port for an incoming connection from your peer.
- Connects to the peer's IP and port.
- Authenticates using a secure challenge-response handshake if a password is provided.
- Encrypts all messages using AES-256-GCM if a password is provided.
- Sends messages by typing and pressing Enter.
- Auto-reconnects if the connection is lost.
- Basic TCP connection
- Message sending and receiving
- Auto-reconnection logic
- CLI argument parsing
- End-to-End Message encryption (AES-256-GCM)
- Secure Challenge-Response Authentication
- NAT traversal (hole punching server)
Built with Rust 🦀 and 💖 by thepangel ^_____^