diff options
| author | Emīls Piņķis <emils@mullvad.net> | 2022-09-20 16:47:24 +0200 |
|---|---|---|
| committer | Emīls Piņķis <emils@mullvad.net> | 2022-09-27 21:13:19 +0200 |
| commit | 34ced4259eb413ab23f8434236dcfd83a5a019a5 (patch) | |
| tree | e480e04b51b68548d968227b9842b9866c46c606 | |
| parent | cf3cc8b150de40079391b27f19ceaf2cd1afac2c (diff) | |
| download | mullvadvpn-34ced4259eb413ab23f8434236dcfd83a5a019a5.tar.xz mullvadvpn-34ced4259eb413ab23f8434236dcfd83a5a019a5.zip | |
Update tonic to 0.8
| -rw-r--r-- | Cargo.lock | 199 | ||||
| -rw-r--r-- | mullvad-cli/src/cmds/tunnel.rs | 7 | ||||
| -rw-r--r-- | mullvad-management-interface/Cargo.toml | 8 | ||||
| -rw-r--r-- | mullvad-management-interface/src/types.rs | 8 | ||||
| -rw-r--r-- | talpid-core/Cargo.toml | 6 | ||||
| -rw-r--r-- | talpid-openvpn-plugin/Cargo.toml | 6 | ||||
| -rw-r--r-- | talpid-tunnel-config-client/Cargo.toml | 6 |
7 files changed, 167 insertions, 73 deletions
diff --git a/Cargo.lock b/Cargo.lock index 1f707be4ea..c5fb503238 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -151,6 +151,51 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] +name = "axum" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4af7447fc1214c1f3a1ace861d0216a6c8bb13965b64bbad9650f375b67689a" +dependencies = [ + "async-trait", + "axum-core", + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "hyper", + "itoa 1.0.1", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "serde", + "sync_wrapper", + "tokio", + "tower", + "tower-http", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9f0c0a60006f2a293d82d571f635042a72edf927539b7685bd62d361963839b" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "mime", + "tower-layer", + "tower-service", +] + +[[package]] name = "backtrace" version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -685,7 +730,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21cdad81446a7f7dc43f6a77409efeb9733d2fa65553efef6018ef257c959b73" dependencies = [ - "heck 0.4.0", + "heck", "proc-macro2", "quote", "syn", @@ -796,9 +841,9 @@ dependencies = [ [[package]] name = "fixedbitset" -version = "0.2.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "fnv" @@ -969,9 +1014,9 @@ checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7" [[package]] name = "h2" -version = "0.3.10" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9de88456263e249e241fcd211d3954e2c9b0ef7ccfc235a444eb367cae3689" +checksum = "5ca32592cf21ac7ccab1825cd87f6c9b3d9022c44d086172ed0966bec8af30be" dependencies = [ "bytes", "fnv", @@ -994,15 +1039,6 @@ checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" [[package]] name = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "heck" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" @@ -1063,20 +1099,20 @@ dependencies = [ [[package]] name = "http" -version = "0.2.5" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1323096b05d41827dadeaee54c9981958c0f94e670bc94ed80037d1a7b8b186b" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ "bytes", "fnv", - "itoa 0.4.8", + "itoa 1.0.1", ] [[package]] name = "http-body" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "399c583b2979440c60be0821a6199eca73bc3c8dcd9d070d75ac726e2c6186e5" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", @@ -1084,6 +1120,12 @@ dependencies = [ ] [[package]] +name = "http-range-header" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" + +[[package]] name = "httparse" version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1315,7 +1357,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "002f4dfe6d97ae88c33f3489c0d31ffc6f81d9a492de98ff113b127d73bafff8" dependencies = [ - "heck 0.4.0", + "heck", "proc-macro2", "quote", "syn", @@ -1435,6 +1477,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" [[package]] +name = "matchit" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73cbba799671b762df5a175adf59ce145165747bb891505c43d09aefbbf38beb" + +[[package]] name = "md-5" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1469,6 +1517,12 @@ dependencies = [ ] [[package]] +name = "mime" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" + +[[package]] name = "miniz_oxide" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2110,9 +2164,9 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.5.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" +checksum = "e6d5014253a1331579ce62aa67443b4a658c5e7dd03d4bc6d302b94474888143" dependencies = [ "fixedbitset", "indexmap", @@ -2244,6 +2298,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" [[package]] +name = "prettyplease" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a49e86d2c26a24059894a3afa13fd17d063419b05dfb83f06d9c3566060c3f5a" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] name = "proc-macro-error" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2281,18 +2345,18 @@ checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" [[package]] name = "proc-macro2" -version = "1.0.29" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f5105d4fdaab20335ca9565e106a5d9b82b6219b5ba735731124ac6711d23d" +checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] name = "prost" -version = "0.8.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de5e2533f59d08fcf364fd374ebda0692a70bd6d7e66ef97f306f45c6c5d8020" +checksum = "399c3c31cdec40583bb68f0b18403400d01ec4289c383aa047560439952c4dd7" dependencies = [ "bytes", "prost-derive", @@ -2300,27 +2364,29 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.8.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "355f634b43cdd80724ee7848f95770e7e70eefa6dcf14fea676216573b8fd603" +checksum = "7f835c582e6bd972ba8347313300219fed5bfa52caf175298d860b61ff6069bb" dependencies = [ "bytes", - "heck 0.3.3", + "heck", "itertools", + "lazy_static", "log", "multimap", "petgraph", "prost", "prost-types", + "regex", "tempfile", "which", ] [[package]] name = "prost-derive" -version = "0.8.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "600d2f334aa05acb02a755e217ef1ab6dea4d51b58b7846588b747edec04efba" +checksum = "7345d5f0e08c0536d7ac7229952590239e77abf0a0100a1b1d890add6ea96364" dependencies = [ "anyhow", "itertools", @@ -2331,9 +2397,9 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.8.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "603bbd6394701d13f3f25aada59c7de9d35a6a5887cfc156181234a44002771b" +checksum = "4dfaa718ad76a44b3415e6c4d53b17c8f99160dcb3a99b10470fce8ad43f6e3e" dependencies = [ "bytes", "prost", @@ -2973,16 +3039,22 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.80" +version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d010a1623fbd906d51d650a9916aaefc05ffa0e4053ff7fe601167f3e715d194" +checksum = "52205623b1b0f064a4e71182c3b18ae902267282930c6d5462c91b859668426e" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", ] [[package]] +name = "sync_wrapper" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20518fe4a4c9acf048008599e464deb21beeae3d3578418951a189c235a7a9a8" + +[[package]] name = "synstructure" version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3327,16 +3399,16 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.6.10" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" +checksum = "cc463cd8deddc3770d20f9852143d50bf6094e640b485cb2e189a2099085ff45" dependencies = [ "bytes", "futures-core", "futures-sink", - "log", "pin-project-lite", "tokio", + "tracing", ] [[package]] @@ -3350,12 +3422,13 @@ dependencies = [ [[package]] name = "tonic" -version = "0.5.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "796c5e1cd49905e65dd8e700d4cb1dffcbfdb4fc9d017de08c1a537afd83627c" +checksum = "11cd56bdb54ef93935a6a79dbd1d91f1ebd4c64150fd61654031fd6b8b775c91" dependencies = [ "async-stream", "async-trait", + "axum", "base64", "bytes", "futures-core", @@ -3381,10 +3454,11 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.5.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b52d07035516c2b74337d2ac7746075e7dcae7643816c1b12c5ff8a7484c08" +checksum = "2fbcd2800e34e743b9ae795867d5f77b535d3a3be69fd731e39145719752df8c" dependencies = [ + "prettyplease", "proc-macro2", "prost-build", "quote", @@ -3393,18 +3467,18 @@ dependencies = [ [[package]] name = "tower" -version = "0.4.8" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f60422bc7fefa2f3ec70359b8ff1caff59d785877eb70595904605bcc412470f" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ "futures-core", "futures-util", "indexmap", "pin-project", + "pin-project-lite", "rand 0.8.5", "slab", "tokio", - "tokio-stream", "tokio-util", "tower-layer", "tower-service", @@ -3412,6 +3486,25 @@ dependencies = [ ] [[package]] +name = "tower-http" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c530c8675c1dbf98facee631536fa116b5fb6382d7dd6dc1b118d970eafe3ba" +dependencies = [ + "bitflags", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-range-header", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] name = "tower-layer" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3635,6 +3728,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" [[package]] +name = "unicode-ident" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcc811dc4066ac62f84f11307873c4850cb653bfa9b1719cee2bd2204a4bc5dd" + +[[package]] name = "unicode-normalization" version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3644,12 +3743,6 @@ dependencies = [ ] [[package]] -name = "unicode-segmentation" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" - -[[package]] name = "unicode-xid" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" diff --git a/mullvad-cli/src/cmds/tunnel.rs b/mullvad-cli/src/cmds/tunnel.rs index 8e6a03d3d7..d86dfa19bd 100644 --- a/mullvad-cli/src/cmds/tunnel.rs +++ b/mullvad-cli/src/cmds/tunnel.rs @@ -332,9 +332,10 @@ impl Tunnel { async fn process_wireguard_rotation_interval_set(matches: &clap::ArgMatches) -> Result<()> { let rotate_interval = matches.value_of_t_or_exit::<u64>("interval"); let mut rpc = new_rpc_client().await?; - rpc.set_wireguard_rotation_interval(types::Duration::from(Duration::from_secs( - 60 * 60 * rotate_interval, - ))) + rpc.set_wireguard_rotation_interval( + types::Duration::try_from(Duration::from_secs(60 * 60 * rotate_interval)) + .expect("Failed to convert rotation interval to prost_types::Duration"), + ) .await?; println!("Set key rotation interval: {} hour(s)", rotate_interval); Ok(()) diff --git a/mullvad-management-interface/Cargo.toml b/mullvad-management-interface/Cargo.toml index 4de1bbb66c..ce7659b416 100644 --- a/mullvad-management-interface/Cargo.toml +++ b/mullvad-management-interface/Cargo.toml @@ -13,10 +13,10 @@ err-derive = "0.3.1" mullvad-types = { path = "../mullvad-types" } mullvad-paths = { path = "../mullvad-paths" } talpid-types = { path = "../talpid-types" } -tonic = "0.5" +tonic = "0.8" tower = "0.4" -prost = "0.8" -prost-types = "0.8" +prost = "0.11" +prost-types = "0.11" parity-tokio-ipc = "0.9" futures = "0.3" tokio = { version = "1.8", features = ["rt"] } @@ -27,4 +27,4 @@ nix = "0.23" lazy_static = "1.0" [build-dependencies] -tonic-build = { version = "0.5", default-features = false, features = ["transport", "prost"] } +tonic-build = { version = "0.8", default-features = false, features = ["transport", "prost"] } diff --git a/mullvad-management-interface/src/types.rs b/mullvad-management-interface/src/types.rs index 3d9d7928f1..0f70d11a91 100644 --- a/mullvad-management-interface/src/types.rs +++ b/mullvad-management-interface/src/types.rs @@ -678,10 +678,10 @@ impl From<&mullvad_types::settings::TunnelOptions> for TunnelOptions { }), wireguard: Some(tunnel_options::WireguardOptions { mtu: u32::from(options.wireguard.options.mtu.unwrap_or_default()), - rotation_interval: options - .wireguard - .rotation_interval - .map(|ivl| Duration::from(std::time::Duration::from(ivl))), + rotation_interval: options.wireguard.rotation_interval.map(|ivl| { + prost_types::Duration::try_from(std::time::Duration::from(ivl)) + .expect("Failed to convert std::time::Duration to prost_types::Duration for tunnel_options.wireguard.rotation_interval") + }), #[cfg(windows)] use_wireguard_nt: options.wireguard.options.use_wireguard_nt, #[cfg(not(windows))] diff --git a/talpid-core/Cargo.toml b/talpid-core/Cargo.toml index 85f09f2aba..922958259f 100644 --- a/talpid-core/Cargo.toml +++ b/talpid-core/Cargo.toml @@ -43,8 +43,8 @@ internet-checksum = "0.2" socket2 = { version = "0.4.2", features = ["all"] } parity-tokio-ipc = "0.9" triggered = "0.1.1" -tonic = "0.5" -prost = "0.8" +tonic = "0.8" +prost = "0.11" [target.'cfg(unix)'.dependencies] nix = "0.23" @@ -111,7 +111,7 @@ features = [ ] [build-dependencies] -tonic-build = { version = "0.5", default-features = false, features = ["transport", "prost"] } +tonic-build = { version = "0.8", default-features = false, features = ["transport", "prost"] } [dev-dependencies] diff --git a/talpid-openvpn-plugin/Cargo.toml b/talpid-openvpn-plugin/Cargo.toml index 7373cf48c6..6a7e080ce8 100644 --- a/talpid-openvpn-plugin/Cargo.toml +++ b/talpid-openvpn-plugin/Cargo.toml @@ -20,12 +20,12 @@ tokio = { version = "1.8", features = ["rt"] } openvpn-plugin = { version = "0.4", features = ["serde", "log", "auth-failed-event"] } talpid-types = { path = "../talpid-types" } -tonic = "0.5" +tonic = "0.8" tower = "0.4" -prost = "0.8" +prost = "0.11" [build-dependencies] -tonic-build = { version = "0.5", default-features = false, features = ["transport", "prost"] } +tonic-build = { version = "0.8", default-features = false, features = ["transport", "prost"] } [target.'cfg(windows)'.build-dependencies] diff --git a/talpid-tunnel-config-client/Cargo.toml b/talpid-tunnel-config-client/Cargo.toml index 92852eccdd..62d6ab376b 100644 --- a/talpid-tunnel-config-client/Cargo.toml +++ b/talpid-tunnel-config-client/Cargo.toml @@ -11,8 +11,8 @@ publish = false log = "0.4" rand = "0.8" talpid-types = { path = "../talpid-types" } -tonic = "0.5" -prost = "0.8" +tonic = "0.8" +prost = "0.11" tower = "0.4" tokio = "1" classic-mceliece-rust = { version = "2.0.0", features = ["mceliece8192128f"] } @@ -21,4 +21,4 @@ classic-mceliece-rust = { version = "2.0.0", features = ["mceliece8192128f"] } tokio = { version = "1", features = ["rt-multi-thread"] } [build-dependencies] -tonic-build = { version = "0.5", default-features = false, features = ["transport", "prost"] }
\ No newline at end of file +tonic-build = { version = "0.8", default-features = false, features = ["transport", "prost"] } |
