mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-08 23:54:39 +00:00
chore(tor): bump Arti to v2.3.0
Wins: reduced GeoIP memory usage (moved off heap), CircuitClosed→NotConnected error change (affects our handler error paths), DATA-cells-on-closed-streams fix, and a flow-control sidechannel mitigation bug fix. Nothing here directly addresses the stuck-Tor recovery work in the prior commits, but it's a clean overdue bump while we're in this code. Wrapper changes required by the bump: - arti-client + tor-rtcompat: 0.41 → 0.42 to match the new crate versions shipped with arti-v2.3.0. - arti-v2.3.0's tor-rtcompat no longer installs a rustls CryptoProvider implicitly (changelog: "if the application fails to install a rustls CryptoProvider, tor-rtcompat no longer installs one itself"). Add a direct `rustls = "0.23"` dep with the `ring` feature and `install_default()` it inside INIT_ONCE before runtime creation — otherwise create_bootstrapped panics on the first TLS handshake. Keeping `ring` (same as 2.2.0 effectively used) rather than 2.3.0's new default `aws-lc-rs`, which is heavier on Android and has known build.rs pain on aarch64-linux-android. Heads-up for the next bump: arti-v2.4.0 will explicitly wrap TorClient in Arc rather than implicitly having Arc-like semantics. We already wrap explicitly so the migration is a no-op aside from potential Arc<Arc<...>> cleanup. Rebuilds: libarti_android.so for arm64-v8a + x86_64.
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
arti-v2.2.0
|
||||
arti-v2.3.0
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "arti-android"
|
||||
version = "2.2.0"
|
||||
version = "2.3.0"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
@@ -9,14 +9,19 @@ crate-type = ["cdylib"]
|
||||
[workspace]
|
||||
|
||||
[dependencies]
|
||||
arti-client = { version = "0.41", default-features = false, features = [
|
||||
arti-client = { version = "0.42", default-features = false, features = [
|
||||
"tokio",
|
||||
"rustls",
|
||||
"compression",
|
||||
"onion-service-client",
|
||||
"static-sqlite",
|
||||
] }
|
||||
tor-rtcompat = { version = "0.41", default-features = false, features = ["tokio", "rustls"] }
|
||||
tor-rtcompat = { version = "0.42", default-features = false, features = ["tokio", "rustls"] }
|
||||
# Direct dep on rustls so we can install the `ring` crypto provider ourselves —
|
||||
# arti-v2.3.0's tor-rtcompat no longer installs one implicitly. `ring` matches
|
||||
# what arti-v2.2.0 effectively used and avoids the Android build pain of
|
||||
# aws-lc-rs (which became Arti's default in 2.3.0).
|
||||
rustls = { version = "0.23", default-features = false, features = ["ring", "std"] }
|
||||
jni = "0.21"
|
||||
tokio = { version = "1", features = ["rt-multi-thread", "net", "io-util", "time", "macros"] }
|
||||
anyhow = "1"
|
||||
|
||||
@@ -131,6 +131,12 @@ pub extern "C" fn Java_com_vitorpamplona_amethyst_ui_tor_ArtiNative_initialize(
|
||||
log_info!("Initializing Arti with data directory: {}", data_dir_str);
|
||||
|
||||
INIT_ONCE.call_once(|| {
|
||||
// arti-v2.3.0's tor-rtcompat no longer installs a rustls CryptoProvider
|
||||
// implicitly — without this, TorClient::create_bootstrapped panics on
|
||||
// first TLS handshake. install_default() returns Err if a provider is
|
||||
// already installed, which is fine; we just want at-least-one.
|
||||
let _ = rustls::crypto::ring::default_provider().install_default();
|
||||
|
||||
match tokio::runtime::Builder::new_multi_thread()
|
||||
.enable_all()
|
||||
.build()
|
||||
|
||||
Reference in New Issue
Block a user