Bittorrent Client
A Python implementation of a BitTorrent client as defined in the official BitTorrent specification. It is capable of HTTP and UDP communication with public BitTorrent trackers, and peer-to-peer communication with other BitTorrent clients via TCP. For detailed documentation on the protocol, read this Wiki page.
Uses a bencode library to read .torrent files and extract the information needed to communicate with the tracker and join the swarm. It does this automatically when given the filename of a torrent file through the command line.
Capable of communicating to the tracker via HTTP or UDP, whichever is appropriate. Once it has the appropriate information, it begins communicating with peers as provided by the tracker. It is able to communicate with any peer following the BitTorrent protocol correctly, including commercial clients like uTorrent and qBittorrent
This project was originally created in collaboration in a team of four. I was solely responsible for implementing TCP communication and managing data exchange between clients, and worked on the main bittorrent.py file a lot as well. I've also made additions independently after uploading the project to my GitHub.
History
Jul 10, 2024: Project uploaded to GitHub
Sep 14, 2024: I wrote a new file that replaces filesystem.py, but with the capability of downloading torrent files with nested folders and multiple files.
Oct 17, 2024: Reworked tracker.py to allow for UDP connections and multiple connections.