aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Ball <chris@printf.net>2015-05-13 19:21:43 -0400
committerChris Ball <chris@printf.net>2015-05-13 19:21:43 -0400
commita4a9ea1e267396a3d958462f54716f61650281a7 (patch)
tree445c814d52e0f3038e433a677d23f982974f2434
parentfc6dd65738833a3219a4ac8fbe550a0b23ef5761 (diff)
Fix wire.use
-rwxr-xr-xgit-remote-gitswarm6
-rwxr-xr-xgitswarmd4
2 files changed, 6 insertions, 4 deletions
diff --git a/git-remote-gitswarm b/git-remote-gitswarm
index 5524518..259baa9 100755
--- a/git-remote-gitswarm
+++ b/git-remote-gitswarm
@@ -33,7 +33,9 @@ exec('git ls-remote ' + url + ' HEAD', function (err, stdout, stderr) {
}
console.warn('Okay, we want to get: ' + ref)
- var dht = new DHT()
+ var dht = new DHT({
+ bootstrap: ['three.printf.net:6882']
+ })
var magnetUri = 'magnet:?xt=urn:btih:' + ref
var parsed = magnet(magnetUri)
dht.on('ready', function () {
@@ -47,7 +49,7 @@ exec('git ls-remote ' + url + ' HEAD', function (err, stdout, stderr) {
var swarm = new Swarm(parsed.infoHash, 'cafebabecafebabecafecafebabecafebabecafe')
swarm.on('wire', function (wire) {
console.error('we got a wire')
- wire.use('ut_gitswarm')
+ wire.use(ut_gitswarm)
// wire.ut_gitswarm.askforsha(parsed.infoHash)
})
})
diff --git a/gitswarmd b/gitswarmd
index 1e0fca2..4d9acbb 100755
--- a/gitswarmd
+++ b/gitswarmd
@@ -15,7 +15,7 @@ function die (error) {
}
var dht = new DHT({
- bootstrap: ['three.printf.net:6881']
+ bootstrap: ['three.printf.net:6882']
})
dht.listen(20000)
@@ -67,7 +67,7 @@ dht.on('ready', function () {
wire.on('handshake', function (infoHash, peerId) {
console.log('Received handshake for ' + infoHash)
wire.handshake(new Buffer(infoHash), new Buffer(peerId))
- wire.use('ut_gitswarm')
+ wire.use(ut_gitswarm)
})
}).listen(30000)
})