Skip to content

Commit

Permalink
Merge branch 'upgrade-to-latest-tonic-012-des-1237'
Browse files Browse the repository at this point in the history
  • Loading branch information
Serock3 committed Sep 25, 2024
2 parents 7b75e8d + cb234d5 commit 7b54ec3
Show file tree
Hide file tree
Showing 24 changed files with 346 additions and 144 deletions.
141 changes: 97 additions & 44 deletions Cargo.lock

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

9 changes: 6 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,15 @@ unused_async = "deny"

[workspace.dependencies]
tokio = { version = "1.8" }
parity-tokio-ipc = "0.9"
futures = "0.3.15"
# Tonic and related crates
tonic = "0.10.0"
tonic = "0.12.2"
tonic-build = { version = "0.10.0", default-features = false }
tower = "0.4"
prost = "0.12.0"
prost-types = "0.12.0"
prost = "0.13.3"
prost-types = "0.13.3"
hyper-util = "0.1.8"

env_logger = "0.10.0"
thiserror = "1.0.57"
Expand Down
2 changes: 1 addition & 1 deletion mullvad-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ api-override = []
libc = "0.2"
chrono = { workspace = true }
thiserror = { workspace = true }
futures = "0.3"
futures = { workspace = true }
http = "0.2"
hyper = { version = "0.14", features = ["client", "stream", "http1", "tcp" ] }
ipnetwork = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion mullvad-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ anyhow = "1.0"
chrono = { workspace = true }
clap = { workspace = true }
thiserror = { workspace = true }
futures = "0.3"
futures = { workspace = true }
itertools = "0.10"
natord = "1.0.9"

Expand Down
2 changes: 1 addition & 1 deletion mullvad-daemon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ chrono = { workspace = true }
thiserror = { workspace = true }
either = "1.11"
fern = { version = "0.6", features = ["colored"] }
futures = "0.3"
futures = { workspace = true }
libc = "0.2"
log = { workspace = true }
regex = "1.0"
Expand Down
1 change: 1 addition & 0 deletions mullvad-ios/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ libc = "0.2"
log = { workspace = true }
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
tonic = { workspace = true }
hyper-util = { workspace = true }
tower = { workspace = true }
tunnel-obfuscation = { path = "../tunnel-obfuscation" }
oslog = "0.2"
Expand Down
20 changes: 8 additions & 12 deletions mullvad-ios/src/ephemeral_peer_proxy/ios_runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ use super::{
};
use libc::c_void;
use std::{
future::Future,
io,
pin::Pin,
ptr,
io, ptr,
sync::{Arc, Mutex},
};
use talpid_tunnel_config_client::{request_ephemeral_peer_with, Error, RelayConfigService};
Expand Down Expand Up @@ -104,14 +101,13 @@ impl IOSRuntime {
// One (1) TCP connection
let mut one_tcp_connection = Some(tcp_provider);
let conn = endpoint
.connect_with_connector(service_fn(
move |_| -> Pin<Box<dyn Future<Output = _> + Send>> {
if let Some(connection) = one_tcp_connection.take() {
return Box::pin(async move { Ok::<_, Error>(connection) });
}
Box::pin(async { Err(Error::TcpConnectionExpired) })
},
))
.connect_with_connector(service_fn(move |_| {
let connection = one_tcp_connection
.take()
.map(hyper_util::rt::tokio::TokioIo::new)
.ok_or(Error::TcpConnectionExpired);
async { connection }
}))
.await
.map_err(Error::GrpcConnectError)?;

Expand Down
2 changes: 1 addition & 1 deletion mullvad-jni/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ crate-type = ["cdylib"]
tokio = { workspace = true, features = ["rt"] }

thiserror = { workspace = true }
futures = "0.3"
futures = { workspace = true }
ipnetwork = { workspace = true }
jnix = { version = "0.5.1", features = ["derive"] }
log = { workspace = true }
Expand Down
Loading

0 comments on commit 7b54ec3

Please sign in to comment.