A BitTorrent client
Bencode, trackers and the peer-to-peer protocol. Download a real file by talking to real peers.
Go · Python · Java
From raw bytes to a 200 response. Parse requests, manage connections and serve concurrent traffic.
Build it in your language
The tester treats your program as a black box: any language works. These are just the most convenient ones for this project.
You use web frameworks every day, but underneath all of them sits the same thing: a TCP socket listening, and a text protocol that fits on one page. This challenge takes the framework out of the way.
You start by opening a socket by hand and finish with a server that parses real requests, serves files, understands headers and handles several clients at once without blocking. You'll test it with curl and with your browser.
10 stages across 4 phases. Every stage comes with its guide and its tests: you move on when they pass.
Open a socket, accept a connection and return a hand-written 200.
Request line, headers, body, and well-formed error responses.
Path routing, static files, Content-Type and POST handling.
Concurrency, keep-alive and timeouts so it doesn't fall over with several clients.
Bencode, trackers and the peer-to-peer protocol. Download a real file by talking to real peers.
Go · Python · Java
Build and parse UDP packets bit by bit. Resolve names by walking the hierarchy from the root servers.
Go · Rust · Python
Build a Model Context Protocol server from scratch with JSON-RPC, tools, and resources.
TypeScript · Python · Go