diff --git a/Cargo.lock b/Cargo.lock index dae36430d..cca40262e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -490,28 +490,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "axum-server" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ab4a3ec9ea8a657c72d99a03a824af695bd0fb5ec639ccbd9cd3543b41a5f9" -dependencies = [ - "arc-swap", - "bytes", - "fs-err", - "http", - "http-body", - "hyper", - "hyper-util", - "pin-project-lite", - "rustls", - "rustls-pemfile", - "rustls-pki-types", - "tokio", - "tokio-rustls", - "tower-service", -] - [[package]] name = "axum-server" version = "0.8.0" @@ -536,11 +514,10 @@ dependencies = [ [[package]] name = "axum-server-dual-protocol" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2164551db024e87f20316d164eab9f5ad342d8188b08051ceb15ca92a60ea7b7" +version = "0.8.0" +source = "git+https://github.com/vinchona/axum-server-dual-protocol.git?rev=ca6db055254255b74238673ce4135698e347d71c#ca6db055254255b74238673ce4135698e347d71c" dependencies = [ - "axum-server 0.7.3", + "axum-server", "bytes", "http", "http-body-util", @@ -1182,7 +1159,7 @@ version = "0.5.7" dependencies = [ "axum", "axum-client-ip", - "axum-server 0.8.0", + "axum-server", "axum-server-dual-protocol", "bytes", "conduwuit_admin", @@ -4981,15 +4958,6 @@ dependencies = [ "security-framework", ] -[[package]] -name = "rustls-pemfile" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" -dependencies = [ - "rustls-pki-types", -] - [[package]] name = "rustls-pki-types" version = "1.14.0" @@ -5160,7 +5128,6 @@ dependencies = [ "cfg_aliases", "httpdate", "reqwest 0.13.2", - "rustls", "sentry-backtrace", "sentry-contexts", "sentry-core", @@ -5170,7 +5137,6 @@ dependencies = [ "sentry-tower", "sentry-tracing", "tokio", - "ureq", ] [[package]] @@ -6373,34 +6339,6 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" -[[package]] -name = "ureq" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dea7109cdcd5864d4eeb1b58a1648dc9bf520360d7af16ec26d0a9354bafcfc0" -dependencies = [ - "base64 0.22.1", - "log", - "percent-encoding", - "rustls", - "rustls-pki-types", - "ureq-proto", - "utf8-zero", - "webpki-roots", -] - -[[package]] -name = "ureq-proto" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e994ba84b0bd1b1b0cf92878b7ef898a5c1760108fe7b6010327e274917a808c" -dependencies = [ - "base64 0.22.1", - "http", - "httparse", - "log", -] - [[package]] name = "url" version = "2.5.8" @@ -6426,12 +6364,6 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" -[[package]] -name = "utf8-zero" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8c0a043c9540bae7c578c88f91dda8bd82e59ae27c21baca69c8b191aaf5a6e" - [[package]] name = "utf8_iter" version = "1.0.4" @@ -6695,15 +6627,6 @@ dependencies = [ "rustls-pki-types", ] -[[package]] -name = "webpki-roots" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52f5ee44c96cf55f1b349600768e3ece3a8f26010c05265ab73f945bb1a2eb9d" -dependencies = [ - "rustls-pki-types", -] - [[package]] name = "weezl" version = "0.1.12" diff --git a/Cargo.toml b/Cargo.toml index 69492bbbc..813332ff0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -107,7 +107,10 @@ default-features = false # to listen on both HTTP and HTTPS if listening on TLS dierctly from conduwuit for complement or sytest [workspace.dependencies.axum-server-dual-protocol] -version = "0.7" +# version = "0.7" +git = "https://github.com/vinchona/axum-server-dual-protocol.git" +rev = "ca6db055254255b74238673ce4135698e347d71c" # feat!: bump axum_server to 0.8.0 +default-features = false [workspace.dependencies.axum-client-ip] version = "1.3" @@ -134,13 +137,13 @@ features = [ [workspace.dependencies.rustls] version = "0.23.25" default-features = false -features = ["aws_lc_rs"] +features = ["ring"] [workspace.dependencies.reqwest] version = "0.13.2" default-features = false features = [ - "rustls", + "rustls-no-provider", "socks", "hickory-dns", "http2", @@ -436,7 +439,6 @@ features = [ "contexts", "debug-images", "panic", - "rustls", "tower", "tower-http", "tracing", diff --git a/src/router/Cargo.toml b/src/router/Cargo.toml index 142ce8e49..a69eef39e 100644 --- a/src/router/Cargo.toml +++ b/src/router/Cargo.toml @@ -24,7 +24,7 @@ brotli_compression = [ "tower-http/compression-br", ] direct_tls = [ - "axum-server/tls-rustls", + "axum-server/tls-rustls-no-provider", "dep:rustls", "dep:axum-server-dual-protocol", ] diff --git a/src/router/serve/tls.rs b/src/router/serve/tls.rs index 9e24d25f2..713b5650d 100644 --- a/src/router/serve/tls.rs +++ b/src/router/serve/tls.rs @@ -27,9 +27,9 @@ pub(super) async fn serve( // we use ring for ruma and hashing state, but aws-lc-rs is the new default. // without this, TLS mode will panic. - rustls::crypto::aws_lc_rs::default_provider() + rustls::crypto::ring::default_provider() .install_default() - .expect("failed to initialise aws-lc-rs rustls crypto provider"); + .expect("failed to initialise ring rustls crypto provider"); info!( "Note: It is strongly recommended that you use a reverse proxy instead of running \