Skip to content

Commit

Permalink
Add bugout torrent tracker to announce.
Browse files Browse the repository at this point in the history
  • Loading branch information
chr15m committed Sep 4, 2018
1 parent 3582d30 commit 08ad22d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ function Bugout(identifier, opts) {
if (opts.iceServers) {
trackeropts.rtcConfig = {iceServers: opts.iceServers};
}
this.announce = opts.announce || ["wss://hub.bugout.network", " wss://tracker.openwebtorrent.com", "wss://tracker.btorrent.xyz"];
this.wt = opts.wt || new WebTorrent({tracker: trackeropts});
this.nacl = nacl;

Expand Down Expand Up @@ -71,7 +72,7 @@ function Bugout(identifier, opts) {
var blob = new Buffer.from(this.identifier);
blob.name = this.identifier;
}
var torrent = this.wt.seed(blob, {"name": this.identifier}, partial(function(bugout, torrent) {
var torrent = this.wt.seed(blob, {"name": this.identifier, "announce": this.announce}, partial(function(bugout, torrent) {
debug("torrent", bugout.identifier, torrent);
bugout.emit("torrent", bugout.identifier, torrent);
if (torrent.discovery.tracker) {
Expand Down

0 comments on commit 08ad22d

Please sign in to comment.