Skip to content

Torrust is a simple BitTorrent client implemented in Rust

Notifications You must be signed in to change notification settings

BitTorrust/torrust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Torrust

Description

Torrust is a simple BitTorrent client implemented in Rust as the final project of the networking course at Grenoble INP - ENSIMAG.

Requirements

  • libssl-dev: necessary for the reqwest crate

Development dependencies

All development dependencies are expected to be installed and in your path.

  • aria2c: aria2 is a command-line download utility that can be used both as a peer or a seeder for .torrent files.
  • opentracker: opentracker is a BitTorrent tracker.

Building

To build the project, run:

cargo build --release

Using Torrust

To execute Torrust, run:

cargo run --release -- your_torrent.torrent your_working_directory [--info|--debug]

If the working directory already contains the file to be downloaded, Torrust will seed the file. If the working directory does not contain or partially contains the file to be downloaded, Torrust will attempt to download the missing pieces while seeding the pieces it already has.

There are two log levels, info and debug. The default is no logs. If you want readable logs, run with --info. If you want specific logs, run with --debug.

If you need more details, a --help is available:

cargo run --release -- --help

A very humble Torrent client made with all our effort

Usage: torrust [OPTIONS] <TORRENT_FILE> <WORKING_DIRECTORY>

Arguments:
  <TORRENT_FILE>       The .torrent file path
  <WORKING_DIRECTORY>  The download path to store/upload the file described in .torrent

Options:
  -i, --info   Gives network peers information (bittorrent application, address IP, port, download/upload piece state)
  -d, --debug  Print minimal debug info
  -m, --mock   Communicate directly with three local peers using ports 2001, 2002 and 2003
  -h, --help   Print help information

Performance Tests

Test Torrust as leecher with one client

  1. Launch the script one-seeder.sh.

The script will launch aria as seeder with the respective torrent file and the working directory where is stored the file to upload. As an option, the listening port could be forced if desired.

./scripts/one-seeder.sh <TORRENT_FILE> <WORKING_DIRECTORY> [LISTEN_PORT]
  1. Launch Torrust with:
cargo run --release -- <TORRENT_FILE> <WORKING_DIRECTORY> [--info|--debug]

Test Torrust as seeder

  1. Launch the script tracker.sh
./scripts/tracker.sh
  1. Launch Torrust with
cargo run --release -- <TORRENT_FILE> <WORKING_DIRECTORY> [--info|--debug]
  1. Launch Vuze and open the torrent file

  2. At this moment Vuze will begin to download the file.

Test Torrust as leecher with multiple aria2c clients

On this test, each aria2c will have a percentage of the file that the client will download from them. There is no tracker involved on this test, the ports of each aria client are hardcoded on the script and on Torrust.

  1. Go to the ./scripts/multi-client directory

  2. Launch ./partial.sh to configure the different file parts each aria will have

  3. Launch the script named multi-seeders-iceberg.sh saved on the ./scripts folder with the following parameters

./scripts/multi-seeders-iceberg.sh <TORRENT_FILE> <WORKING_DIRECTORY> <WORKING_DIR_ARIAS>

Arguments:
  <TORRENT_FILE>       The .torrent file path
  <WORKING_DIRECTORY>  The download path to store/upload the file described in .torrent
  <WORKING_DIR_ARIAS>  The folder where are contained the aria subfolders, normally, it will be the /multi-client folder.

There is no tracker involved on this test, the ports of each aria client are hardcoded on the script. Also, the hardcoded ports of each aria client are used on Torrust when we indicate the flag --mock

Contact

Jean Diego Silva Fontena

Julien Liottard

Juan Jose Duarte Garcia

About

Torrust is a simple BitTorrent client implemented in Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •