Networking2024Shipped
PyTor
A BitTorrent client written from the protocol spec on raw TCP.
A peer-to-peer file-sharing client implemented directly against the BitTorrent specification: bencode parsing, tracker announce, the peer handshake and length-prefixed message framing over raw TCP sockets, with no BitTorrent library.
livelast push
~/pytor
Project Telemetry
Throughput
4.2 MB/s
Concurrent peers
30
Piece check
SHA-1
Torrent libs
0
How it works
~/pytor/architecture · step 1/2
01
.torrent (bencode)
02
tracker announce
03
peer pool × 30
04
piece scheduler
05
SHA-1 verify → disk
↺ loops to 04
01Every downloaded piece is verified against its SHA-1 hash before commit; corrupt pieces are re-requested from other peers.
02Thread-per-peer model with a shared piece-assignment queue.
Project Info
DomainSystems
RoleAuthor
Year2024
StatusShipped
Tech Stack
PythonTCP SocketsMultithreadingSHA-1

