From b9260e07932e19009ca4e9b35543a25c75a6759a Mon Sep 17 00:00:00 2001 From: Lars-Magnus Skog Date: Wed, 3 Jun 2015 22:44:23 +0200 Subject: use rc to get rid of hardcoded configuration --- git-remote-gittorrent | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'git-remote-gittorrent') diff --git a/git-remote-gittorrent b/git-remote-gittorrent index 5c9f038..52814eb 100755 --- a/git-remote-gittorrent +++ b/git-remote-gittorrent @@ -11,6 +11,7 @@ var Swarm = require('bittorrent-swarm') var ut_gittorrent = require('ut_gittorrent') var WebTorrent = require('webtorrent') var zeroFill = require('zero-fill') +var config = require('./config') // BitTorrent client version string (used in peer ID). // Generated from package.json major and minor version. For example: @@ -28,9 +29,8 @@ function die (error) { // Gotta enable color manually because stdout isn't a tty. var chalk = new Chalk.constructor({enabled: true}); -var bootstrap = ['dht.gittorrent.org:6881', 'core.gittorrent.org:6881'] var dht = new DHT({ - bootstrap: bootstrap + bootstrap: config.dht.bootstrap }) // After building a dictionary of references (sha's to branch names), responds @@ -182,7 +182,7 @@ function get_infohash (sha, branch) { wire.ut_gittorrent.on('receivedTorrent', function (infoHash) { var client = new WebTorrent({ dht: { - bootstrap: bootstrap + bootstrap: config.dht.bootstrap }, tracker: false }) -- cgit v1.2.3