Allow Axum to use HTTP2 if it finds a compatible TLS connection.

This commit is contained in:
Herbert Wolverson 2024-07-23 12:24:42 -05:00
parent 1240b43052
commit 243823c175
2 changed files with 29 additions and 3 deletions

30
src/rust/Cargo.lock generated
View File

@ -166,6 +166,12 @@ dependencies = [
"syn",
]
[[package]]
name = "atomic-waker"
version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
[[package]]
name = "autocfg"
version = "1.3.0"
@ -1157,6 +1163,25 @@ dependencies = [
"tracing",
]
[[package]]
name = "h2"
version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab"
dependencies = [
"atomic-waker",
"bytes",
"fnv",
"futures-core",
"futures-sink",
"http 1.1.0",
"indexmap",
"slab",
"tokio",
"tokio-util",
"tracing",
]
[[package]]
name = "half"
version = "1.8.3"
@ -1306,7 +1331,7 @@ dependencies = [
"futures-channel",
"futures-core",
"futures-util",
"h2",
"h2 0.3.26",
"http 0.2.12",
"http-body 0.4.6",
"httparse",
@ -1329,6 +1354,7 @@ dependencies = [
"bytes",
"futures-channel",
"futures-util",
"h2 0.4.5",
"http 1.1.0",
"http-body 1.0.0",
"httparse",
@ -2614,7 +2640,7 @@ dependencies = [
"encoding_rs",
"futures-core",
"futures-util",
"h2",
"h2 0.3.26",
"http 0.2.12",
"http-body 0.4.6",
"hyper 0.14.29",

View File

@ -37,7 +37,7 @@ ip_network_table = { workspace = true }
ip_network = { workspace = true }
zerocopy = { workspace = true }
fxhash = "0.2.1"
axum = { version = "0.7.5", features = ["ws"] }
axum = { version = "0.7.5", features = ["ws", "http2"] }
axum-extra = { version = "0.9.3", features = ["cookie", "cookie-private"] }
tower-http = { version = "0.5.2", features = ["fs"] }
strum = { version = "0.26.3", features = ["derive"] }