52 lines
1.5 KiB
Markdown
52 lines
1.5 KiB
Markdown
# 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
|
|
|
|
1. Install Rust: https://rustup.rs/
|
|
2. Clone the repo:
|
|
```bash
|
|
git clone https://github.com/yourusername/p2p-chat.git
|
|
cd p2p-chat
|
|
```
|
|
3. Build & Run:
|
|
```bash
|
|
cargo run --release
|
|
```
|
|
|
|
## Usage
|
|
|
|
1. **Start the app**. You will see your **Peer ID** in the top bar.
|
|
2. **Share your Peer ID** with a friend.
|
|
3. **Connect**: Type `/connect <friend_peer_id>`.
|
|
4. **Chat**: Type messages and press Enter.
|
|
5. **Send Files**:
|
|
- Type `/file` to open a file picker.
|
|
- Or `/file /path/to/file` to send immediately.
|
|
- The recipient must type `/accept <file_id>` (or click accept if TUI supports mouse).
|
|
|
|
## 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.
|