Build your own BitTorrent

Learn about .torrent files, the BitTorrent Peer Protocol and more

In this challenge, you’ll build a BitTorrent client that's capable of parsing a .torrent file and downloading a file from a peer.

Along the way, we’ll learn about how torrent files are structured, HTTP trackers, BitTorrent’s Peer Protocol, pipelining and more.


Decode bencoded strings
< 5 minutes

Bencode is a binary serialization format used in BitTorrent protocol. In this stage, you’ll decode a bencoded string.

Decode bencoded integers
5-10 minutes

In this stage, you’ll decode a bencoded integer.

show all...