11# torrent-discovery [ ![ ci] [ ci-image ]] [ ci-url ] [ ![ npm] [ npm-image ]] [ npm-url ] [ ![ downloads] [ downloads-image ]] [ downloads-url ] [ ![ javascript style guide] [ standard-image ]] [ standard-url ]
22
33[ ci-image ] : https://github.com/webtorrent/torrent-discovery/actions/workflows/ci.yml/badge.svg
4+
45[ ci-url ] : https://github.com/webtorrent/torrent-discovery/actions/workflows/ci.yml
6+
57[ npm-image ] : https://img.shields.io/npm/v/torrent-discovery.svg
8+
69[ npm-url ] : https://npmjs.org/package/torrent-discovery
10+
711[ downloads-image ] : https://img.shields.io/npm/dm/torrent-discovery.svg
12+
813[ downloads-url ] : https://npmjs.org/package/torrent-discovery
14+
915[ standard-image ] : https://img.shields.io/badge/code_style-standard-brightgreen.svg
16+
1017[ standard-url ] : https://standardjs.com
1118
1219### Discover BitTorrent and WebTorrent peers
@@ -15,10 +22,10 @@ This module bundles [bittorrent-tracker](https://www.npmjs.com/package/bittorren
1522
1623## features
1724
18- - simple API
19- - find peers from trackers, DHT, and LSD
20- - automatically announces, so other peers can discover us
21- - can start finding peers with just an info hash, before full metadata is available
25+ * simple API
26+ * find peers from trackers, DHT, and LSD
27+ * automatically announces, so other peers can discover us
28+ * can start finding peers with just an info hash, before full metadata is available
2229
2330This module also ** works in the browser** with [ browserify] ( http://browserify.org ) . In
2431that context, it discovers [ WebTorrent] ( http://webtorrent.io ) (WebRTC) peers.
@@ -39,7 +46,8 @@ Create a new peer discovery instance. Required options are:
3946{
4047 infoHash: ' ' , // as hex string or Buffer
4148 peerId: ' ' , // as hex string or Buffer
42- port: 0 // torrent client port (only required in node)
49+ port: 0 , // torrent client port (only required in node)
50+ host: ' 0.0.0.0' // torrent client host or network interface to bind to
4351}
4452```
4553
0 commit comments