78e1efeaead1050ac57093123a38c2fb7592aeaf
P2P Chat & File Transfer
A secure, serverless peer-to-peer chat application built with Rust and iroh.
Features
- Decentralized: No central server; peers connect directly via QUIC and NAT traversal.
- Commands:
/connect <peer_id>: Connect to a peer./nick <name>: Set your display name./file <path>: Send a file./accept <file_id_prefix>: Accept a file transfer./mic: Select microphone input./speaker: Select speaker output./bitrate <kbps>: Set audio bitrate.
- Cross-Platform: Works on Linux, Windows, and macOS.
- File sharing supported on all platforms.
- Voice/Screen share (Linux only for now, requires PipeWire).
Installation
- Install Rust: https://rustup.rs/
- Clone the repo:
git clone https://github.com/yourusername/p2p-chat.git cd p2p-chat - Build & Run:
cargo run --release
Usage
- Start the app. You will see your Peer ID in the top bar.
- Share your Peer ID with a friend.
- Connect: Type
/connect <friend_peer_id>. - Chat: Type messages and press Enter.
- Send Files:
- Type
/fileto open a file picker. - Or
/file /path/to/fileto send immediately. - The recipient must type
/accept <file_id>(or click accept if TUI supports mouse).
- Type
Configuration
Configuration is stored in:
- Linux:
~/.config/p2p-chat/config.toml - Windows:
%APPDATA%\p2p-chat\config.toml - macOS:
~/Library/Application Support/p2p-chat/config.toml
You can customize colors, default resolution, interface, etc.
Description
Languages
Rust
92%
JavaScript
6%
CSS
1.4%
HTML
0.6%