diff --git a/Cargo.lock b/Cargo.lock index 8de6828..196f192 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -248,10 +248,10 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sha1", + "sha1 0.10.7", "sync_wrapper", "tokio", - "tokio-tungstenite", + "tokio-tungstenite 0.24.0", "tower", "tower-layer", "tower-service", @@ -580,6 +580,12 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "const-oid" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" + [[package]] name = "cpufeatures" version = "0.2.17" @@ -699,6 +705,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" dependencies = [ "block-buffer 0.12.1", + "const-oid", "crypto-common 0.2.2", ] @@ -1851,7 +1858,7 @@ dependencies = [ "sha2 0.10.9", "thiserror 2.0.19", "tokio", - "tokio-tungstenite", + "tokio-tungstenite 0.30.0", "zeroize", ] @@ -1881,7 +1888,7 @@ dependencies = [ "sha2 0.10.9", "thiserror 2.0.19", "tokio", - "tokio-tungstenite", + "tokio-tungstenite 0.30.0", "tower", "tracing", "tracing-subscriber", @@ -2610,6 +2617,17 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "sha1" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aacc4cc499359472b4abe1bf11d0b12e688af9a805fa5e3016f9a386dc2d0214" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "digest 0.11.3", +] + [[package]] name = "sha2" version = "0.10.9" @@ -2956,7 +2974,19 @@ dependencies = [ "futures-util", "log", "tokio", - "tungstenite", + "tungstenite 0.24.0", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17a073bfed563fa236697a068031408a93cd9522e08abf9933ead3e73411bd71" +dependencies = [ + "futures-util", + "log", + "tokio", + "tungstenite 0.30.0", ] [[package]] @@ -3146,11 +3176,27 @@ dependencies = [ "httparse", "log", "rand 0.8.7", - "sha1", + "sha1 0.10.7", "thiserror 1.0.69", "utf-8", ] +[[package]] +name = "tungstenite" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48ac77174b19c110a50ab2128b24215ac9cb40e0e12e093fb602d175c569d22" +dependencies = [ + "bytes", + "data-encoding", + "http", + "httparse", + "log", + "rand 0.10.2", + "sha1 0.11.0", + "thiserror 2.0.19", +] + [[package]] name = "typenum" version = "1.20.1" diff --git a/Cargo.toml b/Cargo.toml index 31ef68f..db5589b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ clap = { version = "4", features = ["derive"] } # Async runtime / networking tokio = { version = "1", features = ["full"] } axum = { version = "0.7", features = ["ws"] } -tokio-tungstenite = "0.24" +tokio-tungstenite = "0.30" futures-util = "0.3" # Encoding diff --git a/core/src/sync.rs b/core/src/sync.rs index 52d4269..2aa3709 100644 --- a/core/src/sync.rs +++ b/core/src/sync.rs @@ -191,7 +191,7 @@ fn hash_hex(hash: &ChangeHash) -> String { } async fn send(ws: &mut Ws, msg: ClientMsg) -> Result<(), SyncError> { - ws.send(Message::Text(msg.to_json())) + ws.send(Message::Text(msg.to_json().into())) .await .map_err(|e| SyncError::Connection(e.to_string())) } diff --git a/relay/tests/integration.rs b/relay/tests/integration.rs index 415f1f2..d25ae57 100644 --- a/relay/tests/integration.rs +++ b/relay/tests/integration.rs @@ -40,7 +40,7 @@ async fn spawn_server(storage: Arc, admin: Option) -> S } async fn send(ws: &mut Ws, m: ClientMsg) { - ws.send(Message::Text(m.to_json())).await.unwrap(); + ws.send(Message::Text(m.to_json().into())).await.unwrap(); } async fn recv(ws: &mut Ws) -> ServerMsg {