Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ members = [
"swarm-test",
"swarm",
"transports/dns",
"transports/dns-websys",
"transports/noise",
"transports/plaintext",
"transports/pnet",
Expand Down Expand Up @@ -82,6 +83,7 @@ libp2p-connection-limits = { version = "0.7.0", path = "misc/connection-limits"
libp2p-core = { version = "0.44.0", path = "core" }
libp2p-dcutr = { version = "0.15.0", path = "protocols/dcutr" }
libp2p-dns = { version = "0.45.0", path = "transports/dns" }
libp2p-dns-websys = { version = "0.1.0-alpha", path = "transports/dns-websys" }
libp2p-floodsub = { version = "0.48.0", path = "protocols/floodsub" }
libp2p-gossipsub = { version = "0.50.0", path = "protocols/gossipsub" }
libp2p-identify = { version = "0.48.0", path = "protocols/identify" }
Expand Down
9 changes: 9 additions & 0 deletions transports/dns-websys/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## 0.1.0-alpha

- Support DNS transport for wasm32 targets that resolves DNS components over DNS-over-HTTPS (DoH).
`/dnsaddr` is always resolved, however `/dns`, `/dns4` and `/dns6` are governed by the
`DnsResolution` policy (default to `DnsResolutionAuto`): addresses containing a explicit protocols
(i.e. `webrtc-direct`) are resolved to `/ip4`/`/ip6`, while the rest are passed through to the inner
transport unchanged, since browsers resolve those hostnames natively and need
the hostname preserved for SNI.
See [PR XXXX](https://github.com/libp2p/rust-libp2p/pull/XXXX).
32 changes: 32 additions & 0 deletions transports/dns-websys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[package]
name = "libp2p-dns-websys"
edition.workspace = true
rust-version = { workspace = true }
description = "DNS transport implementation via DNS-over-HTTPS for libp2p under WASM environment"
version = "0.1.0-alpha"
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
keywords = ["peer-to-peer", "libp2p", "networking"]
categories = ["network-programming", "asynchronous"]

[dependencies]
futures = { workspace = true }
js-sys = "0.3.77"
libp2p-core = { workspace = true }
parking_lot = "0.12.5"
send_wrapper = { version = "0.6.0", features = ["futures"] }
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.150"
smallvec = "1.15.1"
thiserror = { workspace = true }
tracing = { workspace = true }
url = "2.5.4"
wasm-bindgen = "0.2.100"
wasm-bindgen-futures = { workspace = true }
web-sys = { version = "0.3.77", features = ["AbortSignal", "Headers", "Request", "RequestInit", "Response", "Window", "WorkerGlobalScope"] }

[package.metadata.docs.rs]
all-features = true

[lints]
workspace = true
Loading
Loading