Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Frequently Asked Questions (FAQ)

Bora M. Alper edited this page Jan 21, 2019 · 4 revisions

Frequently Asked Questions (FAQ)

How does magnetico fetch metadata of torrents from DHT nodes?

Skim through BEP 5: DHT Protocol first.

magnetico basically works by launching a Sybil attack on the DHT network.

  • It forges a (fake) node ID for every node it contacts to make the node consider us a neighbour.
    • "Proximity" and "neighbourhood" relies on the XOR difference (in Mainline DHT which is based on Kademlia), so we copy the n = 15 most significant bytes of the ID of the node we are contacting, and append 5 more random bytes to complete the node ID to 20 bytes in total.
  • Then it floods the network with get_peers requests, whose responses will
    • ...either return a list of BitTorrent peers that we can connect and fetch metadata from.
    • ...or return a list of more DHT nodes that we can contact.
  • Whenever an announce_peer request is received, the BitTorrent peer is contacted to fetch the metadata.

magnetico does "fairly egregious bittorrent spec violations" which is completely unsustainable in the long run. Therefore, I am working on BEP 51: DHT Infohash Indexing which directly addresses our use-case.

Clone this wiki locally