Jump to content

Need guidance creating a DHT-only torrent


ger3392

Recommended Posts

I am trying to demonstrate how DHT works, using 2 computers on my LAN. I created a trackerless torrent and edited it with a Bencode editor to include a nodes key indicating to use PC1 as a bootstrap node. The process was as follows:

1) Create and edit the torrent file

2) Delete dht.dat on both PCs so PC1 is the only node it knows of

3) Start seeding on PC1

4) Open torrent file on PC2 and begin downloading

It worked initially, but I realised this was because of Local Peer Discovery and not DHT (download didn't commence using only DHT but did work when using LPD).

I'm pretty confused as to why it won't work as all the specifications Ive read of DHT tells me it would work this way:

1) PC1 will talk to PC2 as it is the only node it knows of

2) PC1 will respond either with info about other nodes closer to the info_hash of the torrent (which there are none), or info about peers currently on that torrent (if any)

This is where I'm confused. PC1 will be the only computer with the actual file, so if PC1 is seeding the file it will respond to PC2 with its own IP/port and thus the download should begin?

I am wondering if I edited the file incorrectly. The raw bencoded data of the 'nodes' key is:

5:nodesll25:[ "192.168.10.3", 47823 ] e

In the Bencode editor it looked like:

VHFyaeA.jpg

I'm posting this here hoping someone might please take a look and tell me if I'm going wrong. Thank you for any advice you can give me as I am still learning about Bittorrent

Link to comment
Share on other sites

I understand what you mean, as using only 2 PCs ignores the whole point of DHT, but my aim here is simply to get the file from one PC to the other. Kind of a cop-out but its all I need really, a basic demonstration. Would that still function using only 2-3 PCs or is it absolutely essential to have many on the internet?

Link to comment
Share on other sites

If I had to use only DHT though, should it still work in theory? I don't want to use LPD as its a DHT demonstration I have to produce (its not 'homework' per se as I'm doing this for my own benefit).

I'm aware that it talks to the default nodes and I was planning on using that in another part of my work. Would they interfere with what I'm trying to do with the PCs? If so I could just disconnect my router from the internet

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...