A TUI application for peer-to-peer connections and chat using Iroh.
- Provider Mode: Create a connection and generate a ticket for others to join
- Joiner Mode: Join an existing connection using a ticket
- Real-time Chat: Send and receive messages after connection is established
- File Sharing: Share files and directories with other peers in the chat.
- Real-time TUI: Interactive terminal interface with live updates
- Network Events: Monitor connection status and network activities
cargo run -- openThis will:
- Create an Iroh node
- Generate a connection ticket for a chat topic
- Display the ticket in the TUI for sharing
- Wait for connections
- Press Enter to start chatting once connected
cargo run -- join --ticket "YOUR_TICKET_HERE"or use the short flag:
cargo run -- join -t "YOUR_TICKET_HERE"This will:
- Connect to the provider using the ticket
- Show connection status
- Press Enter to start chatting once connected
To send a file, you can start the application with the send command:
cargo run -- open --send-file <PATH_TO_FILE>This will share the file with anyone who joins the chat.
Alternatively, you can use the /send <PATH_TO_FILE> command in the chat input box.
q- Quit the applicationEnter- Start chatting (after connection is established)
ESC- Return to connection infoCtrl+C- Quit the applicationEnter- Send messageBackspace- Delete character/send <PATH>- Share a file or directory./get <FILE_INDEX>- Download a shared file.
The application's performance is not artificially limited and aims to maximize the use of available system resources. While the iroh project does not publish official benchmark numbers due to the high variability of peer-to-peer network conditions, its design aims to saturate the available network bandwidth between peers.
- Download/Upload Speed: Transfer speeds are primarily limited by the network bandwidth of the participating peers, network latency, and CPU performance for encryption/decryption. In ideal conditions (e.g., a local network), transfers can be extremely fast, often limited only by disk I/O.
- File Size: The system is designed to handle large files and directories. The main limitations are the available disk space on the receiving end and memory for processing file metadata (collections).
- Number of Peers: The gossip protocol is efficient, but performance may degrade in chat rooms with a very large number of peers due to increased network traffic for message propagation.
- NAT Traversal: Connectivity between peers behind restrictive firewalls or NATs depends on the availability and performance of relay servers. Direct connections are always preferred and offer the best performance.
cargo build --releaseiroh- Peer-to-peer networkingratatui- Terminal UI frameworktokio- Async runtimeclap- Command-line argument parsing