diff --git a/.cargo/config.toml b/.cargo/config.toml index 0838e167..7373bb31 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,5 +1,5 @@ [build] target-dir = "out/rust" [env] -BORING_BSSL_PATH = { value = "vendor/boringssl-fips/linux_x86_64", force = true, relative = true } -BORING_BSSL_INCLUDE_PATH = { value = "vendor/boringssl-fips/include/", force = true, relative = true } +BORING_BSSL_FIPS_PATH = { value = "vendor/boringssl-fips/linux_x86_64", force = true, relative = true } +BORING_BSSL_FIPS_INCLUDE_PATH = { value = "vendor/boringssl-fips/include/", force = true, relative = true } diff --git a/Cargo.lock b/Cargo.lock index 5381c349..916ff3cf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -89,7 +89,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.32", ] [[package]] @@ -100,7 +100,7 @@ checksum = "a564d521dd56509c4c47480d00b80ee55f7e385ae48db5744c67ad50c92d2ebf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.32", ] [[package]] @@ -131,7 +131,7 @@ dependencies = [ "bitflags 1.3.2", "bytes", "futures-util", - "http", + "http 0.2.9", "http-body 0.4.5", "hyper 0.14.27", "itoa", @@ -157,7 +157,7 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http", + "http 0.2.9", "http-body 0.4.5", "mime", "rustversion", @@ -200,9 +200,9 @@ checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" [[package]] name = "bindgen" -version = "0.66.1" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7" +checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078" dependencies = [ "bitflags 2.4.0", "cexpr", @@ -215,7 +215,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.25", + "syn 2.0.32", ] [[package]] @@ -232,10 +232,10 @@ checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" [[package]] name = "boring" -version = "3.0.4" -source = "git+https://github.com/howardjohn/boring/?branch=hyper-boring/adopt-hyper-1.0.0-rc4#d5d8a21d88e254ad7c19f59301b97155d88e13c3" +version = "5.0.0" +source = "git+https://github.com/howardjohn/boring/?branch=hyper-boring/adopt-hyper-1.0.0-snapshot1#2579aaaff331f4bb9e6c50706e5ed7563deb60fc" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "boring-sys", "foreign-types", "libc", @@ -244,8 +244,8 @@ dependencies = [ [[package]] name = "boring-sys" -version = "3.0.4" -source = "git+https://github.com/howardjohn/boring/?branch=hyper-boring/adopt-hyper-1.0.0-rc4#d5d8a21d88e254ad7c19f59301b97155d88e13c3" +version = "5.0.0" +source = "git+https://github.com/howardjohn/boring/?branch=hyper-boring/adopt-hyper-1.0.0-snapshot1#2579aaaff331f4bb9e6c50706e5ed7563deb60fc" dependencies = [ "bindgen", "cmake", @@ -399,8 +399,8 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2895653b4d9f1538a83970077cb01dfc77a4810524e51a110944688e916b18e" dependencies = [ - "prost", - "prost-types", + "prost 0.11.9", + "prost-types 0.11.9", "tonic 0.9.2", "tracing-core", ] @@ -417,7 +417,7 @@ dependencies = [ "futures", "hdrhistogram", "humantime", - "prost-types", + "prost-types 0.11.9", "serde", "serde_json", "thread_local", @@ -466,7 +466,7 @@ dependencies = [ "clap", "criterion-plot", "futures", - "itertools", + "itertools 0.10.5", "lazy_static", "num-traits", "oorandom", @@ -488,7 +488,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" dependencies = [ "cast", - "itertools", + "itertools 0.10.5", ] [[package]] @@ -698,7 +698,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.32", ] [[package]] @@ -759,9 +759,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" [[package]] name = "futures-executor" @@ -803,7 +803,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.32", ] [[package]] @@ -898,7 +898,7 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", + "http 0.2.9", "indexmap 1.9.3", "slab", "tokio", @@ -906,6 +906,25 @@ dependencies = [ "tracing", ] +[[package]] +name = "h2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d308f63daf4181410c242d34c11f928dcb3aa105852019e043c9d1f4e4368a" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 1.0.0", + "indexmap 2.0.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + [[package]] name = "half" version = "1.8.2" @@ -980,6 +999,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http-body" version = "0.4.5" @@ -987,30 +1017,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", - "http", + "http 0.2.9", "pin-project-lite", ] [[package]] name = "http-body" -version = "1.0.0-rc.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "951dfc2e32ac02d67c90c0d65bd27009a635dc9b381a2cc7d284ab01e3a0150d" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" dependencies = [ "bytes", - "http", + "http 1.0.0", ] [[package]] name = "http-body-util" -version = "0.1.0-rc.3" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08ef12f041acdd397010e5fb6433270c147d3b8b2d0a840cd7fff8e531dca5c8" +checksum = "41cb79eb393015dadd30fc252023adb0b2400a0caee0fa2a077e6e21a551e840" dependencies = [ "bytes", "futures-util", - "http", - "http-body 1.0.0-rc.2", + "http 1.0.0", + "http-body 1.0.0", "pin-project-lite", ] @@ -1062,8 +1092,8 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2", - "http", + "h2 0.3.20", + "http 0.2.9", "http-body 0.4.5", "httparse", "httpdate", @@ -1078,34 +1108,33 @@ dependencies = [ [[package]] name = "hyper" -version = "1.0.0-rc.4" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d280a71f348bcc670fc55b02b63c53a04ac0bf2daff2980795aeaf53edae10e6" +checksum = "24590385be94998c5def4cf53d34edc5381144c805126f00efb954d986f9a7b2" dependencies = [ "bytes", "futures-channel", "futures-util", - "h2", - "http", - "http-body 1.0.0-rc.2", + "h2 0.4.0", + "http 1.0.0", + "http-body 1.0.0", "httparse", "httpdate", "itoa", "pin-project-lite", "tokio", - "tracing", "want", ] [[package]] name = "hyper-boring" -version = "3.0.4" -source = "git+https://github.com/howardjohn/boring/?branch=hyper-boring/adopt-hyper-1.0.0-rc4#d5d8a21d88e254ad7c19f59301b97155d88e13c3" +version = "5.0.0" +source = "git+https://github.com/howardjohn/boring/?branch=hyper-boring/adopt-hyper-1.0.0-snapshot1#2579aaaff331f4bb9e6c50706e5ed7563deb60fc" dependencies = [ "antidote", "boring", - "http", - "hyper 1.0.0-rc.4", + "http 1.0.0", + "hyper 1.0.0", "hyper-util", "linked_hash_set", "once_cell", @@ -1130,13 +1159,14 @@ dependencies = [ [[package]] name = "hyper-util" version = "0.0.0" -source = "git+https://github.com/howardjohn/hyper-util?branch=h2-timer-expose-exec-rc4#5ac239604435859c48969a2b1cb23a207197ad08" +source = "git+https://github.com/hyperium/hyper-util#e91fba80ac00464caea786be743274c4b7e958a0" dependencies = [ + "bytes", "futures-channel", "futures-util", - "http", - "hyper 1.0.0-rc.4", - "once_cell", + "http 1.0.0", + "http-body 1.0.0", + "hyper 1.0.0", "pin-project-lite", "socket2 0.5.3", "tokio", @@ -1265,6 +1295,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.8" @@ -1673,7 +1712,7 @@ checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.32", ] [[package]] @@ -1753,12 +1792,12 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "prettyplease" -version = "0.1.25" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" +checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "syn 1.0.109", + "syn 2.0.32", ] [[package]] @@ -1834,7 +1873,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c2aa5feb83bf4b2c8919eaf563f51dbab41183de73ba2353c0e03cd7b6bd892" dependencies = [ "chrono", - "itertools", + "itertools 0.10.5", "once_cell", "regex", ] @@ -1846,27 +1885,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ "bytes", - "prost-derive", + "prost-derive 0.11.9", +] + +[[package]] +name = "prost" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4fdd22f3b9c31b53c060df4a0613a1c7f062d4115a2b984dd15b1858f7e340d" +dependencies = [ + "bytes", + "prost-derive 0.12.1", ] [[package]] name = "prost-build" -version = "0.11.9" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" +checksum = "8bdf592881d821b83d471f8af290226c8d51402259e9bb5be7f9f8bdebbb11ac" dependencies = [ "bytes", "heck", - "itertools", - "lazy_static", + "itertools 0.11.0", "log", "multimap", + "once_cell", "petgraph", "prettyplease", - "prost", - "prost-types", + "prost 0.12.1", + "prost-types 0.12.1", "regex", - "syn 1.0.109", + "syn 2.0.32", "tempfile", "which", ] @@ -1878,19 +1927,41 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", - "itertools", + "itertools 0.10.5", "proc-macro2", "quote", "syn 1.0.109", ] +[[package]] +name = "prost-derive" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "265baba7fabd416cf5078179f7d2cbeca4ce7a9041111900675ea7c4cb8a4c32" +dependencies = [ + "anyhow", + "itertools 0.11.0", + "proc-macro2", + "quote", + "syn 2.0.32", +] + [[package]] name = "prost-types" version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" dependencies = [ - "prost", + "prost 0.11.9", +] + +[[package]] +name = "prost-types" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e081b29f63d83a4bc75cfc9f3fe424f9156cf92d8a4f0c9407cce9a1b67327cf" +dependencies = [ + "prost 0.12.1", ] [[package]] @@ -2194,7 +2265,7 @@ checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.32", ] [[package]] @@ -2351,9 +2422,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.25" +version = "2.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e3fc8c0c74267e2df136e5e5fb656a464158aa57624053375eb9c8c6e25ae2" +checksum = "239814284fd6f1a4ffe4ca893952cdd93c224b6a1571c9a9eadd670295c0c9e2" dependencies = [ "proc-macro2", "quote", @@ -2448,7 +2519,7 @@ checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.32", ] [[package]] @@ -2515,9 +2586,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tls-listener" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97abcaa5d5850d3b469898d1e0939b57c3afb4475122e792cdd1c82b07f5de06" +checksum = "81294c017957a1a69794f506723519255879e15a870507faf45dfed288b763dd" dependencies = [ "futures-util", "pin-project-lite", @@ -2548,11 +2619,12 @@ dependencies = [ [[package]] name = "tokio-boring" -version = "3.0.4" -source = "git+https://github.com/howardjohn/boring/?branch=hyper-boring/adopt-hyper-1.0.0-rc4#d5d8a21d88e254ad7c19f59301b97155d88e13c3" +version = "5.0.0" +source = "git+https://github.com/howardjohn/boring/?branch=hyper-boring/adopt-hyper-1.0.0-snapshot1#2579aaaff331f4bb9e6c50706e5ed7563deb60fc" dependencies = [ "boring", "boring-sys", + "once_cell", "tokio", ] @@ -2574,7 +2646,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.32", ] [[package]] @@ -2613,24 +2685,27 @@ dependencies = [ [[package]] name = "tonic" -version = "0.8.3" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f219fad3b929bef19b1f86fbc0358d35daed8f2cac972037ac0dc10bbb8d5fb" +checksum = "3082666a3a6433f7f511c7192923fa1fe07c69332d3c6a2e6bb040b569199d5a" dependencies = [ - "async-stream", "async-trait", - "base64 0.13.1", + "axum", + "base64 0.21.2", "bytes", "futures-core", "futures-util", - "http", + "h2 0.3.20", + "http 0.2.9", "http-body 0.4.5", + "hyper 0.14.27", + "hyper-timeout", "percent-encoding", "pin-project", - "prost", - "prost-derive", + "prost 0.11.9", + "tokio", "tokio-stream", - "tokio-util", + "tower", "tower-layer", "tower-service", "tracing", @@ -2638,27 +2713,20 @@ dependencies = [ [[package]] name = "tonic" -version = "0.9.2" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3082666a3a6433f7f511c7192923fa1fe07c69332d3c6a2e6bb040b569199d5a" +checksum = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e" dependencies = [ "async-trait", - "axum", "base64 0.21.2", "bytes", - "futures-core", - "futures-util", - "h2", - "http", + "http 0.2.9", "http-body 0.4.5", - "hyper 0.14.27", - "hyper-timeout", "percent-encoding", "pin-project", - "prost", + "prost 0.12.1", "tokio", "tokio-stream", - "tower", "tower-layer", "tower-service", "tracing", @@ -2666,15 +2734,15 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.8.4" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf5e9b9c0f7e0a7c027dcfaba7b2c60816c7049171f679d99ee2ff65d0de8c4" +checksum = "9d021fc044c18582b9a2408cd0dd05b1596e3ecdb5c4df822bb0183545683889" dependencies = [ "prettyplease", "proc-macro2", "prost-build", "quote", - "syn 1.0.109", + "syn 2.0.32", ] [[package]] @@ -2701,13 +2769,13 @@ dependencies = [ [[package]] name = "tower-hyper-http-body-compat" version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7ea3e622710ee44a8255baa6fcb2a34d67450e2ffb48e5e58d5a7bd6ff55a21" +source = "git+https://github.com/howardjohn/tower-hyper-http-body-compat?branch=deps/hyper-1.0.0-snapshot1#35250d00f07757b199cff9cf102a2ba2cf38858a" dependencies = [ - "http", + "http 0.2.9", + "http 1.0.0", "http-body 0.4.5", - "http-body 1.0.0-rc.2", - "hyper 1.0.0-rc.4", + "http-body 1.0.0", + "hyper 1.0.0", "pin-project-lite", "tower", "tower-service", @@ -2746,7 +2814,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.32", ] [[package]] @@ -3005,7 +3073,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.32", "wasm-bindgen-shared", ] @@ -3027,7 +3095,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.32", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3190,6 +3258,7 @@ dependencies = [ "async-trait", "atty", "boring", + "boring-sys", "byteorder", "bytes", "chrono", @@ -3198,18 +3267,20 @@ dependencies = [ "diff", "drain", "futures", + "futures-core", "futures-util", "go-parse-duration", "gperftools", + "http 0.2.9", "http-body 0.4.5", - "http-body 1.0.0-rc.2", + "http-body 1.0.0", "http-body-util", "http-types", - "hyper 1.0.0-rc.4", + "hyper 1.0.0", "hyper-boring", "hyper-util", "ipnet", - "itertools", + "itertools 0.11.0", "libc", "local-ip-address", "log", @@ -3220,9 +3291,9 @@ dependencies = [ "priority-queue", "prometheus-client", "prometheus-parse", - "prost", + "prost 0.12.1", "prost-build", - "prost-types", + "prost-types 0.12.1", "rand 0.8.5", "realm_io", "rustc_version", @@ -3237,7 +3308,7 @@ dependencies = [ "tokio", "tokio-boring", "tokio-stream", - "tonic 0.8.3", + "tonic 0.10.2", "tonic-build", "tower", "tower-hyper-http-body-compat", diff --git a/Cargo.toml b/Cargo.toml index f1de52f3..40eaa81d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,30 +25,30 @@ name = "throughput" harness = false [dependencies] -#tikv-jemallocator = { version = "0.5", features = ["profiling", "stats"]} +http-02 = { package = "http", version = "0.2.9" } anyhow = "1.0" async-stream = "0.3.3" async-trait = "0.1.58" atty = "0.2" # Fork will be dropped once Hyper goes 1.0.0 -hyper-boring = { git = "https://github.com/howardjohn/boring/", branch = "hyper-boring/adopt-hyper-1.0.0-rc4" } -boring = { git = "https://github.com/howardjohn/boring/", branch = "hyper-boring/adopt-hyper-1.0.0-rc4" } -tokio-boring = { git = "https://github.com/howardjohn/boring/", branch = "hyper-boring/adopt-hyper-1.0.0-rc4" } +hyper-boring = { git = "https://github.com/howardjohn/boring/", branch = "hyper-boring/adopt-hyper-1.0.0-snapshot1" } +boring = { git = "https://github.com/howardjohn/boring/", branch = "hyper-boring/adopt-hyper-1.0.0-snapshot1" } +tokio-boring = { git = "https://github.com/howardjohn/boring/", branch = "hyper-boring/adopt-hyper-1.0.0-snapshot1" } +boring-sys = { git = "https://github.com/howardjohn/boring/", branch = "hyper-boring/adopt-hyper-1.0.0-snapshot1" } bytes = { version = "1", features = ["serde"] } console-subscriber = { version = "0.1.6", optional = true } drain = "0.1.1" futures = "0.3.12" gperftools = { version = "0.2.0", features = ["heap"], optional = true } -hyper = { version = "1.0.0-rc.4", features = ["full"] } -# Pending https://github.com/hyperium/hyper-util/pull/25, https://github.com/hyperium/hyper-util/pull/24 -hyper-util = { git = "https://github.com/howardjohn/hyper-util", branch = "h2-timer-expose-exec-rc4", features = ["full"] } +hyper = { version = "1.0", features = ["full"] } +hyper-util = { git = "https://github.com/hyperium/hyper-util", features = ["full"] } libc = "0.2.126" log = "0.4" once_cell = "1.16.0" pprof = { version = "0.11.0", features = ["protobuf", "protobuf-codec", "criterion"] } prometheus-client = { version = "0.19.0" } -prost = "0.11" -prost-types = "0.11.1" +prost = "0.12.1" +prost-types = "0.12.1" rand = "0.8.5" serde = { version = "1", features = ["derive", "rc"] } serde_json = "1.0" @@ -56,10 +56,10 @@ serde_yaml = "0.9" socket2 = { version = "0.5", features = ["all"] } byteorder = "1.3.4" thiserror = "1.0.38" -tls-listener = { version = "0.6.0" } +tls-listener = { version = "0.7.0" } tokio = { "version" = "1", features = ["full", "test-util"] } tokio-stream = { version = "0.1.12", features = ["net"] } -tonic = { version = "0.8", default-features = false, features = ["prost", "codegen"] } +tonic = { version = "0.10.2", default-features = false, features = ["prost", "codegen"] } tower = { version = "0.4.12", features = ["full"] } tracing = "0.1.34" tracing-subscriber = { version = "0.3.16", features = ["registry", "env-filter"] } @@ -67,7 +67,7 @@ realm_io = "0.4" go-parse-duration = "0.1.1" prometheus-parse = "0.2.3" url = "2.2" -itertools = "0.10.5" +itertools = "0.11.0" ipnet = { version = "2.7.0", features = ["serde"] } http-types = { version = "2.12.0", default-features = false } textnonce = { version = "1.0.0" } @@ -75,9 +75,10 @@ priority-queue = "1.3.0" http-body-util = "0.1.0-rc.2" http-body-04 = { package = "http-body", version = "0.4" } http-body-1 = { package = "http-body", version = "1.0.0-rc.2" } -tower-hyper-http-body-compat = { version = "0.2" , features = ["server", "http2"] } +tower-hyper-http-body-compat = { git = "https://github.com/howardjohn/tower-hyper-http-body-compat", branch = "deps/hyper-1.0.0-snapshot1" , features = ["server", "http2"] } futures-util = "0.3.26" chrono = "0.4.23" +futures-core = "0.3.29" # DNS trust-dns-client = "0.22.0" @@ -89,8 +90,8 @@ trust-dns-server = { version = "0.22.1", features = [ "trust-dns-resolver" ] } netns-rs = "0.1.0" [build-dependencies] -tonic-build = { version = "0.8", default-features = false, features = ["prost"] } -prost-build = "0.11" +tonic-build = { version = "0.10.2", default-features = false, features = ["prost"] } +prost-build = "0.12.1" anyhow = "1.0.65" rustc_version = "0.4.0" @@ -110,9 +111,11 @@ incremental = true # Enable testing utils on this crate. ztunnel = { version = "0.0.0", path = ".", features = [ "testing" ] } -criterion = { version = "0.4.0", features = ["async_tokio", "html_reports"] } +criterion = { version = "0.4", features = ["async_tokio", "html_reports"] } diff = "0.1.13" local-ip-address = "0.5.3" matches = "0.1.9" test-case = "3.0.0" #debug = true + +[patch.crates-io] diff --git a/fuzz/Cargo.lock b/fuzz/Cargo.lock index 41313d87..9f25b30b 100644 --- a/fuzz/Cargo.lock +++ b/fuzz/Cargo.lock @@ -95,7 +95,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -106,7 +106,7 @@ checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -153,11 +153,17 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +[[package]] +name = "base64" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" + [[package]] name = "bindgen" -version = "0.66.1" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7" +checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078" dependencies = [ "bitflags 2.4.0", "cexpr", @@ -170,7 +176,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -187,10 +193,10 @@ checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" [[package]] name = "boring" -version = "3.0.4" -source = "git+https://github.com/howardjohn/boring/?branch=hyper-boring/adopt-hyper-1.0.0-rc4#d5d8a21d88e254ad7c19f59301b97155d88e13c3" +version = "5.0.0" +source = "git+https://github.com/howardjohn/boring/?branch=hyper-boring/adopt-hyper-1.0.0-snapshot1#2579aaaff331f4bb9e6c50706e5ed7563deb60fc" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "boring-sys", "foreign-types", "libc", @@ -199,8 +205,8 @@ dependencies = [ [[package]] name = "boring-sys" -version = "3.0.4" -source = "git+https://github.com/howardjohn/boring/?branch=hyper-boring/adopt-hyper-1.0.0-rc4#d5d8a21d88e254ad7c19f59301b97155d88e13c3" +version = "5.0.0" +source = "git+https://github.com/howardjohn/boring/?branch=hyper-boring/adopt-hyper-1.0.0-snapshot1#2579aaaff331f4bb9e6c50706e5ed7563deb60fc" dependencies = [ "bindgen", "cmake", @@ -320,7 +326,7 @@ checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" dependencies = [ "bitflags 1.3.2", "clap_lex", - "indexmap", + "indexmap 1.9.3", "textwrap", ] @@ -378,7 +384,7 @@ dependencies = [ "ciborium", "clap", "criterion-plot", - "itertools", + "itertools 0.10.5", "lazy_static", "num-traits", "oorandom", @@ -399,7 +405,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" dependencies = [ "cast", - "itertools", + "itertools 0.10.5", ] [[package]] @@ -499,6 +505,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "errno" version = "0.3.1" @@ -577,7 +589,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -638,9 +650,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" [[package]] name = "futures-executor" @@ -682,7 +694,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -757,17 +769,17 @@ checksum = "558b88954871f5e5b2af0e62e2e176c8bde7a6c2c4ed41b13d138d96da2e2cbd" [[package]] name = "h2" -version = "0.3.19" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782" +checksum = "e1d308f63daf4181410c242d34c11f928dcb3aa105852019e043c9d1f4e4368a" dependencies = [ "bytes", "fnv", "futures-core", "futures-sink", "futures-util", - "http", - "indexmap", + "http 1.0.0", + "indexmap 2.1.0", "slab", "tokio", "tokio-util", @@ -786,6 +798,12 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" + [[package]] name = "hdrhistogram" version = "7.5.2" @@ -848,6 +866,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http-body" version = "0.4.5" @@ -855,30 +884,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", - "http", + "http 0.2.9", "pin-project-lite", ] [[package]] name = "http-body" -version = "1.0.0-rc.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "951dfc2e32ac02d67c90c0d65bd27009a635dc9b381a2cc7d284ab01e3a0150d" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" dependencies = [ "bytes", - "http", + "http 1.0.0", ] [[package]] name = "http-body-util" -version = "0.1.0-rc.2" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92445bc9cc14bfa0a3ce56817dc3b5bcc227a168781a356b702410789cec0d10" +checksum = "41cb79eb393015dadd30fc252023adb0b2400a0caee0fa2a077e6e21a551e840" dependencies = [ "bytes", "futures-util", - "http", - "http-body 1.0.0-rc.2", + "http 1.0.0", + "http-body 1.0.0", "pin-project-lite", ] @@ -924,7 +953,7 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "http", + "http 0.2.9", "http-body 0.4.5", "httparse", "httpdate", @@ -938,34 +967,33 @@ dependencies = [ [[package]] name = "hyper" -version = "1.0.0-rc.4" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d280a71f348bcc670fc55b02b63c53a04ac0bf2daff2980795aeaf53edae10e6" +checksum = "24590385be94998c5def4cf53d34edc5381144c805126f00efb954d986f9a7b2" dependencies = [ "bytes", "futures-channel", "futures-util", "h2", - "http", - "http-body 1.0.0-rc.2", + "http 1.0.0", + "http-body 1.0.0", "httparse", "httpdate", "itoa", "pin-project-lite", "tokio", - "tracing", "want", ] [[package]] name = "hyper-boring" -version = "3.0.4" -source = "git+https://github.com/howardjohn/boring/?branch=hyper-boring/adopt-hyper-1.0.0-rc4#d5d8a21d88e254ad7c19f59301b97155d88e13c3" +version = "5.0.0" +source = "git+https://github.com/howardjohn/boring/?branch=hyper-boring/adopt-hyper-1.0.0-snapshot1#2579aaaff331f4bb9e6c50706e5ed7563deb60fc" dependencies = [ "antidote", "boring", - "http", - "hyper 1.0.0-rc.4", + "http 1.0.0", + "hyper 1.0.0", "hyper-util", "linked_hash_set", "once_cell", @@ -978,13 +1006,14 @@ dependencies = [ [[package]] name = "hyper-util" version = "0.0.0" -source = "git+https://github.com/howardjohn/hyper-util?branch=h2-timer-expose-exec-rc4#5ac239604435859c48969a2b1cb23a207197ad08" +source = "git+https://github.com/hyperium/hyper-util#e91fba80ac00464caea786be743274c4b7e958a0" dependencies = [ + "bytes", "futures-channel", "futures-util", - "http", - "hyper 1.0.0-rc.4", - "once_cell", + "http 1.0.0", + "http-body 1.0.0", + "hyper 1.0.0", "pin-project-lite", "socket2 0.5.3", "tokio", @@ -1044,7 +1073,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.2", ] [[package]] @@ -1103,6 +1142,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.6" @@ -1462,7 +1510,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" dependencies = [ "fixedbitset", - "indexmap", + "indexmap 1.9.3", ] [[package]] @@ -1482,7 +1530,7 @@ checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -1556,12 +1604,12 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "prettyplease" -version = "0.1.25" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" +checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] @@ -1571,14 +1619,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fff39edfcaec0d64e8d0da38564fad195d2d51b680940295fcc307366e101e61" dependencies = [ "autocfg", - "indexmap", + "indexmap 1.9.3", ] [[package]] name = "proc-macro2" -version = "1.0.60" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -1613,7 +1661,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c2aa5feb83bf4b2c8919eaf563f51dbab41183de73ba2353c0e03cd7b6bd892" dependencies = [ "chrono", - "itertools", + "itertools 0.10.5", "once_cell", "regex", ] @@ -1625,27 +1673,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ "bytes", - "prost-derive", + "prost-derive 0.11.9", +] + +[[package]] +name = "prost" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4fdd22f3b9c31b53c060df4a0613a1c7f062d4115a2b984dd15b1858f7e340d" +dependencies = [ + "bytes", + "prost-derive 0.12.1", ] [[package]] name = "prost-build" -version = "0.11.9" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" +checksum = "8bdf592881d821b83d471f8af290226c8d51402259e9bb5be7f9f8bdebbb11ac" dependencies = [ "bytes", "heck", - "itertools", - "lazy_static", + "itertools 0.11.0", "log", "multimap", + "once_cell", "petgraph", "prettyplease", - "prost", + "prost 0.12.1", "prost-types", "regex", - "syn 1.0.109", + "syn 2.0.39", "tempfile", "which", ] @@ -1657,19 +1715,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", - "itertools", + "itertools 0.10.5", "proc-macro2", "quote", "syn 1.0.109", ] +[[package]] +name = "prost-derive" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "265baba7fabd416cf5078179f7d2cbeca4ce7a9041111900675ea7c4cb8a4c32" +dependencies = [ + "anyhow", + "itertools 0.11.0", + "proc-macro2", + "quote", + "syn 2.0.39", +] + [[package]] name = "prost-types" -version = "0.11.9" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" +checksum = "e081b29f63d83a4bc75cfc9f3fe424f9156cf92d8a4f0c9407cce9a1b67327cf" dependencies = [ - "prost", + "prost 0.12.1", ] [[package]] @@ -1955,7 +2026,7 @@ checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -1998,7 +2069,7 @@ version = "0.9.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9d684e3ec7de3bf5466b32bd75303ac16f0736426e5a4e0d6e489559ce1249c" dependencies = [ - "indexmap", + "indexmap 1.9.3", "itoa", "ryu", "serde", @@ -2112,9 +2183,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.18" +version = "2.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" dependencies = [ "proc-macro2", "quote", @@ -2168,7 +2239,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -2235,9 +2306,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tls-listener" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97abcaa5d5850d3b469898d1e0939b57c3afb4475122e792cdd1c82b07f5de06" +checksum = "81294c017957a1a69794f506723519255879e15a870507faf45dfed288b763dd" dependencies = [ "futures-util", "pin-project-lite", @@ -2266,11 +2337,12 @@ dependencies = [ [[package]] name = "tokio-boring" -version = "3.0.4" -source = "git+https://github.com/howardjohn/boring/?branch=hyper-boring/adopt-hyper-1.0.0-rc4#d5d8a21d88e254ad7c19f59301b97155d88e13c3" +version = "5.0.0" +source = "git+https://github.com/howardjohn/boring/?branch=hyper-boring/adopt-hyper-1.0.0-snapshot1#2579aaaff331f4bb9e6c50706e5ed7563deb60fc" dependencies = [ "boring", "boring-sys", + "once_cell", "tokio", ] @@ -2282,7 +2354,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -2321,24 +2393,20 @@ dependencies = [ [[package]] name = "tonic" -version = "0.8.3" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f219fad3b929bef19b1f86fbc0358d35daed8f2cac972037ac0dc10bbb8d5fb" +checksum = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e" dependencies = [ - "async-stream", "async-trait", - "base64 0.13.1", + "base64 0.21.5", "bytes", - "futures-core", - "futures-util", - "http", + "http 0.2.9", "http-body 0.4.5", "percent-encoding", "pin-project", - "prost", - "prost-derive", + "prost 0.12.1", + "tokio", "tokio-stream", - "tokio-util", "tower-layer", "tower-service", "tracing", @@ -2346,15 +2414,15 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.8.4" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf5e9b9c0f7e0a7c027dcfaba7b2c60816c7049171f679d99ee2ff65d0de8c4" +checksum = "9d021fc044c18582b9a2408cd0dd05b1596e3ecdb5c4df822bb0183545683889" dependencies = [ "prettyplease", "proc-macro2", "prost-build", "quote", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] @@ -2366,7 +2434,7 @@ dependencies = [ "futures-core", "futures-util", "hdrhistogram", - "indexmap", + "indexmap 1.9.3", "pin-project", "pin-project-lite", "rand 0.8.5", @@ -2381,13 +2449,13 @@ dependencies = [ [[package]] name = "tower-hyper-http-body-compat" version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7ea3e622710ee44a8255baa6fcb2a34d67450e2ffb48e5e58d5a7bd6ff55a21" +source = "git+https://github.com/howardjohn/tower-hyper-http-body-compat?branch=deps/hyper-1.0.0-snapshot1#35250d00f07757b199cff9cf102a2ba2cf38858a" dependencies = [ - "http", + "http 0.2.9", + "http 1.0.0", "http-body 0.4.5", - "http-body 1.0.0-rc.2", - "hyper 1.0.0-rc.4", + "http-body 1.0.0", + "hyper 1.0.0", "pin-project-lite", "tower", "tower-service", @@ -2426,7 +2494,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -2679,7 +2747,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", "wasm-bindgen-shared", ] @@ -2701,7 +2769,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2864,22 +2932,25 @@ dependencies = [ "async-trait", "atty", "boring", + "boring-sys", "byteorder", "bytes", "chrono", "drain", "futures", + "futures-core", "futures-util", "go-parse-duration", + "http 0.2.9", "http-body 0.4.5", - "http-body 1.0.0-rc.2", + "http-body 1.0.0", "http-body-util", "http-types", - "hyper 1.0.0-rc.4", + "hyper 1.0.0", "hyper-boring", "hyper-util", "ipnet", - "itertools", + "itertools 0.11.0", "libc", "log", "netns-rs", @@ -2888,7 +2959,7 @@ dependencies = [ "priority-queue", "prometheus-client", "prometheus-parse", - "prost", + "prost 0.12.1", "prost-build", "prost-types", "rand 0.8.5", @@ -2924,6 +2995,6 @@ dependencies = [ "anyhow", "hyper 0.14.26", "libfuzzer-sys", - "prost", + "prost 0.11.9", "ztunnel", ] diff --git a/src/proxy/pool.rs b/src/proxy/pool.rs index c8b42e7a..122baab5 100644 --- a/src/proxy/pool.rs +++ b/src/proxy/pool.rs @@ -43,7 +43,7 @@ impl Pool { idle_timeout: Some(Duration::from_secs(90)), max_idle_per_host: std::usize::MAX, }, - &hyper_util::Exec::Default, + TokioExec, ), } } diff --git a/src/rbac.rs b/src/rbac.rs index bb12412b..770c9758 100644 --- a/src/rbac.rs +++ b/src/rbac.rs @@ -13,7 +13,7 @@ // limitations under the License. use ipnet::IpNet; -use std::convert::Into; + use std::fmt; use std::fmt::{Display, Formatter}; use std::net::{IpAddr, SocketAddr}; @@ -25,7 +25,7 @@ use xds::istio::security::Match; use xds::istio::security::StringMatch as XdsStringMatch; use crate::identity::Identity; -use crate::state::workload::WorkloadError::EnumParse; + use crate::state::workload::{byte_to_ip, WorkloadError}; use crate::xds; @@ -269,15 +269,12 @@ pub enum RbacScope { WorkloadSelector, } -impl TryFrom> for RbacScope { - type Error = WorkloadError; - - fn try_from(value: Option) -> Result { +impl From for RbacScope { + fn from(value: xds::istio::security::Scope) -> Self { match value { - Some(xds::istio::security::Scope::WorkloadSelector) => Ok(RbacScope::WorkloadSelector), - Some(xds::istio::security::Scope::Namespace) => Ok(RbacScope::Namespace), - Some(xds::istio::security::Scope::Global) => Ok(RbacScope::Global), - None => Err(EnumParse("unknown type".into())), + xds::istio::security::Scope::WorkloadSelector => RbacScope::WorkloadSelector, + xds::istio::security::Scope::Namespace => RbacScope::Namespace, + xds::istio::security::Scope::Global => RbacScope::Global, } } } @@ -288,14 +285,11 @@ pub enum RbacAction { Deny, } -impl TryFrom> for RbacAction { - type Error = WorkloadError; - - fn try_from(value: Option) -> Result { +impl From for RbacAction { + fn from(value: xds::istio::security::Action) -> Self { match value { - Some(xds::istio::security::Action::Allow) => Ok(RbacAction::Allow), - Some(xds::istio::security::Action::Deny) => Ok(RbacAction::Deny), - None => Err(EnumParse("unknown type".into())), + xds::istio::security::Action::Allow => RbacAction::Allow, + xds::istio::security::Action::Deny => RbacAction::Deny, } } } @@ -323,8 +317,8 @@ impl TryFrom<&XdsRbac> for Authorization { Ok(Authorization { name: resource.name, namespace: resource.namespace, - scope: RbacScope::try_from(xds::istio::security::Scope::from_i32(resource.scope))?, - action: RbacAction::try_from(xds::istio::security::Action::from_i32(resource.action))?, + scope: RbacScope::from(xds::istio::security::Scope::try_from(resource.scope)?), + action: RbacAction::from(xds::istio::security::Action::try_from(resource.action)?), rules, }) } diff --git a/src/state/workload.rs b/src/state/workload.rs index 3a0a0477..44ffb4ba 100644 --- a/src/state/workload.rs +++ b/src/state/workload.rs @@ -13,7 +13,7 @@ // limitations under the License. use crate::identity::Identity; -use crate::state::workload::WorkloadError::EnumParse; + use crate::xds; use crate::xds::istio::workload::{Port, PortList}; use bytes::Bytes; @@ -44,14 +44,11 @@ pub enum Protocol { HBONE, } -impl TryFrom> for Protocol { - type Error = WorkloadError; - - fn try_from(value: Option) -> Result { +impl From for Protocol { + fn from(value: xds::istio::workload::TunnelProtocol) -> Self { match value { - Some(xds::istio::workload::TunnelProtocol::Hbone) => Ok(Protocol::HBONE), - Some(xds::istio::workload::TunnelProtocol::None) => Ok(Protocol::TCP), - None => Err(EnumParse("unknown type".into())), + xds::istio::workload::TunnelProtocol::Hbone => Protocol::HBONE, + xds::istio::workload::TunnelProtocol::None => Protocol::TCP, } } } @@ -65,14 +62,11 @@ pub enum HealthStatus { Unhealthy, } -impl TryFrom> for HealthStatus { - type Error = WorkloadError; - - fn try_from(value: Option) -> Result { +impl From for HealthStatus { + fn from(value: xds::istio::workload::WorkloadStatus) -> Self { match value { - Some(xds::istio::workload::WorkloadStatus::Healthy) => Ok(HealthStatus::Healthy), - Some(xds::istio::workload::WorkloadStatus::Unhealthy) => Ok(HealthStatus::Unhealthy), - None => Err(EnumParse("unknown type".into())), + xds::istio::workload::WorkloadStatus::Healthy => HealthStatus::Healthy, + xds::istio::workload::WorkloadStatus::Unhealthy => HealthStatus::Unhealthy, } } } @@ -309,9 +303,9 @@ impl TryFrom<&XdsWorkload> for Workload { network_gateway: network_gw, gateway_address: None, - protocol: Protocol::try_from(xds::istio::workload::TunnelProtocol::from_i32( + protocol: Protocol::from(xds::istio::workload::TunnelProtocol::try_from( resource.tunnel_protocol, - ))?, + )?), uid: resource.uid, name: resource.name, @@ -340,9 +334,9 @@ impl TryFrom<&XdsWorkload> for Workload { canonical_name: resource.canonical_name, canonical_revision: resource.canonical_revision, - status: HealthStatus::try_from(xds::istio::workload::WorkloadStatus::from_i32( + status: HealthStatus::from(xds::istio::workload::WorkloadStatus::try_from( resource.status, - ))?, + )?), native_tunnel: resource.native_tunnel, authorization_policies: resource.authorization_policies, @@ -579,6 +573,8 @@ pub enum WorkloadError { EnumParse(String), #[error("nonempty gateway address is missing address")] MissingGatewayAddress, + #[error("decode error: {0}")] + DecodeError(#[from] prost::DecodeError), } #[cfg(test)] diff --git a/src/tls/boring.rs b/src/tls/boring.rs index 22c3a80f..f8ddb580 100644 --- a/src/tls/boring.rs +++ b/src/tls/boring.rs @@ -32,11 +32,11 @@ use boring::x509::extension::{ AuthorityKeyIdentifier, BasicConstraints, ExtendedKeyUsage, KeyUsage, SubjectAlternativeName, }; use boring::x509::verify::X509CheckFlags; -use boring::x509::{self, X509StoreContext, X509StoreContextRef, X509VerifyResult}; +use boring::x509::{self, X509StoreContext, X509StoreContextRef, X509VerifyError}; use bytes::Bytes; use http_body_1::{Body, Frame}; use hyper::body::Incoming; -use hyper::{Request, Response, Uri}; +use hyper::Uri; use hyper_boring::HttpsConnector; use hyper_util::client::connect::HttpConnector; use itertools::Itertools; @@ -46,6 +46,8 @@ use std::task::{Context, Poll}; use std::time::{Duration, SystemTime, UNIX_EPOCH}; use tokio::net::TcpStream; use tonic::body::BoxBody; +use tower_hyper_http_body_compat::http02_request_to_http1; +use tower_hyper_http_body_compat::http1_response_to_http02; use tower_hyper_http_body_compat::{HttpBody04ToHttpBody1, HttpBody1ToHttpBody04}; use tracing::{error, info}; @@ -361,8 +363,8 @@ impl Body for DefaultIncoming { } } -impl tower::Service> for TlsGrpcChannel { - type Response = Response>; +impl tower::Service> for TlsGrpcChannel { + type Response = http_02::Response>; type Error = hyper_util::client::legacy::Error; // type Error = hyper::Error; type Future = Pin> + Send>>; @@ -371,9 +373,8 @@ impl tower::Service> for TlsGrpcChannel { Ok(()).into() } - fn call(&mut self, req: Request) -> Self::Future { - let mut req = req.map(HttpBody04ToHttpBody1::new); - + fn call(&mut self, req: http_02::Request) -> Self::Future { + let mut req = http02_request_to_http1(req.map(HttpBody04ToHttpBody1::new)); let uri = Uri::builder() .scheme(self.uri.scheme().unwrap().to_owned()) .authority(self.uri.authority().unwrap().to_owned()) @@ -384,9 +385,10 @@ impl tower::Service> for TlsGrpcChannel { let future = self.client.request(req); Box::pin(async move { let res = future.await?; - Ok(res - .map(DefaultIncoming::Some) - .map(HttpBody1ToHttpBody04::new)) + Ok(http1_response_to_http02( + res.map(DefaultIncoming::Some) + .map(HttpBody1ToHttpBody04::new), + )) }) } } @@ -474,7 +476,7 @@ enum Verifier { impl Verifier { fn base_verifier(verified: bool, ctx: &mut X509StoreContextRef) -> Result<(), TlsError> { if !verified { - return Err(TlsError::Verification(ctx.error())); + ctx.verify_result()?; }; Ok(()) } @@ -622,7 +624,7 @@ pub enum TlsError { #[error("tls handshake error: {0:?}")] Handshake(#[from] tokio_boring::HandshakeError), #[error("tls verification error: {0}")] - Verification(X509VerifyResult), + Verification(#[from] X509VerifyError), #[error("certificate lookup error: {0} is not a known destination")] CertificateLookup(NetworkAddress), #[error("signing error: {0}")]