Skip to content

P2P encypted cli chat program built with rust

License

Notifications You must be signed in to change notification settings

ThePangel/Prusce

Repository files navigation

🔌 Prusce

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.

🚀 Features

  • 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.

🛠️ Installation

git clone https://github.com/thepangel/prusce.git

cd prusce
cargo install --path  .

📖 Usage

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"

How It Works

  1. Listens on your specified local port for an incoming connection from your peer.
  2. Connects to the peer's IP and port.
  3. Authenticates using a secure challenge-response handshake if a password is provided.
  4. Encrypts all messages using AES-256-GCM if a password is provided.
  5. Sends messages by typing and pressing Enter.
  6. Auto-reconnects if the connection is lost.

🔧 Current Status

  • 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 ^_____^

About

P2P encypted cli chat program built with rust

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages