feat(config): add config to disable trackers

This commit is contained in:
Alexey Kasyanchuk 2018-08-17 13:20:22 +03:00
parent 466d10ccd5
commit 6531b5315f
2 changed files with 8 additions and 0 deletions

View File

@ -11,6 +11,7 @@ let config = {
udpTrackersTimeout: 3 * 60 * 1000, udpTrackersTimeout: 3 * 60 * 1000,
peerId: undefined, peerId: undefined,
language: 'en', language: 'en',
trackers: true,
p2p: true, p2p: true,
p2pConnections: 10, p2pConnections: 10,

View File

@ -96,6 +96,13 @@ module.exports = function (send, recive, dataDirectory, version, env)
constructor(sphinx) constructor(sphinx)
{ {
this.sphinx = sphinx this.sphinx = sphinx
if(!config.trackers)
{
logT('tracker', 'trackers disabled')
this.trackers = []
return
}
this.trackers = [ this.trackers = [
new Rutracker, new Rutracker,
new Nyaa new Nyaa