Skip to content

dbonfigli/yatorrent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

387 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YATORRENT - yet another torrent client

A command line torrent client written in rust, implementing the Torrent protocol v1.0 (BEP 3, detailed spec) over TCP, with the following extensions:

This is a didactic project I created purely to learn rust, it is far from feature complete or production ready, albeit working: it has been tested to saturate a 1Gb/s internet connection with low cpu usage.

Compile with:

$ cargo build --release

and run with:

$ yatorrent -t <path to torrent file>

All command line arguments (show them with the --help), also definable via environment variables:

Usage: yatorrent [OPTIONS]

Options:
  -t, --torrent-file <TORRENT_FILE>
          Path to the .torrent file (optional, either this or a magnet link must be provided) [env: TORRENT_FILE=]
  -m, --magnet-uri <MAGNET_URI>
          Magnet Link URI (optional, either this or a torrent file must be provided) [env: MAGNET_URI=]
  -b, --base-path <BASE_PATH>
          Base path where files are downloaded (directory will be created if it does not exist) [env: BASE_PATH=] [default: _current working dir_]
  -p, --port <PORT>
          Listening port for Torrent protocol [env: PORT=] [default: 8000]
  -d, --dht-port <DHT_PORT>
          Listening port for DHT protocol [env: DHT_PORT=] [default: 8001]
  -l, --log-level <LOG_LEVEL>
          Log level [env: LOG_LEVEL=] [default: info] [possible values: trace, debug, info, warn, error]
  -s, --show-peers-stats
          Show detailed stats per peer [env: SHOW_PEERS_STATS=]
  -c, --max-connected-peers <MAX_CONNECTED_PEERS>
          Maximum number of connected peers allowed [env: MAX_CONNECTED_PEERS=] [default: 100]
  -z, --max-download-bandwidth <MAX_DOWNLOAD_BANDWIDTH>
          Max allowerd total download bandwidth, with associated unit, e.g 10MiB (MiB is different from MB, the value is always bytes regardless of the case of "b", optional, no limit if not provided) [env: MAX_DOWNLOAD_BANDWIDTH=]
  -u, --max-upload-bandwidth <MAX_UPLOAD_BANDWIDTH>
          Max allowerd total upload bandwidth, with associated unit, e.g 10MiB (MiB is different from MB, the value is always bytes regardless of the case of "b", optional, no limit if not provided) [env: MAX_UPLOAD_BANDWIDTH=]
  -e, --exit-when-complete
          Exit the client when the download is complete [env: EXIT_WHEN_COMPLETE=]
  -h, --help
          Print help
  -V, --version
          Print version

Things yet to be implemented / todos:

Releases

No releases published

Packages

 
 
 

Contributors

Languages