Skip to content
Back to the catalog
Project bittorrentNetworkingAdvancedBeta

Un cliente BitTorrent

Bencode, trackers y el protocolo peer-to-peer. Descarga un fichero real hablando con peers de verdad.

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.

Guide language

The stage guides read in this language. Only languages this project is fully translated into show up here; the interface language does not change.

What this project is about

BitTorrent es un sistema distribuido completo que puedes construir solo: descubrimiento de pares, un protocolo binario con handshake, transferencia por bloques y verificación de integridad. Y el resultado se comprueba abriendo el fichero descargado.

Empezarás decodificando un .torrent y terminarás descargando un fichero real desde varios pares a la vez, en paralelo, comprobando cada pieza con su hash antes de escribirla en disco.

Roadmap

12 stages across 4 phases. Every stage comes with its guide and its tests: you move on when they pass.

  1. Phase 13 stages

    Entender el .torrent

    Decodificador de bencode, metadatos del fichero e infohash.

    1. 01Escalares bencode
    2. 02Listas y diccionarios bencode
    3. 03Metadatos e infohash
  2. Phase 22 stages

    Encontrar pares

    Consulta al tracker y lista de pares disponibles.

    1. 01Solicitud al tracker
    2. 02Lista compacta de pares
  3. Phase 34 stages

    Hablar con un par

    Handshake, mensajes del protocolo y descarga de una pieza verificada.

    1. 01Handshake de peer
    2. 02Framing de mensajes
    3. 03Estado choking y bitfield
    4. 04Descarga de una pieza
  4. Phase 43 stages

    Descargar el fichero

    Varios pares en paralelo, reintentos y ensamblado final en disco.

    1. 01Planificador entre pares
    2. 02Reintentos e integridad
    3. 03Ensamblado final

Before you start

Un cliente BitTorrent funcional: decodificador de bencode, parseo del fichero .torrent y cálculo del infohash, comunicación con el tracker, handshake con pares, mensajes del protocolo (bitfield, interested, request, piece), descarga por bloques en paralelo y verificación SHA-1 de cada pieza.

  • dns-resolver
    Beta

    A DNS resolver

    Build and parse UDP packets bit by bit. Resolve names by walking the hierarchy from the root servers.

    Intermediate8 stages~9 hNetworking
    udpbinarioprotocolos

    Go · Rust · Python

  • mcp-server
    Beta

    Build an MCP server

    Build a Model Context Protocol server from scratch with JSON-RPC, tools, and resources.

    Intermediate5 stages~12 hNetworking
    mcpjson rpcagentes+1

    TypeScript · Python · Go

  • http-server
    Beta

    An HTTP server from the socket up

    From raw bytes to a 200 response. Parse requests, manage connections and serve concurrent traffic.

    Intermediate10 stages~12 hNetworking
    socketstcphttp+1

    Go · Python · C · Rust