Skip to content

client for downloading files with bittorrent protocol

License

Notifications You must be signed in to change notification settings

WendelHime/gotorrent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoTorrent Client

GoTorrent is a lightweight and efficient command-line BitTorrent client written in Go.

Features

  • Download torrents (not so efficiently yet).
  • Simple and easy-to-use command-line interface.

Installation

To install GoTorrent, you need to have Go installed on your system. Then, you can use the following command:

go get github.com/WendelHime/gotorrent

Build

go build -o gotorrent ./cmd/gotorrent 

Usage

gotorrent -torrent <torrent-filepath> -output <output-directory>
  • <torrent-filepath>: Path to the torrent file you want to download
  • <output-directory>: Directory where the downloaded files will be saved. If the directory doesn't exist, it will be created.

Example:

./gotorrent -torrent internal/integration/sample.torrent -output ./output

Testing

go test -cover -race ./...

Known issues

  • This program only support ipv4 addresses.
  • This program only support single file torrents. (sorry you won't be able to download shrek movies right now)
  • I've only tested with a couple torrent files like for debian images - look for the best mirror for you and if there's any torrent file available you can try it (don't forget to verify/validate hashes!)

Future improvements

  • Add support to multi-file torrents
  • Add support to ipv6 addresses
  • Keep track of stored pieces and download missing pieces if the program was interrupted
  • Add more unit tests/improve test coverage
  • Seed data

About

client for downloading files with bittorrent protocol

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published