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

Commit 9eda8a8

Browse files
authoredDec 1, 2017
fix: update *-star multiaddrs to explicity say that they need tcp and a port (#1117)
1 parent 58ded8d commit 9eda8a8

File tree

4 files changed

+22
-25
lines changed

4 files changed

+22
-25
lines changed
 

‎README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<a href="https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs?ref=badge_small" alt="FOSSA Status"><img src="https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs.svg?type=small"/></a>
2020
<a href="https://travis-ci.org/ipfs/js-ipfs"><img src="https://travis-ci.org/ipfs/js-ipfs.svg?branch=master" /></a>
2121
<a href="https://circleci.com/gh/ipfs/js-ipfs"><img src="https://circleci.com/gh/ipfs/js-ipfs.svg?style=svg" /></a>
22-
<a href="https://ci.appveyor.com/project/diasdavid/js-ipfs"><img src="https://ci.appveyor.com/api/projects/status/txn75y7843r2ff0p?svg=true" /></a>
22+
<a href="https://ci.appveyor.com/project/wubalubadubdub/js-ipfs"><img src="https://ci.appveyor.com/api/projects/status/txn75y7843r2ff0p?svg=true" /></a>
2323
<a href="https://coveralls.io/github/ipfs/js-ipfs?branch=master"><img src="https://coveralls.io/repos/github/ipfs/js-ipfs/badge.svg?branch=master"></a>
2424
<br>
2525
<a href="https://david-dm.org/ipfs/js-ipfs"><img src="https://david-dm.org/ipfs/js-ipfs.svg?style=flat-square" /></a>
@@ -334,7 +334,7 @@ const node = new IPFS({
334334
config: {
335335
Addresses: {
336336
Swarm: [
337-
'/dns4/wrtc-star.discovery.libp2p.io/wss/p2p-webrtc-star'
337+
'/dns4/wrtc-star.discovery.libp2p.io/tcp/443/wss/p2p-webrtc-star'
338338
]
339339
}
340340
}
@@ -369,7 +369,7 @@ const node = new IPFS({
369369
Swarm: [
370370
"/ip4/0.0.0.0/tcp/4002",
371371
"/ip4/127.0.0.1/tcp/4003/ws",
372-
"/dns4/wrtc-star.discovery.libp2p.io/wss/p2p-webrtc-star"
372+
"/dns4/wrtc-star.discovery.libp2p.io/tcp/433/wss/p2p-webrtc-star"
373373
]
374374
}
375375
},
@@ -426,7 +426,7 @@ const node = new IPFS({
426426
config: {
427427
Addresses: {
428428
Swarm: [
429-
'/dns4/ws-star.discovery.libp2p.io/wss/p2p-websocket-star'
429+
'/dns4/ws-star.discovery.libp2p.io/tcp/443/wss/p2p-websocket-star'
430430
]
431431
}
432432
}

‎examples/exchange-files-in-browser/public/js/app.js

+7-10
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,24 @@ function start () {
3333
updateView('starting', node)
3434

3535
const options = {
36-
repo: 'ipfs-' + Math.random(),
36+
repo: 'ipfs-' + Math.random() + Date.now().toString(),
3737
config: {
3838
Addresses: {
3939
Swarm: [
40-
// '/dns4/wrtc-star.discovery.libp2p.io/wss/p2p-webrtc-star'
41-
'/dns4/ws-star.discovery.libp2p.io/wss/p2p-websocket-star'
40+
'/dns4/wrtc-star.discovery.libp2p.io/tcp/443/wss/p2p-webrtc-star'
41+
// '/dns4/ws-star.discovery.libp2p.io/tcp/443/wss/p2p-websocket-star'
4242
]
4343
}
4444
}
4545
}
4646

4747
// IFDEV: To test with latest js-ipfs
48-
// const IPFS = require('ipfs')
49-
// node = new IPFS(options)
48+
const IPFS = require('ipfs')
49+
node = new IPFS(options)
5050
// VEDIF
5151

5252
// EXAMPLE
53-
node = new self.Ipfs(options)
53+
// node = new self.Ipfs(options)
5454

5555
node.once('start', () => node.id((err, id) => {
5656
if (err) { return onError(err) }
@@ -72,7 +72,7 @@ function stop () {
7272
*/
7373

7474
function createFileBlob (data, multihash) {
75-
const file = new window.Blob(data, { type: 'application/octet-binary' })
75+
const file = new window.Blob([data], { type: 'application/octet-binary' })
7676
const fileUrl = window.URL.createObjectURL(file)
7777

7878
const listItem = document.createElement('div')
@@ -100,9 +100,6 @@ function getFile () {
100100

101101
files.forEach((file) => {
102102
if (file.content) {
103-
console.log('Fetched file:', cid, file.content.length)
104-
105-
// TODO: FIX calling createFileBlob makes the Chrome go "Oh Snap"
106103
const listItem = createFileBlob(file.content, cid)
107104
$filesList.insertBefore(listItem, $filesList.firstChild)
108105
}

‎package.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@
104104
"fsm-event": "^2.1.0",
105105
"get-folder-size": "^1.0.0",
106106
"glob": "^7.1.2",
107-
"hapi": "^16.6.2",
107+
"hapi": "^16.2.2",
108108
"hapi-set-header": "^1.0.2",
109109
"hoek": "^5.0.2",
110-
"ipfs-api": "^17.1.2",
110+
"ipfs-api": "^17.1.3",
111111
"ipfs-bitswap": "~0.17.4",
112112
"ipfs-block": "~0.6.1",
113113
"ipfs-block-service": "~0.13.0",
@@ -119,7 +119,7 @@
119119
"is-ipfs": "^0.3.2",
120120
"is-stream": "^1.1.0",
121121
"joi": "^13.0.2",
122-
"libp2p": "~0.13.1",
122+
"libp2p": "~0.13.3",
123123
"libp2p-circuit": "~0.1.4",
124124
"libp2p-floodsub": "~0.13.0",
125125
"libp2p-kad-dht": "~0.6.0",
@@ -128,8 +128,8 @@
128128
"libp2p-railing": "~0.7.1",
129129
"libp2p-secio": "~0.8.1",
130130
"libp2p-tcp": "~0.11.1",
131-
"libp2p-webrtc-star": "~0.13.2",
132-
"libp2p-websocket-star": "~0.6.0",
131+
"libp2p-webrtc-star": "~0.13.3",
132+
"libp2p-websocket-star": "~0.7.1",
133133
"libp2p-websockets": "~0.10.4",
134134
"lodash.flatmap": "^4.5.0",
135135
"lodash.get": "^4.4.2",
@@ -142,9 +142,9 @@
142142
"multihashes": "~0.4.12",
143143
"once": "^1.4.0",
144144
"path-exists": "^3.0.0",
145-
"peer-book": "~0.5.1",
146-
"peer-id": "~0.10.2",
147-
"peer-info": "~0.11.1",
145+
"peer-book": "~0.5.2",
146+
"peer-id": "~0.10.3",
147+
"peer-info": "~0.11.3",
148148
"progress": "^2.0.0",
149149
"promisify-es6": "^1.0.3",
150150
"pull-abortable": "^4.1.1",

‎src/core/runtime/libp2p-browser.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ const libp2p = require('libp2p')
1111
class Node extends libp2p {
1212
constructor (peerInfo, peerBook, options) {
1313
options = options || {}
14-
const wstar = new WebRTCStar()
14+
const wrtcstar = new WebRTCStar({id: peerInfo.id})
1515
const wsstar = new WebSocketStar({id: peerInfo.id})
1616

1717
const modules = {
18-
transport: [new WS(), wstar, wsstar],
18+
transport: [new WS(), wrtcstar, wsstar],
1919
connection: {
2020
muxer: [Multiplex],
2121
crypto: [SECIO]
2222
},
23-
discovery: [wstar.discovery, wsstar.discovery]
23+
discovery: [wrtcstar.discovery, wsstar.discovery]
2424
}
2525

2626
if (options.bootstrap) {

0 commit comments

Comments
 (0)
This repository has been archived.