How do BitTorrent magnet links work?

前端 未结 6 2038
自闭症患者
自闭症患者 2020-11-28 17:47

For the first time I used a magnet link. Curious about how it works, I looked up the specs and didn\'t find any answers. The wiki says xt means \"exact topic\"

6条回答
  •  佛祖请我去吃肉
    2020-11-28 18:32

    I was curious by the same question myself. Reading the code for transmission, I found the following in libtrnasmission/tr-dht.c:

    3248:     bootstrap_from_name( "dht.transmissionbt.com", 6881,
                                   bootstrap_af(session) );
    

    It tries that 6 times, waiting 40(!) seconds between tries. I guess you can test it by deleting the config files (~/.config/transmission on unix), and blocking all communication to dht.transmissionbt.com, and see what happens (wait 240 seconds at least).

    So it appears the client has a bootstrap node built in to start with. Of course, once it has gotten into the network, it doesn't need that bootstrap node anymore.

提交回复
热议问题