Skip to content

Commit c02ee6e

Browse files
committed
add dns-discovery server: eight45.net
1 parent da7ca15 commit c02ee6e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

swarm.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
var pump = require('pump')
22
var discovery = require('discovery-swarm')
3-
var swarmDefaults = require('dat-swarm-defaults')
3+
var swarmDefaults = require('dat-swarm-defaults')()
44
var debug = require('debug')('cabal')
55
var crypto = require('hypercore-crypto')
66

7+
swarmDefaults.dns.server.push('eight45.net:9090')
8+
79
// If a peer triggers one of these, don't just throttle them: block them for
810
// the rest of the session.
911
var knownIncompatibilityErrors = {
@@ -24,7 +26,7 @@ module.exports = function (cabal, opts, cb) {
2426
cabal.getLocalKey(function (err, key) {
2527
if (err) return cb(err)
2628

27-
var swarm = discovery(Object.assign({}, swarmDefaults(), { id: Buffer.from(key, 'hex') }))
29+
var swarm = discovery(Object.assign({}, swarmDefaults, { id: Buffer.from(key, 'hex') }))
2830
var cabalKey = Buffer.isBuffer(cabal.key) ? cabal.key : Buffer.from(cabal.key, 'hex')
2931
var swarmKey = crypto.discoveryKey(cabalKey)
3032
swarm.join(swarmKey.toString('hex'))

0 commit comments

Comments
 (0)