bytedribble seeks to implement an acceptable BitTorrent client with increasing correctness and completeness. This is purely a learning exercise and is currently (forever?) incomplete.
I am currently implementing the core BitTorrent protocol BEP-3 with the simple goal of downloading a file from a public tracker and participating in seeding as a well-behaved peer. Afterwards, I'm interested in
- usability features like partial file persistence to allow resumes and avoid storing all data in memory
- modern need-to-have features to be able to download most torrents in the wild
- support for compact peer lists - simple encoding/parsing change
- support for UDP trackers in practice, many modern trackers are UDP-only, meaning that trackers exclusively supporting HTTP trackers are obsolete
- peer-to-peer extensions like the DHT and PEX protocols
- networking-specific enhancements with uTP and support for holepunching (NAT traversal)
- "completing" basic implementation with the piece selection algorithms outlined in the BitTorrent Economics paper and Fast Extension
- extending the interface and design to be server-focused
- 2-3 rounds of benchmarking/profiling and performance tuning
- implementing a tracker
- 🦀 rust rewrite??
In addition to unit tests, I use a "lab" of docker containers to test end-to-end functionality by running a simple tracker and other (functional) BitTorrent client/peers (Transmission).