use up-to-date list of trackers from create-torrent

This commit is contained in:
Feross Aboukhadijeh
2016-02-16 17:53:47 -08:00
parent 6e1af4543c
commit 79f766a1b3
2 changed files with 9 additions and 1 deletions

View File

@@ -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) {

View File

@@ -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",