From 79f766a1b3e39f474aa7aaccd14026c88c4a1726 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Tue, 16 Feb 2016 17:53:47 -0800 Subject: [PATCH] use up-to-date list of trackers from create-torrent --- client/index.js | 9 ++++++++- package.json | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/client/index.js b/client/index.js index 3b304042..93433174 100644 --- a/client/index.js +++ b/client/index.js @@ -1,3 +1,4 @@ +var createTorrent = require('create-torrent') var debug = require('debug')('instant.io') var dragDrop = require('drag-drop') // var listify = require('listify') @@ -10,7 +11,13 @@ var xhr = require('xhr') var util = require('./util') -global.WEBTORRENT_ANNOUNCE = [ 'wss://tracker.webtorrent.io', 'wss://tracker.btorrent.xyz' ] +global.WEBTORRENT_ANNOUNCE = createTorrent.announceList + .map(function (arr) { + return arr[0] + }) + .filter(function (url) { + return url.indexOf('wss://') === 0 || url.indexOf('ws://') === 0 + }) var getClient = thunky(function (cb) { getRtcConfig('https://instant.io/rtcConfig', function (err, rtcConfig) { diff --git a/package.json b/package.json index df0e9bf1..e7e29377 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "url": "https://github.com/feross/webtorrent-app/issues" }, "dependencies": { + "create-torrent": "^3.22.1", "debug": "^2.2.0", "drag-drop": "^2.3.1", "electron-debug": "^0.5.0",