Get the latest tech news
Building a BitTorrent client from the ground up in Go (2020)
What is the complete path between visiting thepiratebay and sublimating an mp3 file from thin air? In this post, we'll implement enough of the BitTorrent protocol to download Debian. Look at the [Source code](https://github.com/veggiedefender/torrent-client/) or skip to the [last bit](/posts/torrent#putting-it-all-together).
Your money will pay for legal aid and bail for protestors who have been arrested for standing up to police brutality, institutional racism, and the murder of Black men and women like George Floyd, Breonna Taylor, Ahmaud Arbery, and Nina Pop. We now have all the tools we need to download a torrent: we have a list of peers obtained from the tracker, and we can communicate with them by dialing a TCP connection, initiating a handshake, and sending and receiving messages. In particular, they offer a BitTorrent challenge which walks you through everything described in this post — parsing bencode, discovering peers, and downloading pieces — with test harnesses and scaffolding code for a bunch of languages.
Or read this on Hacker News