A simple BitTorrent client written in Rust.
This project is a command-line BitTorrent client that can decode torrent files, inspect their contents, and download files from peers.
- Decode bencoded strings.
- View information about
.torrentfiles. - Discover peers from a tracker.
- Perform handshakes with peers.
- Download single or multiple pieces of a file.
- Download files from magnet links.
- Rust and Cargo installed.
cargo build --releaseThe client is operated through a series of subcommands.
Decode a bencoded string:
./torrentor decode "<encoded_string>"Show information about a torrent file:
./torrentor info <path/to/your.torrent>List peers for a torrent:
./torrentor peers <path/to/your.torrent>Perform a handshake with a peer:
./torrentor handshake <path/to/your.torrent> <peer_ip:port>Download a single piece:
./torrentor download_piece -o <output_path> <path/to/your.torrent> <piece_index>Download the full file from a torrent:
./torrentor download -o <output_path> <path/to/your.torrent>Download from a magnet link:
./torrentor magnet_download -o <output_path> "<magnet_link>"