-
Hello, I am implementing a node js server app based on Webtorrent. For my tests, I do run two separate instances of it, each of them listening on dedicated ports (web, dht and torrent). The raw starting sequence of each of them is similar, with one difference: Instance B explicitely adding A in its DHT. Instance A (DHT Port = 4752):
Instance B (DHT Port 4852):
The strange behaviour is as follow: Scenario 1 (working): If instance B connects to A before A started to re-seed, B is able to properly "add(infoHash)" from anything A provides as expected. I could only track down until this reproducible case. 2 instances, with A holding torrents and B "bootstraped manually" to A, Do I have to manually trigger something on A each time another node connects to it's DHT? Thank you in advance for any help you could provide, and high five for the great piece of software engineering you came up with ;-) Best Regards Lawrence [edit] I prepared a sample code in order you could reproduce that case and check. I just don't know in which way I could provide a zip file or so. In case, just notify it to me how to proceed. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This issue has been solved thanks to the help of the Webtorent discord community. In order for the (trackerless) seeding node to store it's own DHT, the dht has to be initialized with the current host ip adress: dht: { |
Beta Was this translation helpful? Give feedback.
This issue has been solved thanks to the help of the Webtorent discord community.
In order for the (trackerless) seeding node to store it's own DHT, the dht has to be initialized with the current host ip adress:
dht: {
bootstrap: false,
host: '127.0.0.1'
}
which applies for the DHT network to remain in the same machine (for testing purpose in my case). Over a LAN, it shall be the LAN-IP and over WAN, the WAN-IP