diff options
| author | Lars-Magnus Skog <ralphtheninja@riseup.net> | 2015-06-03 22:44:23 +0200 |
|---|---|---|
| committer | Lars-Magnus Skog <ralphtheninja@riseup.net> | 2015-06-03 22:49:36 +0200 |
| commit | b9260e07932e19009ca4e9b35543a25c75a6759a (patch) | |
| tree | b62e78030418afe52b61a9344b7dcfbe5f13c69d /git-remote-gittorrent | |
| parent | 0af44fb305e1bc6af86e231959442edf14ad4649 (diff) | |
use rc to get rid of hardcoded configuration
Diffstat (limited to 'git-remote-gittorrent')
| -rwxr-xr-x | git-remote-gittorrent | 6 |
1 files changed, 3 insertions, 3 deletions
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 }) |
