diff --git a/README.md b/README.md
index a5be85fbd2..e38bf36670 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@
-
+
@@ -334,7 +334,7 @@ const node = new IPFS({
config: {
Addresses: {
Swarm: [
- '/dns4/wrtc-star.discovery.libp2p.io/wss/p2p-webrtc-star'
+ '/dns4/wrtc-star.discovery.libp2p.io/tcp/443/wss/p2p-webrtc-star'
]
}
}
@@ -369,7 +369,7 @@ const node = new IPFS({
Swarm: [
"/ip4/0.0.0.0/tcp/4002",
"/ip4/127.0.0.1/tcp/4003/ws",
- "/dns4/wrtc-star.discovery.libp2p.io/wss/p2p-webrtc-star"
+ "/dns4/wrtc-star.discovery.libp2p.io/tcp/433/wss/p2p-webrtc-star"
]
}
},
@@ -426,7 +426,7 @@ const node = new IPFS({
config: {
Addresses: {
Swarm: [
- '/dns4/ws-star.discovery.libp2p.io/wss/p2p-websocket-star'
+ '/dns4/ws-star.discovery.libp2p.io/tcp/443/wss/p2p-websocket-star'
]
}
}
diff --git a/examples/exchange-files-in-browser/public/js/app.js b/examples/exchange-files-in-browser/public/js/app.js
index 5141e0b62d..7b54655be5 100644
--- a/examples/exchange-files-in-browser/public/js/app.js
+++ b/examples/exchange-files-in-browser/public/js/app.js
@@ -33,24 +33,24 @@ function start () {
updateView('starting', node)
const options = {
- repo: 'ipfs-' + Math.random(),
+ repo: 'ipfs-' + Math.random() + Date.now().toString(),
config: {
Addresses: {
Swarm: [
- // '/dns4/wrtc-star.discovery.libp2p.io/wss/p2p-webrtc-star'
- '/dns4/ws-star.discovery.libp2p.io/wss/p2p-websocket-star'
+ '/dns4/wrtc-star.discovery.libp2p.io/tcp/443/wss/p2p-webrtc-star'
+ // '/dns4/ws-star.discovery.libp2p.io/tcp/443/wss/p2p-websocket-star'
]
}
}
}
// IFDEV: To test with latest js-ipfs
- // const IPFS = require('ipfs')
- // node = new IPFS(options)
+ const IPFS = require('ipfs')
+ node = new IPFS(options)
// VEDIF
// EXAMPLE
- node = new self.Ipfs(options)
+ // node = new self.Ipfs(options)
node.once('start', () => node.id((err, id) => {
if (err) { return onError(err) }
@@ -72,7 +72,7 @@ function stop () {
*/
function createFileBlob (data, multihash) {
- const file = new window.Blob(data, { type: 'application/octet-binary' })
+ const file = new window.Blob([data], { type: 'application/octet-binary' })
const fileUrl = window.URL.createObjectURL(file)
const listItem = document.createElement('div')
@@ -100,9 +100,6 @@ function getFile () {
files.forEach((file) => {
if (file.content) {
- console.log('Fetched file:', cid, file.content.length)
-
- // TODO: FIX calling createFileBlob makes the Chrome go "Oh Snap"
const listItem = createFileBlob(file.content, cid)
$filesList.insertBefore(listItem, $filesList.firstChild)
}
diff --git a/package.json b/package.json
index 7b400751f1..abfd14a0ab 100644
--- a/package.json
+++ b/package.json
@@ -104,10 +104,10 @@
"fsm-event": "^2.1.0",
"get-folder-size": "^1.0.0",
"glob": "^7.1.2",
- "hapi": "^16.6.2",
+ "hapi": "^16.2.2",
"hapi-set-header": "^1.0.2",
"hoek": "^5.0.2",
- "ipfs-api": "^17.1.2",
+ "ipfs-api": "^17.1.3",
"ipfs-bitswap": "~0.17.4",
"ipfs-block": "~0.6.1",
"ipfs-block-service": "~0.13.0",
@@ -119,7 +119,7 @@
"is-ipfs": "^0.3.2",
"is-stream": "^1.1.0",
"joi": "^13.0.2",
- "libp2p": "~0.13.1",
+ "libp2p": "~0.13.3",
"libp2p-circuit": "~0.1.4",
"libp2p-floodsub": "~0.13.0",
"libp2p-kad-dht": "~0.6.0",
@@ -128,8 +128,8 @@
"libp2p-railing": "~0.7.1",
"libp2p-secio": "~0.8.1",
"libp2p-tcp": "~0.11.1",
- "libp2p-webrtc-star": "~0.13.2",
- "libp2p-websocket-star": "~0.6.0",
+ "libp2p-webrtc-star": "~0.13.3",
+ "libp2p-websocket-star": "~0.7.1",
"libp2p-websockets": "~0.10.4",
"lodash.flatmap": "^4.5.0",
"lodash.get": "^4.4.2",
@@ -142,9 +142,9 @@
"multihashes": "~0.4.12",
"once": "^1.4.0",
"path-exists": "^3.0.0",
- "peer-book": "~0.5.1",
- "peer-id": "~0.10.2",
- "peer-info": "~0.11.1",
+ "peer-book": "~0.5.2",
+ "peer-id": "~0.10.3",
+ "peer-info": "~0.11.3",
"progress": "^2.0.0",
"promisify-es6": "^1.0.3",
"pull-abortable": "^4.1.1",
diff --git a/src/core/runtime/libp2p-browser.js b/src/core/runtime/libp2p-browser.js
index 4994f74617..65b019445b 100644
--- a/src/core/runtime/libp2p-browser.js
+++ b/src/core/runtime/libp2p-browser.js
@@ -11,16 +11,16 @@ const libp2p = require('libp2p')
class Node extends libp2p {
constructor (peerInfo, peerBook, options) {
options = options || {}
- const wstar = new WebRTCStar()
+ const wrtcstar = new WebRTCStar({id: peerInfo.id})
const wsstar = new WebSocketStar({id: peerInfo.id})
const modules = {
- transport: [new WS(), wstar, wsstar],
+ transport: [new WS(), wrtcstar, wsstar],
connection: {
muxer: [Multiplex],
crypto: [SECIO]
},
- discovery: [wstar.discovery, wsstar.discovery]
+ discovery: [wrtcstar.discovery, wsstar.discovery]
}
if (options.bootstrap) {