Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix transport/wasm-ext fully qualified p2p multiaddr #2058

Merged
merged 5 commits into from
Apr 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@

- Update individual crates.
- `libp2p-core`
- `libp2p-gossipsub`
- `libp2p-wasm-ext`

## Version 0.37.1 [2021-04-14]

- Update individual crates.
- `libp2p-swarm-derive`
- `libp2p-gossipsub`

## Version 0.37.0 [2021-04-13]

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ libp2p-request-response = { version = "0.11.0", path = "protocols/request-respon
libp2p-swarm = { version = "0.29.0", path = "swarm" }
libp2p-swarm-derive = { version = "0.23.0", path = "swarm-derive" }
libp2p-uds = { version = "0.28.0", path = "transports/uds", optional = true }
libp2p-wasm-ext = { version = "0.28.1", path = "transports/wasm-ext", default-features = false, optional = true }
libp2p-wasm-ext = { version = "0.28.2", path = "transports/wasm-ext", default-features = false, optional = true }
libp2p-yamux = { version = "0.32.0", path = "muxers/yamux", optional = true }
multiaddr = { package = "parity-multiaddr", version = "0.11.2", path = "misc/multiaddr" }
parking_lot = "0.11.0"
Expand Down
6 changes: 5 additions & 1 deletion transports/wasm-ext/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 0.28.2 [2021-04-27]

- Support dialing `Multiaddr` with `/p2p` protocol [PR
2058](https://github.com/libp2p/rust-libp2p/pull/2058).

# 0.28.1 [2021-04-01]

- Require at least js-sys v0.3.50 [PR
Expand Down Expand Up @@ -45,4 +50,3 @@
- Updated dependencies.
- Support `/dns` in the websocket implementation
([PR 1626](https://github.com/libp2p/rust-libp2p/pull/1626))

2 changes: 1 addition & 1 deletion transports/wasm-ext/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "libp2p-wasm-ext"
version = "0.28.1"
version = "0.28.2"
authors = ["Pierre Krieger <pierre.krieger1708@gmail.com>"]
edition = "2018"
description = "Allows passing in an external transport in a WASM environment"
Expand Down
2 changes: 1 addition & 1 deletion transports/wasm-ext/src/websockets.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const websocket_transport = () => {

/// Turns a string multiaddress into a WebSockets string URL.
const multiaddr_to_ws = (addr) => {
let parsed = addr.match(/^\/(ip4|ip6|dns4|dns6|dns)\/(.*?)\/tcp\/(.*?)\/(ws|wss|x-parity-ws\/(.*)|x-parity-wss\/(.*))$/);
let parsed = addr.match(/^\/(ip4|ip6|dns4|dns6|dns)\/(.*?)\/tcp\/(.*?)\/(ws|wss|x-parity-ws\/(.*)|x-parity-wss\/(.*))(|\/p2p\/[a-zA-Z0-9]+)$/);
if (parsed != null) {
let proto = 'wss';
if (parsed[4] == 'ws' || parsed[4].startsWith('x-parity-ws/')) {
Expand Down