Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well for your use case of distributing your own music, Bitmagnet wouldn't be necessary.

What a DHT crawler like Bitmagnet does is the following:

1. Take a few initial "bootstrap" torrents and ping them to see which IP addresses are seeding that file 2. Ping those IP addresses and ask what other files/torrents they're seeding 3. Ping those torrents to see which IP addresses are seeding that torrent

Rinse repeat.

So to distribute your music to fans, you'd just want to put magnet links to your music on your site.



That's not correct. Torrent swarms and the DHT are separate. Each torrent basically forms its own small network of TCP connections to exchange data specific to that one torrent. While the DHT is a network shared by all clients that speak the protocol and it's carried over short-lived UDP query-response exchanges.


they're saying they jump between one and the other. ask DHT, then ask swarm, then ask DHT, then ask swarm.


That doesn't make sense because those are concurrent processes, not serial ones.


You have to be participating in a torrent swarm in order to bootstrap yourself into DHT at all. Bittorrent's DHT is not a network independent of torrent swarms. You need the address of a peer who is already part of the network in order to join it, and you have to get a list those addresses from somewhere.


> You have to be participating in a torrent swarm in order to bootstrap yourself into DHT at all.

This is not correct.

> Bittorrent's DHT is not a network independent of torrent swarms.

This is also wrong. People have used the DHT for non-torrent-related purposes.

> You need the address of a peer who is already part of the network in order to join it, and you have to get a list those addresses from somewhere.

And nothing dictates that that has to be obtained via the bittorrent peer protocol. https://stackoverflow.com/a/11089702/1362755


Which of these methods is not obtaining the address of a node in a swarm, or hitting a tracker for a list of nodes in a swarm?

> People have used the DHT for non-torrent-related purposes.

This is simply non-responsive. People have used a DHT overlaid on the collection of torrent swarms for non-torrent related purposes.

> And nothing dictates that that has to be obtained via the bittorrent peer protocol.

This is a silly distinction. You also don't need to join a swarm to get on the DHT if I join a swarm to get on the DHT, write down the addresses I get on a piece of paper, then email you those addresses, which you plug into your handwritten specialized client that only knows how to join the DHT.


> Which of these methods is not obtaining the address of a node in a swarm, or hitting a tracker for a list of nodes in a swarm?

The "find bootstrap nodes via a bunch of DNS records, then persist long-lived contacts locally" approach is quite common.

> People have used a DHT overlaid on the collection of torrent swarms for non-torrent related purposes.

No, the software does not involve joining any bittorrent swarms at all.


Sorry bro, the8472 is correct on all counts. Misunderstanding DHTs and BitTorrent and how they relate is very common.


You don't need to ping anyone to crawl the DHT. You can passively wait and you'll get DHT queries in the form of "I'm looking for people seeding XYZ. Do you have a list?". You can just save those somewhere and you'll accumulate a list of active and new torrents.

Writing a DHT crawler is super fun, I suggest everyone to get a cheap VM and write/run one.


It's kinda like the owl with the tootsie pop:

How many cups of coffee does it take to internalize hamming distance? :-)


that'd be the slow mode, though




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: