This repository was archived by the owner on Jul 21, 2023. It is now read-only.
v0.15.0
Bug Fixes
- add buffer (#112) (8065e07)
- catch thrown maConn errors in listener (8bfb19a)
- remove use of assert module (#101) (89d3723)
- replace node buffers with uint8arrays (#115) (a277bf6)
Features
BREAKING CHANGES
- Only DNS+WSS addresses are now returned on filter by default in the browser. This can be overritten by the filter option and filters are provided in the module.
While this is not an API breaking change, there was a behavioral breaking change on the Websockets transport when in a browser environment. This change might create issues on local test setups.
libp2p-websockets
has allowed TCP
and DNS
addresses, both with ws
or wss
to be used for dial purposes. Taking into account security (and browser policies), we are now restricting addresses to DNS
+ wss
in the browser
With this new behavior, if you need to use non DNS addresses for testing, you can configure your libp2p node as follows:
const Websockets = require('libp2p-websockets')
const filters = require('libp2p-websockets/src/filters')
const Libp2p = require('libp2p')
const transportKey = Websockets.prototype[Symbol.toStringTag]
const libp2p = await Libp2p.create({
modules: {
transport: [Websockets]
// ... Add required modules according to the Configuration docs
},
config: {
transport: {
[transportKey]: {
filter: filters.all
}
}
}
})