Skip to content
This repository has been archived by the owner on Apr 28, 2021. It is now read-only.

Latest commit

 

History

History
42 lines (28 loc) · 1.02 KB

README.md

File metadata and controls

42 lines (28 loc) · 1.02 KB

A BitTorrent DHT crawler for Node.js.

npm version Dependencies Code Climate

Installation

Requires: Node.js 6.4.0 or greater.

$ npm install dhtc

Features

  • Simple API.
  • Node.js event emmiter based interface.
  • Discover infohashes on the DHT network.

Usage

Note: it make take several minuets for the crawler to find any infohashes.

const Crawler = require('dhtc')

const crawler = new Crawler({
  address: '0.0.0.0', 
  port: 6881
})

crawler.start()

crawler.on('infoHash', (hash, address, port) => {
  console.log(`${hash} from ${address}:${port}`)
})

License

MIT