The perennial favorite programming pastime of yore.
$ go build
$ ./bittorrent [torrent_file.torrent]
If no torrent file is provided then the default test file will be used, which is for the latest Debian ISO.
Implementation follows the original BitTorrent spec and the unofficial spec which has more details relevant for implementation.
- Do requests to the tracker need to be truthful? Can we lie about how much we have downloaded/uploaded?
- No there doesn't seem to be a way to enforce honesty. More details about exploits and dishonesty in the protocol are covered here
- Would be interesting to implement an algorithm from the economics of BitTorrent paper: http://bittorrent.org/bittorrentecon.pdf