Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #740 from ipfs/feat/add-bootstrapers-through-dns
Browse files Browse the repository at this point in the history
🌟 feat: add websocket bootstrapers to the config
  • Loading branch information
daviddias authored May 7, 2017
2 parents d7c9eec + 3b680a7 commit 4412830
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
9 changes: 8 additions & 1 deletion examples/transfer-files/public/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,14 @@ function refreshPeerList () {
}

const peersAsHtml = peers
.map((peer) => peer.addr.toString())
.map((peer) => {
const addr = peer.addr.toString()
if (addr.indexOf('ipfs') >= 0) {
return addr
} else {
return addr + peer.peer.id.toB58String()
}
})
.map((addr) => {
return '<li>' + addr + '</li>'
}).join('')
Expand Down
12 changes: 11 additions & 1 deletion src/init-files/default-config-browser.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,15 @@
"Enabled": true
}
},
"Bootstrap": []
"Discovery": {},
"Bootstrap": [
"/dns4/ams-1.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd",
"/dns4/sfo-1.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLju6m7xTh3DuokvT3886QRYqxAzb1kShaanJgW36yx",
"/dns4/lon-1.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLMeWqB7YGVLJN3pNLQpmmEk35v6wYtsMGLzSr5QBU3",
"/dns4/sfo-2.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLnSGccFuZQJzRadHn95W2CrSFmZuTdDWP8HXaHca9z",
"/dns4/sfo-3.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLPppuBtQSGwKDZT2M73ULpjvfd3aZ6ha4oFGL1KrGM",
"/dns4/sgp-1.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLSafTMBsPKadTEgaXctDQVcqN88CNLHXMkTNwMKPnu",
"/dns4/nyc-1.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLueR4xBeUbY9WZ9xGUUxunbKWcrNFTDAadQJmocnWm",
"/dns4/nyc-2.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64"
]
}
2 changes: 2 additions & 0 deletions test/http-api/spec/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ module.exports = (http) => {
url: '/api/v0/bootstrap/list'
}, (res) => {
expect(res.statusCode).to.be.eql(200)
console.log(res.result.Peers)
console.log(defaultList)
expect(res.result.Peers).to.deep.equal(defaultList)
done()
})
Expand Down

0 comments on commit 4412830

Please sign in to comment.