rtrnt
Source: github.com/read-docs/rtrnt
What it is
A BitTorrent client that runs in the terminal. It takes .torrent files and magnet links,
finds peers through HTTP and UDP trackers, the DHT and peer exchange, and downloads pieces
from many peers at once, checking each one against its SHA-1 hash before it’s written to
disk. It seeds too, with tit-for-tat choking and optional ratio and time limits.
It’s async Rust on Tokio, with ratatui for the terminal UI. The bencode parser, the peer wire protocol and the DHT node are written for this project.
Features
- Magnet links (BEP 9), DHT (BEP 5) and peer exchange (BEP 11), so torrents without trackers work
- Extension protocol (BEP 10) and fast extension (BEP 6)
- Rarest-first piece selection, endgame mode and a request pipeline sized to each peer’s rate
- Resume files, so a restart after a clean exit hashes nothing
- Several torrents in one session, sharing a port, a DHT node, rate limits and a connection limit
- Choosing which files to download and in what order
- A watch directory that picks up new
.torrentand.magnetfiles
Terminal UI
A full-screen UI shows the session’s rates, a table of torrents and a detail panel with tabs for peers, a piece map, trackers, files and torrent info. From it you can add, pause, remove and recheck torrents, skip files or raise their priority, and set rate limits. It remembers its torrents between runs.
How to run
cargo run --release -- path/to/file.torrent -o ~/Downloads
cargo run --release -- 'magnet:?xt=urn:btih:...' -o ~/Downloads