Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2015-05-05 23:21:13 +0300
committerFeross Aboukhadijeh <feross@feross.org>2015-05-05 23:21:13 +0300
commit329b011f8ab4c222c41b5b477b24752e06da4f48 (patch)
tree256fd1abc61c1ae550ddcaf9d7cd386723c758ca
parentbf490e2c7e4c48c1dc4628a41b97ca91de0ff8da (diff)
hook for webtorrent-hybrid to force-add trackers
-rw-r--r--lib/torrent.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/torrent.js b/lib/torrent.js
index 91ebcbb..3082ccf 100644
--- a/lib/torrent.js
+++ b/lib/torrent.js
@@ -126,6 +126,14 @@ function Torrent (torrentId, opts) {
self.parsedTorrent.announce = [].concat.apply([], createTorrent.announceList)
}
+ // So `webtorrent-hybrid` can force specific trackers to be used
+ if (global.WEBTORRENT_ANNOUNCE) {
+ self.parsedTorrent.announce.push.apply(
+ self.parsedTorrent.announce,
+ global.WEBTORRENT_ANNOUNCE
+ )
+ }
+
// create swarm
self.swarm = new Swarm(self.infoHash, self.client.peerId, {
handshake: { dht: !!self.client.dht }