1
1
# torrent-discovery [ ![ ci] [ ci-image ]] [ ci-url ] [ ![ npm] [ npm-image ]] [ npm-url ] [ ![ downloads] [ downloads-image ]] [ downloads-url ] [ ![ javascript style guide] [ standard-image ]] [ standard-url ]
2
2
3
3
[ ci-image ] : https://github.com/webtorrent/torrent-discovery/actions/workflows/ci.yml/badge.svg
4
+
4
5
[ ci-url ] : https://github.com/webtorrent/torrent-discovery/actions/workflows/ci.yml
6
+
5
7
[ npm-image ] : https://img.shields.io/npm/v/torrent-discovery.svg
8
+
6
9
[ npm-url ] : https://npmjs.org/package/torrent-discovery
10
+
7
11
[ downloads-image ] : https://img.shields.io/npm/dm/torrent-discovery.svg
12
+
8
13
[ downloads-url ] : https://npmjs.org/package/torrent-discovery
14
+
9
15
[ standard-image ] : https://img.shields.io/badge/code_style-standard-brightgreen.svg
16
+
10
17
[ standard-url ] : https://standardjs.com
11
18
12
19
### Discover BitTorrent and WebTorrent peers
@@ -15,10 +22,10 @@ This module bundles [bittorrent-tracker](https://www.npmjs.com/package/bittorren
15
22
16
23
## features
17
24
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
22
29
23
30
This module also ** works in the browser** with [ browserify] ( http://browserify.org ) . In
24
31
that context, it discovers [ WebTorrent] ( http://webtorrent.io ) (WebRTC) peers.
@@ -39,7 +46,8 @@ Create a new peer discovery instance. Required options are:
39
46
{
40
47
infoHash: ' ' , // as hex string or Buffer
41
48
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
43
51
}
44
52
```
45
53
0 commit comments