Skip to content

Commit 28a67a1

Browse files
JSKittyclaude
andcommitted
feat: upgrade iroh 0.34 → 0.96 with BBRv1, QUIC multipath, and Android TLS fix
Migrates the realtime P2P stack to iroh 0.96 + iroh-gossip 0.96, unlocking native QUIC multipath (WiFi + cellular + relay simultaneously), BBRv1 congestion control for high-BDP intercontinental links, and 60+ versions of stability patches. Patches pkarr to use rustls-no-provider instead of rustls (which forces aws-lc-rs), fixing TLS connection failures on Android 11. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ca45181 commit 28a67a1

28 files changed

Lines changed: 7923 additions & 1352 deletions

src-tauri/Cargo.lock

Lines changed: 1213 additions & 1131 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ rayon = "1.11.0"
6666

6767
# Transitive Dependencies (re-used from frameworks we already utilise, like Tauri)
6868
memchr = "2"
69+
rustls = { version = "0.23", default-features = false, features = ["ring", "logging", "std", "tls12"] }
6970

7071
# Mini Apps (WebXDC) support
7172
zip = { version = "2.4", default-features = false, features = ["deflate-zlib"] }
@@ -75,9 +76,9 @@ http = "1.3"
7576
url = "2.5.7"
7677

7778
# Realtime peer channels (Iroh P2P)
78-
iroh = "0.34"
79-
iroh-gossip = "0.34"
80-
iroh-quinn = "0.13"
79+
iroh = "0.96"
80+
iroh-gossip = "0.96"
81+
iroh-quinn-proto = "0.15"
8182
rand = "0.8"
8283

8384
# PIVX Promos (addressless crypto payments)
@@ -124,3 +125,6 @@ tempfile = "3"
124125
# builds from macOS don't try to link Apple's Accelerate/BLAS framework.
125126
[patch.crates-io]
126127
whisper-rs-sys = { git = "https://github.com/VectorPrivacy/whisper-rs.git", branch = "master" }
128+
# pkarr uses reqwest with "rustls" feature which forces aws-lc-rs (breaks Android 11).
129+
# Patched to use "rustls-no-provider" so our ring install_default() is used instead.
130+
pkarr = { path = "patches/pkarr" }

src-tauri/patches/pkarr/Cargo.toml

Lines changed: 340 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,340 @@
1+
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
2+
#
3+
# When uploading crates to the registry Cargo will automatically
4+
# "normalize" Cargo.toml files for maximal compatibility
5+
# with all versions of Cargo and also rewrite `path` dependencies
6+
# to registry (e.g., crates.io) dependencies.
7+
#
8+
# If you are reading this file be aware that the original Cargo.toml
9+
# will likely look very different (and much more reasonable).
10+
# See Cargo.toml.orig for the original contents.
11+
12+
[package]
13+
edition = "2021"
14+
rust-version = "1.85"
15+
name = "pkarr"
16+
version = "5.0.3"
17+
authors = [
18+
"Nuh <nuh@nuh.dev>",
19+
"SeverinAlexB <severin@synonym.to>",
20+
"SHAcollision <shacollision@synonym.to>",
21+
"dzdidi <denys@synonym.to>",
22+
]
23+
build = "build.rs"
24+
autolib = false
25+
autobins = false
26+
autoexamples = false
27+
autotests = false
28+
autobenches = false
29+
description = "Public-Key Addressable Resource Records (Pkarr); publish and resolve DNS records over Mainline DHT"
30+
homepage = "https://pkdns.net"
31+
readme = "README.md"
32+
keywords = [
33+
"mainline",
34+
"dht",
35+
"dns",
36+
"decentralized",
37+
"identity",
38+
]
39+
categories = ["network-programming"]
40+
license = "MIT"
41+
repository = "https://github.com/pubky/pkarr"
42+
43+
[package.metadata.docs.rs]
44+
all-features = true
45+
46+
[features]
47+
__client = [
48+
"signed_packet",
49+
"dep:dyn-clone",
50+
"dep:lru",
51+
"dep:sha1_smol",
52+
"dep:futures-lite",
53+
"dep:async-compat",
54+
"dep:tokio",
55+
"dep:log",
56+
"dep:tracing",
57+
"dep:wasm-bindgen-futures",
58+
]
59+
default = ["full-client"]
60+
dht = [
61+
"dep:mainline",
62+
"__client",
63+
]
64+
endpoints = [
65+
"__client",
66+
"dep:genawaiter",
67+
]
68+
extra = [
69+
"endpoints",
70+
"lmdb-cache",
71+
"reqwest-resolve",
72+
"tls",
73+
"reqwest-builder",
74+
]
75+
full = [
76+
"full-client",
77+
"extra",
78+
]
79+
full-client = [
80+
"dht",
81+
"relays",
82+
]
83+
keys = []
84+
lmdb-cache = [
85+
"__client",
86+
"dep:heed",
87+
"dep:byteorder",
88+
"dep:page_size",
89+
]
90+
relays = [
91+
"dep:url",
92+
"dep:reqwest",
93+
"dep:futures-buffered",
94+
"__client",
95+
]
96+
reqwest-builder = [
97+
"tls",
98+
"reqwest-resolve",
99+
]
100+
reqwest-resolve = [
101+
"endpoints",
102+
"dep:reqwest",
103+
]
104+
signed_packet = [
105+
"keys",
106+
"dep:simple-dns",
107+
"dep:ntimestamp",
108+
"dep:bytes",
109+
"dep:self_cell",
110+
]
111+
tls = [
112+
"endpoints",
113+
"ed25519-dalek/pkcs8",
114+
"dep:webpki",
115+
"dep:rustls",
116+
]
117+
118+
[lib]
119+
name = "pkarr"
120+
path = "src/lib.rs"
121+
122+
[[example]]
123+
name = "http-get"
124+
path = "examples/http-get.rs"
125+
required-features = ["reqwest-builder"]
126+
127+
[[example]]
128+
name = "http-serve"
129+
path = "examples/http-serve.rs"
130+
required-features = ["tls"]
131+
132+
[[example]]
133+
name = "publish"
134+
path = "examples/publish.rs"
135+
136+
[[example]]
137+
name = "resolve"
138+
path = "examples/resolve.rs"
139+
140+
[dependencies.base32]
141+
version = "0.5.1"
142+
143+
[dependencies.bytes]
144+
version = "1.11.1"
145+
optional = true
146+
147+
[dependencies.document-features]
148+
version = "0.2.12"
149+
150+
[dependencies.dyn-clone]
151+
version = "1.0.20"
152+
optional = true
153+
154+
[dependencies.ed25519-dalek]
155+
version = "3.0.0-pre.1"
156+
features = ["alloc"]
157+
158+
[dependencies.futures-buffered]
159+
version = "0.2.12"
160+
optional = true
161+
162+
[dependencies.futures-lite]
163+
version = "2.6.1"
164+
features = ["std"]
165+
optional = true
166+
default-features = false
167+
168+
[dependencies.genawaiter]
169+
version = "0.99.1"
170+
features = ["futures03"]
171+
optional = true
172+
default-features = false
173+
174+
[dependencies.lru]
175+
version = "0.16.3"
176+
optional = true
177+
default-features = false
178+
179+
[dependencies.ntimestamp]
180+
version = "1.0.0"
181+
features = ["full"]
182+
optional = true
183+
184+
[dependencies.self_cell]
185+
version = "1.2.2"
186+
optional = true
187+
188+
[dependencies.serde]
189+
version = "1.0.228"
190+
features = ["derive"]
191+
192+
[dependencies.sha1_smol]
193+
version = "1.0.1"
194+
optional = true
195+
196+
[dependencies.simple-dns]
197+
version = "0.9.3"
198+
optional = true
199+
200+
[dependencies.thiserror]
201+
version = "2.0.18"
202+
203+
[dependencies.url]
204+
version = "2.5.8"
205+
optional = true
206+
207+
[dev-dependencies.anyhow]
208+
version = "1.0.101"
209+
210+
[dev-dependencies.postcard]
211+
version = "1.1.3"
212+
features = ["alloc"]
213+
214+
[dev-dependencies.reqwest]
215+
version = "0.13"
216+
features = ["rustls-no-provider"]
217+
default-features = false
218+
219+
[dev-dependencies.rstest]
220+
version = "0.26.1"
221+
222+
[build-dependencies.cfg_aliases]
223+
version = "0.2.1"
224+
225+
[target.'cfg(not(target_family = "wasm"))'.dependencies.async-compat]
226+
version = "0.2.5"
227+
optional = true
228+
229+
[target.'cfg(not(target_family = "wasm"))'.dependencies.byteorder]
230+
version = "1.5.0"
231+
optional = true
232+
default-features = false
233+
234+
[target.'cfg(not(target_family = "wasm"))'.dependencies.getrandom]
235+
version = "0.4.1"
236+
default-features = false
237+
238+
[target.'cfg(not(target_family = "wasm"))'.dependencies.heed]
239+
version = "0.22.0"
240+
optional = true
241+
default-features = false
242+
243+
[target.'cfg(not(target_family = "wasm"))'.dependencies.mainline]
244+
version = "6.1.1"
245+
optional = true
246+
247+
[target.'cfg(not(target_family = "wasm"))'.dependencies.page_size]
248+
version = "0.6.0"
249+
optional = true
250+
251+
[target.'cfg(not(target_family = "wasm"))'.dependencies.reqwest]
252+
version = "0.13"
253+
features = ["rustls-no-provider"]
254+
optional = true
255+
default-features = false
256+
257+
[target.'cfg(not(target_family = "wasm"))'.dependencies.rustls]
258+
version = "0.23"
259+
features = [
260+
"ring",
261+
"std",
262+
]
263+
optional = true
264+
default-features = false
265+
266+
[target.'cfg(not(target_family = "wasm"))'.dependencies.tokio]
267+
version = "1.49.0"
268+
optional = true
269+
default-features = false
270+
271+
[target.'cfg(not(target_family = "wasm"))'.dependencies.tracing]
272+
version = "0.1.44"
273+
optional = true
274+
275+
[target.'cfg(not(target_family = "wasm"))'.dependencies.webpki]
276+
version = "0.103"
277+
optional = true
278+
package = "rustls-webpki"
279+
280+
[target.'cfg(not(target_family = "wasm"))'.dev-dependencies.axum]
281+
version = "0.8.8"
282+
283+
[target.'cfg(not(target_family = "wasm"))'.dev-dependencies.axum-server]
284+
version = "0.8"
285+
features = ["tls-rustls-no-provider"]
286+
287+
[target.'cfg(not(target_family = "wasm"))'.dev-dependencies.clap]
288+
version = "4.5.57"
289+
features = ["derive"]
290+
291+
[target.'cfg(not(target_family = "wasm"))'.dev-dependencies.mainline]
292+
version = "6.1.1"
293+
294+
[target.'cfg(not(target_family = "wasm"))'.dev-dependencies.tempfile]
295+
version = "3.24.0"
296+
297+
[target.'cfg(not(target_family = "wasm"))'.dev-dependencies.tokio]
298+
version = "1.49.0"
299+
features = [
300+
"macros",
301+
"rt-multi-thread",
302+
]
303+
304+
[target.'cfg(not(target_family = "wasm"))'.dev-dependencies.tokio-rustls]
305+
version = "0.26.4"
306+
default-features = false
307+
308+
[target.'cfg(not(target_family = "wasm"))'.dev-dependencies.tracing-subscriber]
309+
version = "0.3.22"
310+
features = ["env-filter"]
311+
312+
[target.wasm32-unknown-unknown.dependencies.getrandom]
313+
version = "0.4.1"
314+
features = ["wasm_js"]
315+
default-features = false
316+
317+
[target.wasm32-unknown-unknown.dependencies.log]
318+
version = "0.4.29"
319+
optional = true
320+
321+
[target.wasm32-unknown-unknown.dependencies.reqwest]
322+
version = "0.13"
323+
features = ["rustls-no-provider"]
324+
optional = true
325+
default-features = false
326+
327+
[target.wasm32-unknown-unknown.dependencies.wasm-bindgen-futures]
328+
version = "0.4.58"
329+
optional = true
330+
331+
[target.wasm32-unknown-unknown.dev-dependencies.console_log]
332+
version = "1.0.0"
333+
features = ["color"]
334+
335+
[target.wasm32-unknown-unknown.dev-dependencies.wasm-bindgen]
336+
version = "0.2.108"
337+
features = ["serde-serialize"]
338+
339+
[target.wasm32-unknown-unknown.dev-dependencies.wasm-bindgen-test]
340+
version = "0.3.58"

src-tauri/patches/pkarr/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Pkarr
2+
3+
Rust implementation of [Pkarr](https://github.com/pubky/pkarr) for publishing and resolving DNS packets over [Mainline DHT](https://github.com/Pubky/mainline).
4+
5+
## Documentation
6+
7+
- **[API Documentation](https://docs.rs/pkarr/latest/pkarr/)**
8+
- **[Examples](https://github.com/Pubky/pkarr/tree/main/pkarr/examples)**
9+
10+
## Features
11+
12+
### Runtime Support
13+
14+
- **Asynchronous by Default**: Built on async/await for optimal performance
15+
- **Blocking API Available**: Use `Client::as_blocking()` for synchronous operations
16+
- **Runtime Agnostic**: Compatible with non-Tokio runtimes via `async_compat`
17+
18+
### WebAssembly
19+
20+
- **Browser Environment**: Designed for JavaScript/Wasm integration
21+
- **Relay Communication**: Uses browser's Fetch API for relay calls
22+
- **Limitations**:
23+
- Not compatible with WASI
24+
- Cannot use WASI bindings for direct DHT access

0 commit comments

Comments
 (0)