mirror of
https://github.com/fluencelabs/js-libp2p-websockets
synced 2025-06-14 04:51:31 +00:00
feat: filter IPFS addrs correctly (#62)
* feat: dns support for WS * fix: address parsing * feat: filter IPFS addrs correctly * fix: remove lodash includes dependency * feat: mafmt addrs now support /ipfs no need for ad-hoc filtering * feat: skip p2p-circuit addresses * chore: updating ci files * chore: upgrading to new aegir * test: pass the no-parallel flag to tests * wip * test: removing global timeout and setting it on a specific test * feat: resolve 0 addresses (#64) * feat: resolve 0 addresses * chore: upgrading pull-ws * chore: update circle CI * chore: update gitignore * chore: update deps * chore: update CI again * test: fix node.js tests * test: fix browser tests * chore
This commit is contained in:
committed by
David Dias
parent
3d3cdf1c1e
commit
9ddff85601
24
.aegir.js
24
.aegir.js
@ -1,3 +1,5 @@
|
||||
'use strict'
|
||||
|
||||
const multiaddr = require('multiaddr')
|
||||
const pull = require('pull-stream')
|
||||
|
||||
@ -5,18 +7,22 @@ const WS = require('./src')
|
||||
|
||||
let listener
|
||||
|
||||
function boot (done) {
|
||||
const ws = new WS()
|
||||
const ma = multiaddr('/ip4/127.0.0.1/tcp/9095/ws')
|
||||
listener = ws.createListener((conn) => pull(conn, conn))
|
||||
listener.listen(ma, done)
|
||||
}
|
||||
|
||||
function shutdown (done) {
|
||||
listener.close(done)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
hooks: {
|
||||
browser: {
|
||||
pre (callback) {
|
||||
const ws = new WS()
|
||||
const ma = multiaddr('/ip4/127.0.0.1/tcp/9090/ws')
|
||||
listener = ws.createListener((conn) => pull(conn, conn))
|
||||
listener.listen(ma, callback)
|
||||
},
|
||||
post (callback) {
|
||||
listener.close(callback)
|
||||
}
|
||||
pre: boot,
|
||||
post: shutdown
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user