Thanks to visit codestin.com
Credit goes to github.com

Skip to content

dbonfigli/yatorrent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

367 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]
  -h, --help
          Print help
  -V, --version
          Print version

Things yet to be implemented / todos:

  • cache writes
  • optionally limit upload/download speed
  • better choking algorithm
  • check for stalled downloads / try new peers if no current one has a piece we want
  • better algorithm to exclude bad peers for new connections
  • remove not interested peers if we are also not interested if connection count is high
  • text-based UI / ncourses
  • BEP 29 - uTorrent transport protocol
  • BEP 55 - Holepunch extension

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages