From 602d033603953f51ac339663e1f7114fe103f9f1 Mon Sep 17 00:00:00 2001 From: David Dias Date: Mon, 30 Jan 2017 08:52:42 +0000 Subject: [PATCH 1/4] feat: add websocket bootstrapers to the config --- src/init-files/default-config-browser.json | 4 +++- src/init-files/default-config-node.json | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/init-files/default-config-browser.json b/src/init-files/default-config-browser.json index 64393f85cf..053f91cc71 100644 --- a/src/init-files/default-config-browser.json +++ b/src/init-files/default-config-browser.json @@ -13,5 +13,7 @@ "Enabled": true } }, - "Bootstrap": [] + "Discovery": {}, + "Bootstrap": [ + ] } diff --git a/src/init-files/default-config-node.json b/src/init-files/default-config-node.json index 5a17300b22..aaab979ce9 100644 --- a/src/init-files/default-config-node.json +++ b/src/init-files/default-config-node.json @@ -25,6 +25,8 @@ "/ip4/104.236.76.40/tcp/4001/ipfs/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64", "/ip4/178.62.158.247/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd", "/ip4/178.62.61.185/tcp/4001/ipfs/QmSoLMeWqB7YGVLJN3pNLQpmmEk35v6wYtsMGLzSr5QBU3", - "/ip4/104.236.151.122/tcp/4001/ipfs/QmSoLju6m7xTh3DuokvT3886QRYqxAzb1kShaanJgW36yx" + "/ip4/104.236.151.122/tcp/4001/ipfs/QmSoLju6m7xTh3DuokvT3886QRYqxAzb1kShaanJgW36yx", + "/dns4/strawberry.i.ipfs.io/wss/ipfs/QmWyLSnMHW2H6bmCG9e9PQq4ARve94JduvGjbutUuzx4a8", + "/dns4/blueberry.i.ipfs.io/wss/ipfs/QmVcj9MATxGTAFoQSbrJvZ9Fbs4Jzvrxy9hyJeRwbW8NeA" ] } From 7e7d9eb2f48c70b95b06416a8ba683e92cdffc4d Mon Sep 17 00:00:00 2001 From: David Dias Date: Thu, 23 Mar 2017 23:36:29 +0000 Subject: [PATCH 2/4] fix: update bootstrapers --- src/init-files/default-config-browser.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/init-files/default-config-browser.json b/src/init-files/default-config-browser.json index 053f91cc71..25975d2292 100644 --- a/src/init-files/default-config-browser.json +++ b/src/init-files/default-config-browser.json @@ -15,5 +15,7 @@ }, "Discovery": {}, "Bootstrap": [ + "/dns4/strawberry.i.ipfs.io/wss/ipfs/QmWyLSnMHW2H6bmCG9e9PQq4ARve94JduvGjbutUuzx4a8", + "/dns4/blueberry.i.ipfs.io/wss/ipfs/QmVcj9MATxGTAFoQSbrJvZ9Fbs4Jzvrxy9hyJeRwbW8NeA" ] } From a856578bb5074df3b6cd04af3b2071d86e62d12c Mon Sep 17 00:00:00 2001 From: David Dias Date: Wed, 29 Mar 2017 06:27:00 +0100 Subject: [PATCH 3/4] feat: add dns ws bootstrappers --- src/init-files/default-config-browser.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/init-files/default-config-browser.json b/src/init-files/default-config-browser.json index 25975d2292..4c9f1f37ef 100644 --- a/src/init-files/default-config-browser.json +++ b/src/init-files/default-config-browser.json @@ -15,7 +15,13 @@ }, "Discovery": {}, "Bootstrap": [ - "/dns4/strawberry.i.ipfs.io/wss/ipfs/QmWyLSnMHW2H6bmCG9e9PQq4ARve94JduvGjbutUuzx4a8", - "/dns4/blueberry.i.ipfs.io/wss/ipfs/QmVcj9MATxGTAFoQSbrJvZ9Fbs4Jzvrxy9hyJeRwbW8NeA" + "/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" ] } From 3b680a72cc566c64f8eb049a5cac8365bc14e76b Mon Sep 17 00:00:00 2001 From: David Dias Date: Sun, 7 May 2017 11:24:48 +0200 Subject: [PATCH 4/4] fix: last touches for dns websockets bootstrapers --- examples/transfer-files/public/js/app.js | 9 ++++++++- src/init-files/default-config-node.json | 4 +--- test/http-api/spec/bootstrap.js | 2 ++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/examples/transfer-files/public/js/app.js b/examples/transfer-files/public/js/app.js index 6d668c2891..af65a3dd9e 100644 --- a/examples/transfer-files/public/js/app.js +++ b/examples/transfer-files/public/js/app.js @@ -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 '
  • ' + addr + '
  • ' }).join('') diff --git a/src/init-files/default-config-node.json b/src/init-files/default-config-node.json index aaab979ce9..5a17300b22 100644 --- a/src/init-files/default-config-node.json +++ b/src/init-files/default-config-node.json @@ -25,8 +25,6 @@ "/ip4/104.236.76.40/tcp/4001/ipfs/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64", "/ip4/178.62.158.247/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd", "/ip4/178.62.61.185/tcp/4001/ipfs/QmSoLMeWqB7YGVLJN3pNLQpmmEk35v6wYtsMGLzSr5QBU3", - "/ip4/104.236.151.122/tcp/4001/ipfs/QmSoLju6m7xTh3DuokvT3886QRYqxAzb1kShaanJgW36yx", - "/dns4/strawberry.i.ipfs.io/wss/ipfs/QmWyLSnMHW2H6bmCG9e9PQq4ARve94JduvGjbutUuzx4a8", - "/dns4/blueberry.i.ipfs.io/wss/ipfs/QmVcj9MATxGTAFoQSbrJvZ9Fbs4Jzvrxy9hyJeRwbW8NeA" + "/ip4/104.236.151.122/tcp/4001/ipfs/QmSoLju6m7xTh3DuokvT3886QRYqxAzb1kShaanJgW36yx" ] } diff --git a/test/http-api/spec/bootstrap.js b/test/http-api/spec/bootstrap.js index 0e830f04ea..e9f726f1a9 100644 --- a/test/http-api/spec/bootstrap.js +++ b/test/http-api/spec/bootstrap.js @@ -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() })