This repository implements the BitTorrent protocol and comes with a minimal CLI BitTorrent client.
The torrent package is written with focus on scalability, it is well documented and can be used by other projects as well. Interfaces like PieceSelector make this package configurable and distinct from others. Aside from the core protocol specification, charo implements:
- Extension for Peers to Send Metadata Files (aka Magnet Links)
- UDP Tracker Protocol
- DHT Protocol (anacrolix package)
- Tracker Scrape Extension
- Tracker Returns Compact Peer Lists
As a side note, charo doesn't support IPv6 yet.
Go >= 1.13 is required
-
Library:
go get -d github.com/lkslts64/charo-torrent/torrent
go install github.com/lkslts64/charo-torrent/torrent@latest
-
Client:
go get -d github.com/lkslts64/charo-torrent/cmd/charo-download
go install github.com/lkslts64/charo-torrent/cmd/charo-download@latest
To download a torrent from a file:
The following command assumes that the client is installed and the executable 'charo-download' is in $PATH (because $GOPATH/bin should be in $PATH). <file> is propably a file with .torrent extension.
$ charo-download -torrentfile <file>
The downloaded files will be available under the current working directory.
To download a torrent from a magnet:
<magnet> is a magnet URI
$ charo-download -magnet <magnet>
Read the docs or check the minimal cli client.
Contributions are welcome! Come to chat on gitter
Logo designed by Leia