Skip to content

sam4815/go-torrent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

25 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

go-torrent

go-torrent.mov

About

This project is a partial implementation of the BitTorrent protocol. Given a torrent file, go-torrent is able to find peers and download the associated files piece by piece. This was intended as a way to more deeply understand a protocol I've always been curious about.

The client supports HTTP and UDP trackers, multi-file torrents, and the ability to pause and resume downloads. At the moment, it only leeches - that is, it doesn't support uploading pieces - but this is something I would like to revisit at some point in the future.

Usage

To initiate a download:

go run main.go --file ./path/to/my/torrent

You can also pass a debug flag to see the requests being made under the hood.

Resources

  1. https://blog.jse.li/posts/torrent/
  2. https://wiki.theory.org/BitTorrentSpecification

About

๐Ÿ—ƒ๏ธ Building a torrent client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages