Starting to play with alternative DHT implementations
This commit is contained in:
parent
e7c310a1df
commit
7a947ddf79
7 changed files with 232 additions and 8 deletions
10
crates/dht/resources/query.js
Normal file
10
crates/dht/resources/query.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
const DHT = require('bittorrent-dht')
|
||||
|
||||
let dht = new DHT();
|
||||
let infoHash = process.env["INFOHASH"];
|
||||
|
||||
dht.on('peer', function (peer, infoHash, from) {
|
||||
console.log(peer.host + ':' + peer.port)
|
||||
})
|
||||
|
||||
dht.lookup(infoHash)
|
||||
Loading…
Add table
Add a link
Reference in a new issue