Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iroh-connect

A TUI application for peer-to-peer connections and chat using Iroh.

Features

  • 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

Usage

Run as Provider

cargo run -- open

This will:

  1. Create an Iroh node
  2. Generate a connection ticket for a chat topic
  3. Display the ticket in the TUI for sharing
  4. Wait for connections
  5. Press Enter to start chatting once connected

Join as Client

cargo run -- join --ticket "YOUR_TICKET_HERE"

or use the short flag:

cargo run -- join -t "YOUR_TICKET_HERE"

This will:

  1. Connect to the provider using the ticket
  2. Show connection status
  3. Press Enter to start chatting once connected

Send a file

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.

Controls

Connection Screen

  • q - Quit the application
  • Enter - Start chatting (after connection is established)

Chat Screen

  • ESC - Return to connection info
  • Ctrl+C - Quit the application
  • Enter - Send message
  • Backspace - Delete character
  • /send <PATH> - Share a file or directory.
  • /get <FILE_INDEX> - Download a shared file.

Performance and Limitations

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.

Building

cargo build --release

Dependencies

  • iroh - Peer-to-peer networking
  • ratatui - Terminal UI framework
  • tokio - Async runtime
  • clap - Command-line argument parsing

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages