From 1783fad752cabed7257f9fefab9358434dc48268 Mon Sep 17 00:00:00 2001 From: Jonas Berlin Date: Sun, 3 Nov 2024 18:38:46 +0200 Subject: [PATCH 001/142] feat: Add 502 error when upstream unavailable --- rpxy-lib/src/message_handler/http_result.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/rpxy-lib/src/message_handler/http_result.rs b/rpxy-lib/src/message_handler/http_result.rs index 98cdb45..5fcada1 100644 --- a/rpxy-lib/src/message_handler/http_result.rs +++ b/rpxy-lib/src/message_handler/http_result.rs @@ -53,6 +53,7 @@ impl From for StatusCode { HttpError::FailedToAddSetCookeInResponse(_) => StatusCode::INTERNAL_SERVER_ERROR, HttpError::FailedToGenerateDownstreamResponse(_) => StatusCode::INTERNAL_SERVER_ERROR, HttpError::FailedToUpgrade(_) => StatusCode::INTERNAL_SERVER_ERROR, + HttpError::FailedToGetResponseFromBackend(_) => StatusCode::BAD_GATEWAY, // HttpError::NoUpgradeExtensionInRequest => StatusCode::BAD_REQUEST, // HttpError::NoUpgradeExtensionInResponse => StatusCode::BAD_GATEWAY, _ => StatusCode::INTERNAL_SERVER_ERROR, From b315c6cfad4cf9f8c4a8134ab78f19f4e844ffbf Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Tue, 5 Nov 2024 11:07:30 +0900 Subject: [PATCH 002/142] deps: s2n-quic and others --- rpxy-acme/Cargo.toml | 4 ++-- rpxy-bin/Cargo.toml | 4 ++-- rpxy-certs/Cargo.toml | 2 +- rpxy-lib/Cargo.toml | 10 +++++----- submodules/s2n-quic | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index 6b7b96e..be4a73a 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -14,9 +14,9 @@ publish.workspace = true post-quantum = ["rustls-post-quantum"] [dependencies] -url = { version = "2.5.2" } +url = { version = "2.5.3" } rustc-hash = "2.0.0" -thiserror = "1.0.66" +thiserror = "1.0.68" tracing = "0.1.40" async-trait = "0.1.83" base64 = "0.22.1" diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index 50173fe..6c76d9a 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -13,7 +13,7 @@ publish.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] -# default = ["http3-quinn", "cache", "rustls-backend", "acme", "post-quantum"] +# default = ["http3-quinn", "cache", "rustls-backend", "acme", "post-quantum"] # make this default in future # default = ["http3-s2n", "cache", "rustls-backend", "acme", "post-quantum"] default = ["http3-quinn", "cache", "rustls-backend", "acme"] # default = ["http3-s2n", "cache", "rustls-backend", "acme"] @@ -32,7 +32,7 @@ rpxy-lib = { path = "../rpxy-lib/", default-features = false, features = [ ] } mimalloc = { version = "*", default-features = false } -anyhow = "1.0.91" +anyhow = "1.0.92" rustc-hash = "2.0.0" serde = { version = "1.0.214", default-features = false, features = ["derive"] } tokio = { version = "1.41.0", default-features = false, features = [ diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index ba39e6c..70b633a 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -19,7 +19,7 @@ http3 = [] rustc-hash = { version = "2.0.0" } tracing = { version = "0.1.40" } derive_builder = { version = "0.20.2" } -thiserror = { version = "1.0.66" } +thiserror = { version = "1.0.68" } hot_reload = { version = "0.1.6" } async-trait = { version = "0.1.83" } rustls = { version = "0.23.16", default-features = false, features = [ diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index fb21a4f..214c855 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -54,8 +54,8 @@ pin-project-lite = "0.2.15" async-trait = "0.1.83" # Error handling -anyhow = "1.0.91" -thiserror = "1.0.66" +anyhow = "1.0.92" +thiserror = "1.0.68" # http for both server and client http = "1.1.0" @@ -94,11 +94,11 @@ tracing = { version = "0.1.40" } quinn = { version = "0.11.5", optional = true } h3 = { version = "0.0.6", features = ["tracing"], optional = true } h3-quinn = { version = "0.0.7", optional = true } -s2n-quic = { version = "1.48.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [ +s2n-quic = { version = "1.49.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [ "provider-tls-rustls", ], optional = true } -s2n-quic-core = { version = "0.48.0", path = "../submodules/s2n-quic/quic/s2n-quic-core", default-features = false, optional = true } -s2n-quic-rustls = { version = "0.48.0", path = "../submodules/s2n-quic/quic/s2n-quic-rustls", optional = true } +s2n-quic-core = { version = "0.49.0", path = "../submodules/s2n-quic/quic/s2n-quic-core", default-features = false, optional = true } +s2n-quic-rustls = { version = "0.49.0", path = "../submodules/s2n-quic/quic/s2n-quic-rustls", optional = true } s2n-quic-h3 = { path = "../submodules/s2n-quic/quic/s2n-quic-h3/", features = [ "tracing", ], optional = true } diff --git a/submodules/s2n-quic b/submodules/s2n-quic index ffeaac1..7bbf574 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit ffeaac1eb32589599c9be357f2273a2824741c7d +Subproject commit 7bbf5745306ddcc905fdc0486ace1328bccbafd1 From 641292fe5db2c66cc34f4a08cc850ee5b308e3b1 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Tue, 5 Nov 2024 19:40:04 +0900 Subject: [PATCH 003/142] deps --- rpxy-acme/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index be4a73a..d33c794 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -28,7 +28,7 @@ rustls = { version = "0.23.16", default-features = false, features = [ "std", "aws_lc_rs", ] } -rustls-platform-verifier = { version = "0.3.4" } +rustls-platform-verifier = { version = "0.4.0" } rustls-acme = { path = "../submodules/rustls-acme/", default-features = false, features = [ "aws-lc-rs", ] } From 1a199396c0fe8309165cce750a83f7fc1867abf7 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Tue, 5 Nov 2024 19:49:21 +0900 Subject: [PATCH 004/142] fix: update the default logging level of external crates to warn --- rpxy-bin/src/log.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpxy-bin/src/log.rs b/rpxy-bin/src/log.rs index 4076943..dd98b77 100644 --- a/rpxy-bin/src/log.rs +++ b/rpxy-bin/src/log.rs @@ -21,7 +21,7 @@ pub fn init_logger() { .target() .starts_with(env!("CARGO_PKG_NAME").replace('-', "_").as_str()) && metadata.level() <= &level) - || metadata.level() <= &tracing::Level::ERROR.min(level) + || metadata.level() <= &tracing::Level::WARN.min(level) })); tracing_subscriber::registry().with(stdio_layer).init(); } else { From 7cad7fd3650a53044abebfd55a38b5b2a23dbbf7 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Tue, 5 Nov 2024 23:07:14 +0900 Subject: [PATCH 005/142] update hot_reload --- rpxy-bin/Cargo.toml | 2 +- rpxy-bin/src/config/service.rs | 9 ++++----- rpxy-bin/src/main.rs | 13 ++++++++----- rpxy-certs/Cargo.toml | 2 +- rpxy-lib/Cargo.toml | 2 +- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index 6c76d9a..990f60a 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -49,7 +49,7 @@ futures-util = { version = "0.3.31", default-features = false } # config clap = { version = "4.5.20", features = ["std", "cargo", "wrap_help"] } toml = { version = "0.8.19", default-features = false, features = ["parse"] } -hot_reload = "0.1.6" +hot_reload = "0.1.8" serde_ignored = "0.1.10" # logging diff --git a/rpxy-bin/src/config/service.rs b/rpxy-bin/src/config/service.rs index 8769b96..76702c8 100644 --- a/rpxy-bin/src/config/service.rs +++ b/rpxy-bin/src/config/service.rs @@ -8,17 +8,16 @@ pub struct ConfigTomlReloader { } #[async_trait] -impl Reload for ConfigTomlReloader { +impl Reload for ConfigTomlReloader { type Source = String; - async fn new(source: &Self::Source) -> Result> { + async fn new(source: &Self::Source) -> Result> { Ok(Self { config_path: source.clone(), }) } - async fn reload(&self) -> Result, ReloaderError> { - let conf = ConfigToml::new(&self.config_path) - .map_err(|_e| ReloaderError::::Reload("Failed to reload config toml"))?; + async fn reload(&self) -> Result, ReloaderError> { + let conf = ConfigToml::new(&self.config_path).map_err(|e| ReloaderError::::Reload(e.to_string()))?; Ok(Some(conf)) } } diff --git a/rpxy-bin/src/main.rs b/rpxy-bin/src/main.rs index ce96253..d1156d8 100644 --- a/rpxy-bin/src/main.rs +++ b/rpxy-bin/src/main.rs @@ -40,10 +40,13 @@ fn main() { std::process::exit(1); } } else { - let (config_service, config_rx) = - ReloaderService::::new(&parsed_opts.config_file_path, CONFIG_WATCH_DELAY_SECS, false) - .await - .unwrap(); + let (config_service, config_rx) = ReloaderService::::new( + &parsed_opts.config_file_path, + CONFIG_WATCH_DELAY_SECS, + false, + ) + .await + .unwrap(); tokio::select! { config_res = config_service.start() => { @@ -246,7 +249,7 @@ async fn rpxy_service_without_watcher( } async fn rpxy_service_with_watcher( - mut config_rx: ReloaderReceiver, + mut config_rx: ReloaderReceiver, runtime_handle: tokio::runtime::Handle, ) -> Result<(), anyhow::Error> { info!("Start rpxy service with dynamic config reloader"); diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index 70b633a..7da21b4 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -20,7 +20,7 @@ rustc-hash = { version = "2.0.0" } tracing = { version = "0.1.40" } derive_builder = { version = "0.20.2" } thiserror = { version = "1.0.68" } -hot_reload = { version = "0.1.6" } +hot_reload = { version = "0.1.8" } async-trait = { version = "0.1.83" } rustls = { version = "0.23.16", default-features = false, features = [ "std", diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 214c855..5020e8e 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -79,7 +79,7 @@ hyper-rustls = { version = "0.27.3", default-features = false, features = [ # tls and cert management for server rpxy-certs = { path = "../rpxy-certs/", default-features = false } -hot_reload = "0.1.6" +hot_reload = "0.1.8" rustls = { version = "0.23.16", default-features = false } rustls-post-quantum = { version = "0.1.0", optional = true } tokio-rustls = { version = "0.26.0", features = ["early-data"] } From e14efb5149894d107d7205ade7223d48eb299f31 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Tue, 12 Nov 2024 11:55:26 +0800 Subject: [PATCH 006/142] chore: deps --- rpxy-acme/Cargo.toml | 4 ++-- rpxy-bin/Cargo.toml | 6 +++--- rpxy-certs/Cargo.toml | 4 ++-- rpxy-lib/Cargo.toml | 12 ++++++------ submodules/s2n-quic | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index d33c794..ecea66b 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -16,7 +16,7 @@ post-quantum = ["rustls-post-quantum"] [dependencies] url = { version = "2.5.3" } rustc-hash = "2.0.0" -thiserror = "1.0.68" +thiserror = "2.0.3" tracing = "0.1.40" async-trait = "0.1.83" base64 = "0.22.1" @@ -33,6 +33,6 @@ rustls-acme = { path = "../submodules/rustls-acme/", default-features = false, f "aws-lc-rs", ] } rustls-post-quantum = { version = "0.1.0", optional = true } -tokio = { version = "1.41.0", default-features = false } +tokio = { version = "1.41.1", default-features = false } tokio-util = { version = "0.7.12", default-features = false } tokio-stream = { version = "0.1.16", default-features = false } diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index 990f60a..92469ba 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -32,10 +32,10 @@ rpxy-lib = { path = "../rpxy-lib/", default-features = false, features = [ ] } mimalloc = { version = "*", default-features = false } -anyhow = "1.0.92" +anyhow = "1.0.93" rustc-hash = "2.0.0" -serde = { version = "1.0.214", default-features = false, features = ["derive"] } -tokio = { version = "1.41.0", default-features = false, features = [ +serde = { version = "1.0.215", default-features = false, features = ["derive"] } +tokio = { version = "1.41.1", default-features = false, features = [ "net", "rt-multi-thread", "time", diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index 7da21b4..a64b266 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -19,7 +19,7 @@ http3 = [] rustc-hash = { version = "2.0.0" } tracing = { version = "0.1.40" } derive_builder = { version = "0.20.2" } -thiserror = { version = "1.0.68" } +thiserror = { version = "2.0.3" } hot_reload = { version = "0.1.8" } async-trait = { version = "0.1.83" } rustls = { version = "0.23.16", default-features = false, features = [ @@ -35,7 +35,7 @@ rustls-post-quantum = { version = "0.1.0", optional = true } x509-parser = { version = "0.16.0" } [dev-dependencies] -tokio = { version = "1.41.0", default-features = false, features = [ +tokio = { version = "1.41.1", default-features = false, features = [ "rt-multi-thread", "macros", ] } diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 5020e8e..3c4e628 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -41,7 +41,7 @@ rustc-hash = "2.0.0" bytes = "1.8.0" derive_builder = "0.20.2" futures = { version = "0.3.31", features = ["alloc", "async-await"] } -tokio = { version = "1.41.0", default-features = false, features = [ +tokio = { version = "1.41.1", default-features = false, features = [ "net", "rt-multi-thread", "time", @@ -54,8 +54,8 @@ pin-project-lite = "0.2.15" async-trait = "0.1.83" # Error handling -anyhow = "1.0.92" -thiserror = "1.0.68" +anyhow = "1.0.93" +thiserror = "2.0.3" # http for both server and client http = "1.1.0" @@ -94,11 +94,11 @@ tracing = { version = "0.1.40" } quinn = { version = "0.11.5", optional = true } h3 = { version = "0.0.6", features = ["tracing"], optional = true } h3-quinn = { version = "0.0.7", optional = true } -s2n-quic = { version = "1.49.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [ +s2n-quic = { version = "1.50.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [ "provider-tls-rustls", ], optional = true } -s2n-quic-core = { version = "0.49.0", path = "../submodules/s2n-quic/quic/s2n-quic-core", default-features = false, optional = true } -s2n-quic-rustls = { version = "0.49.0", path = "../submodules/s2n-quic/quic/s2n-quic-rustls", optional = true } +s2n-quic-core = { version = "0.50.0", path = "../submodules/s2n-quic/quic/s2n-quic-core", default-features = false, optional = true } +s2n-quic-rustls = { version = "0.50.0", path = "../submodules/s2n-quic/quic/s2n-quic-rustls", optional = true } s2n-quic-h3 = { path = "../submodules/s2n-quic/quic/s2n-quic-h3/", features = [ "tracing", ], optional = true } diff --git a/submodules/s2n-quic b/submodules/s2n-quic index 7bbf574..2a81847 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit 7bbf5745306ddcc905fdc0486ace1328bccbafd1 +Subproject commit 2a81847fa0d3ceead08d7f0c5469eaee853c8a6c From 2e20287b4743b49e36b5b0fc7b9c33651300df35 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Mon, 18 Nov 2024 16:56:32 +0900 Subject: [PATCH 007/142] chore: deps --- rpxy-acme/Cargo.toml | 4 ++-- rpxy-bin/Cargo.toml | 2 +- rpxy-certs/Cargo.toml | 2 +- rpxy-lib/Cargo.toml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index ecea66b..903cbb0 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -20,11 +20,11 @@ thiserror = "2.0.3" tracing = "0.1.40" async-trait = "0.1.83" base64 = "0.22.1" -aws-lc-rs = { version = "1.10.0", default-features = false, features = [ +aws-lc-rs = { version = "1.11.0", default-features = false, features = [ "aws-lc-sys", ] } blocking = "1.6.1" -rustls = { version = "0.23.16", default-features = false, features = [ +rustls = { version = "0.23.17", default-features = false, features = [ "std", "aws_lc_rs", ] } diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index 92469ba..e7f9cc1 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -47,7 +47,7 @@ async-trait = "0.1.83" futures-util = { version = "0.3.31", default-features = false } # config -clap = { version = "4.5.20", features = ["std", "cargo", "wrap_help"] } +clap = { version = "4.5.21", features = ["std", "cargo", "wrap_help"] } toml = { version = "0.8.19", default-features = false, features = ["parse"] } hot_reload = "0.1.8" serde_ignored = "0.1.10" diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index a64b266..cab3243 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -22,7 +22,7 @@ derive_builder = { version = "0.20.2" } thiserror = { version = "2.0.3" } hot_reload = { version = "0.1.8" } async-trait = { version = "0.1.83" } -rustls = { version = "0.23.16", default-features = false, features = [ +rustls = { version = "0.23.17", default-features = false, features = [ "std", "aws_lc_rs", ] } diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 3c4e628..74ad6d3 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -80,7 +80,7 @@ hyper-rustls = { version = "0.27.3", default-features = false, features = [ # tls and cert management for server rpxy-certs = { path = "../rpxy-certs/", default-features = false } hot_reload = "0.1.8" -rustls = { version = "0.23.16", default-features = false } +rustls = { version = "0.23.17", default-features = false } rustls-post-quantum = { version = "0.1.0", optional = true } tokio-rustls = { version = "0.26.0", features = ["early-data"] } @@ -91,7 +91,7 @@ rpxy-acme = { path = "../rpxy-acme/", default-features = false, optional = true tracing = { version = "0.1.40" } # http/3 -quinn = { version = "0.11.5", optional = true } +quinn = { version = "0.11.6", optional = true } h3 = { version = "0.0.6", features = ["tracing"], optional = true } h3-quinn = { version = "0.0.7", optional = true } s2n-quic = { version = "1.50.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [ From 3af6ac957c30ebc2bc5d5f463d64b8db25c1e197 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Fri, 22 Nov 2024 12:58:54 +0900 Subject: [PATCH 008/142] deps: s2n-quic and others --- rpxy-lib/Cargo.toml | 8 ++++---- submodules/s2n-quic | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 74ad6d3..ef42e7c 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -60,7 +60,7 @@ thiserror = "2.0.3" # http for both server and client http = "1.1.0" http-body-util = "0.1.2" -hyper = { version = "1.5.0", default-features = false } +hyper = { version = "1.5.1", default-features = false } hyper-util = { version = "0.1.10", features = ["full"] } futures-util = { version = "0.3.31", default-features = false } futures-channel = { version = "0.3.31", default-features = false } @@ -94,11 +94,11 @@ tracing = { version = "0.1.40" } quinn = { version = "0.11.6", optional = true } h3 = { version = "0.0.6", features = ["tracing"], optional = true } h3-quinn = { version = "0.0.7", optional = true } -s2n-quic = { version = "1.50.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [ +s2n-quic = { version = "1.51.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [ "provider-tls-rustls", ], optional = true } -s2n-quic-core = { version = "0.50.0", path = "../submodules/s2n-quic/quic/s2n-quic-core", default-features = false, optional = true } -s2n-quic-rustls = { version = "0.50.0", path = "../submodules/s2n-quic/quic/s2n-quic-rustls", optional = true } +s2n-quic-core = { version = "0.51.0", path = "../submodules/s2n-quic/quic/s2n-quic-core", default-features = false, optional = true } +s2n-quic-rustls = { version = "0.51.0", path = "../submodules/s2n-quic/quic/s2n-quic-rustls", optional = true } s2n-quic-h3 = { path = "../submodules/s2n-quic/quic/s2n-quic-h3/", features = [ "tracing", ], optional = true } diff --git a/submodules/s2n-quic b/submodules/s2n-quic index 2a81847..0e475b8 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit 2a81847fa0d3ceead08d7f0c5469eaee853c8a6c +Subproject commit 0e475b839f65daa6eafa6badb748f4087c133fdb From e2e1c2e7a01795f61fa8312a0944e1b74205ef7c Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Sat, 23 Nov 2024 09:04:51 +0900 Subject: [PATCH 009/142] chore: deps --- rpxy-acme/Cargo.toml | 6 +++--- rpxy-certs/Cargo.toml | 2 +- rpxy-lib/Cargo.toml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index 903cbb0..1be23d3 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -14,17 +14,17 @@ publish.workspace = true post-quantum = ["rustls-post-quantum"] [dependencies] -url = { version = "2.5.3" } +url = { version = "2.5.4" } rustc-hash = "2.0.0" thiserror = "2.0.3" tracing = "0.1.40" async-trait = "0.1.83" base64 = "0.22.1" -aws-lc-rs = { version = "1.11.0", default-features = false, features = [ +aws-lc-rs = { version = "1.11.1", default-features = false, features = [ "aws-lc-sys", ] } blocking = "1.6.1" -rustls = { version = "0.23.17", default-features = false, features = [ +rustls = { version = "0.23.18", default-features = false, features = [ "std", "aws_lc_rs", ] } diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index cab3243..86d00c5 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -22,7 +22,7 @@ derive_builder = { version = "0.20.2" } thiserror = { version = "2.0.3" } hot_reload = { version = "0.1.8" } async-trait = { version = "0.1.83" } -rustls = { version = "0.23.17", default-features = false, features = [ +rustls = { version = "0.23.18", default-features = false, features = [ "std", "aws_lc_rs", ] } diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index ef42e7c..7ec9ad7 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -80,7 +80,7 @@ hyper-rustls = { version = "0.27.3", default-features = false, features = [ # tls and cert management for server rpxy-certs = { path = "../rpxy-certs/", default-features = false } hot_reload = "0.1.8" -rustls = { version = "0.23.17", default-features = false } +rustls = { version = "0.23.18", default-features = false } rustls-post-quantum = { version = "0.1.0", optional = true } tokio-rustls = { version = "0.26.0", features = ["early-data"] } From 0180b618e42fab36ecc301479d1cf0fc8ffb3770 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Thu, 28 Nov 2024 11:36:11 +0900 Subject: [PATCH 010/142] chore: deps --- rpxy-acme/Cargo.toml | 4 ++-- rpxy-bin/Cargo.toml | 2 +- rpxy-certs/Cargo.toml | 4 ++-- rpxy-lib/Cargo.toml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index 1be23d3..3143168 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -17,14 +17,14 @@ post-quantum = ["rustls-post-quantum"] url = { version = "2.5.4" } rustc-hash = "2.0.0" thiserror = "2.0.3" -tracing = "0.1.40" +tracing = "0.1.41" async-trait = "0.1.83" base64 = "0.22.1" aws-lc-rs = { version = "1.11.1", default-features = false, features = [ "aws-lc-sys", ] } blocking = "1.6.1" -rustls = { version = "0.23.18", default-features = false, features = [ +rustls = { version = "0.23.19", default-features = false, features = [ "std", "aws_lc_rs", ] } diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index e7f9cc1..b5dec39 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -53,7 +53,7 @@ hot_reload = "0.1.8" serde_ignored = "0.1.10" # logging -tracing = { version = "0.1.40" } +tracing = { version = "0.1.41" } tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } ################################ diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index 86d00c5..dc6ddfe 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -17,12 +17,12 @@ http3 = [] [dependencies] rustc-hash = { version = "2.0.0" } -tracing = { version = "0.1.40" } +tracing = { version = "0.1.41" } derive_builder = { version = "0.20.2" } thiserror = { version = "2.0.3" } hot_reload = { version = "0.1.8" } async-trait = { version = "0.1.83" } -rustls = { version = "0.23.18", default-features = false, features = [ +rustls = { version = "0.23.19", default-features = false, features = [ "std", "aws_lc_rs", ] } diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 7ec9ad7..f8467c7 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -80,7 +80,7 @@ hyper-rustls = { version = "0.27.3", default-features = false, features = [ # tls and cert management for server rpxy-certs = { path = "../rpxy-certs/", default-features = false } hot_reload = "0.1.8" -rustls = { version = "0.23.18", default-features = false } +rustls = { version = "0.23.19", default-features = false } rustls-post-quantum = { version = "0.1.0", optional = true } tokio-rustls = { version = "0.26.0", features = ["early-data"] } @@ -88,7 +88,7 @@ tokio-rustls = { version = "0.26.0", features = ["early-data"] } rpxy-acme = { path = "../rpxy-acme/", default-features = false, optional = true } # logging -tracing = { version = "0.1.40" } +tracing = { version = "0.1.41" } # http/3 quinn = { version = "0.11.6", optional = true } From 70a587bc33c27f25f3b8af5e29f2d4504a8823a4 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 11 Dec 2024 10:30:43 +0900 Subject: [PATCH 011/142] chore: deps --- rpxy-acme/Cargo.toml | 10 +++++----- rpxy-bin/Cargo.toml | 12 ++++++------ rpxy-certs/Cargo.toml | 6 +++--- rpxy-lib/Cargo.toml | 20 ++++++++++---------- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index 3143168..52db006 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -15,8 +15,8 @@ post-quantum = ["rustls-post-quantum"] [dependencies] url = { version = "2.5.4" } -rustc-hash = "2.0.0" -thiserror = "2.0.3" +rustc-hash = "2.1.0" +thiserror = "2.0.6" tracing = "0.1.41" async-trait = "0.1.83" base64 = "0.22.1" @@ -33,6 +33,6 @@ rustls-acme = { path = "../submodules/rustls-acme/", default-features = false, f "aws-lc-rs", ] } rustls-post-quantum = { version = "0.1.0", optional = true } -tokio = { version = "1.41.1", default-features = false } -tokio-util = { version = "0.7.12", default-features = false } -tokio-stream = { version = "0.1.16", default-features = false } +tokio = { version = "1.42.0", default-features = false } +tokio-util = { version = "0.7.13", default-features = false } +tokio-stream = { version = "0.1.17", default-features = false } diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index b5dec39..bf0a148 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -32,29 +32,29 @@ rpxy-lib = { path = "../rpxy-lib/", default-features = false, features = [ ] } mimalloc = { version = "*", default-features = false } -anyhow = "1.0.93" -rustc-hash = "2.0.0" +anyhow = "1.0.94" +rustc-hash = "2.1.0" serde = { version = "1.0.215", default-features = false, features = ["derive"] } -tokio = { version = "1.41.1", default-features = false, features = [ +tokio = { version = "1.42.0", default-features = false, features = [ "net", "rt-multi-thread", "time", "sync", "macros", ] } -tokio-util = { version = "0.7.12", default-features = false } +tokio-util = { version = "0.7.13", default-features = false } async-trait = "0.1.83" futures-util = { version = "0.3.31", default-features = false } # config -clap = { version = "4.5.21", features = ["std", "cargo", "wrap_help"] } +clap = { version = "4.5.23", features = ["std", "cargo", "wrap_help"] } toml = { version = "0.8.19", default-features = false, features = ["parse"] } hot_reload = "0.1.8" serde_ignored = "0.1.10" # logging tracing = { version = "0.1.41" } -tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } +tracing-subscriber = { version = "0.3.19", features = ["env-filter"] } ################################ # cert management diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index dc6ddfe..1bec247 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -16,10 +16,10 @@ post-quantum = ["rustls-post-quantum"] http3 = [] [dependencies] -rustc-hash = { version = "2.0.0" } +rustc-hash = { version = "2.1.0" } tracing = { version = "0.1.41" } derive_builder = { version = "0.20.2" } -thiserror = { version = "2.0.3" } +thiserror = { version = "2.0.6" } hot_reload = { version = "0.1.8" } async-trait = { version = "0.1.83" } rustls = { version = "0.23.19", default-features = false, features = [ @@ -35,7 +35,7 @@ rustls-post-quantum = { version = "0.1.0", optional = true } x509-parser = { version = "0.16.0" } [dev-dependencies] -tokio = { version = "1.41.1", default-features = false, features = [ +tokio = { version = "1.42.0", default-features = false, features = [ "rt-multi-thread", "macros", ] } diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index f8467c7..f8c71c4 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -37,11 +37,11 @@ post-quantum = [ [dependencies] rand = "0.8.5" -rustc-hash = "2.0.0" -bytes = "1.8.0" +rustc-hash = "2.1.0" +bytes = "1.9.0" derive_builder = "0.20.2" futures = { version = "0.3.31", features = ["alloc", "async-await"] } -tokio = { version = "1.41.1", default-features = false, features = [ +tokio = { version = "1.42.0", default-features = false, features = [ "net", "rt-multi-thread", "time", @@ -49,16 +49,16 @@ tokio = { version = "1.41.1", default-features = false, features = [ "macros", "fs", ] } -tokio-util = { version = "0.7.12", default-features = false } +tokio-util = { version = "0.7.13", default-features = false } pin-project-lite = "0.2.15" async-trait = "0.1.83" # Error handling -anyhow = "1.0.93" -thiserror = "2.0.3" +anyhow = "1.0.94" +thiserror = "2.0.6" # http for both server and client -http = "1.1.0" +http = "1.2.0" http-body-util = "0.1.2" hyper = { version = "1.5.1", default-features = false } hyper-util = { version = "0.1.10", features = ["full"] } @@ -82,7 +82,7 @@ rpxy-certs = { path = "../rpxy-certs/", default-features = false } hot_reload = "0.1.8" rustls = { version = "0.23.19", default-features = false } rustls-post-quantum = { version = "0.1.0", optional = true } -tokio-rustls = { version = "0.26.0", features = ["early-data"] } +tokio-rustls = { version = "0.26.1", features = ["early-data"] } # acme rpxy-acme = { path = "../rpxy-acme/", default-features = false, optional = true } @@ -104,7 +104,7 @@ s2n-quic-h3 = { path = "../submodules/s2n-quic/quic/s2n-quic-h3/", features = [ ], optional = true } ########## # for UDP socket wit SO_REUSEADDR when h3 with quinn -socket2 = { version = "0.5.7", features = ["all"], optional = true } +socket2 = { version = "0.5.8", features = ["all"], optional = true } # cache http-cache-semantics = { path = "../submodules/rusty-http-cache-semantics", default-features = false, optional = true } @@ -112,7 +112,7 @@ lru = { version = "0.12.5", optional = true } sha2 = { version = "0.10.8", default-features = false, optional = true } # cookie handling for sticky cookie -chrono = { version = "0.4.38", default-features = false, features = [ +chrono = { version = "0.4.39", default-features = false, features = [ "unstable-locales", "alloc", "clock", From 69885a782a5b80f603ef76ff85ac9f27628b9642 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Thu, 12 Dec 2024 14:59:45 +0900 Subject: [PATCH 012/142] chore deps rustls-post-quantum, make pq default --- rpxy-acme/Cargo.toml | 4 ++-- rpxy-bin/Cargo.toml | 6 ++---- rpxy-certs/Cargo.toml | 4 ++-- rpxy-lib/Cargo.toml | 4 ++-- submodules/s2n-quic | 2 +- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index 52db006..c0d473a 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -24,7 +24,7 @@ aws-lc-rs = { version = "1.11.1", default-features = false, features = [ "aws-lc-sys", ] } blocking = "1.6.1" -rustls = { version = "0.23.19", default-features = false, features = [ +rustls = { version = "0.23.20", default-features = false, features = [ "std", "aws_lc_rs", ] } @@ -32,7 +32,7 @@ rustls-platform-verifier = { version = "0.4.0" } rustls-acme = { path = "../submodules/rustls-acme/", default-features = false, features = [ "aws-lc-rs", ] } -rustls-post-quantum = { version = "0.1.0", optional = true } +rustls-post-quantum = { version = "0.2.1", optional = true } tokio = { version = "1.42.0", default-features = false } tokio-util = { version = "0.7.13", default-features = false } tokio-stream = { version = "0.1.17", default-features = false } diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index bf0a148..2c14df7 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -14,9 +14,7 @@ publish.workspace = true [features] # default = ["http3-quinn", "cache", "rustls-backend", "acme", "post-quantum"] # make this default in future -# default = ["http3-s2n", "cache", "rustls-backend", "acme", "post-quantum"] -default = ["http3-quinn", "cache", "rustls-backend", "acme"] -# default = ["http3-s2n", "cache", "rustls-backend", "acme"] +default = ["http3-s2n", "cache", "rustls-backend", "acme", "post-quantum"] http3-quinn = ["rpxy-lib/http3-quinn"] http3-s2n = ["rpxy-lib/http3-s2n"] native-tls-backend = ["rpxy-lib/native-tls-backend"] @@ -34,7 +32,7 @@ rpxy-lib = { path = "../rpxy-lib/", default-features = false, features = [ mimalloc = { version = "*", default-features = false } anyhow = "1.0.94" rustc-hash = "2.1.0" -serde = { version = "1.0.215", default-features = false, features = ["derive"] } +serde = { version = "1.0.216", default-features = false, features = ["derive"] } tokio = { version = "1.42.0", default-features = false, features = [ "net", "rt-multi-thread", diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index 1bec247..1ca8e41 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -22,7 +22,7 @@ derive_builder = { version = "0.20.2" } thiserror = { version = "2.0.6" } hot_reload = { version = "0.1.8" } async-trait = { version = "0.1.83" } -rustls = { version = "0.23.19", default-features = false, features = [ +rustls = { version = "0.23.20", default-features = false, features = [ "std", "aws_lc_rs", ] } @@ -31,7 +31,7 @@ rustls-webpki = { version = "0.102.8", default-features = false, features = [ "std", "aws_lc_rs", ] } -rustls-post-quantum = { version = "0.1.0", optional = true } +rustls-post-quantum = { version = "0.2.1", optional = true } x509-parser = { version = "0.16.0" } [dev-dependencies] diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index f8c71c4..e5a1806 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -80,8 +80,8 @@ hyper-rustls = { version = "0.27.3", default-features = false, features = [ # tls and cert management for server rpxy-certs = { path = "../rpxy-certs/", default-features = false } hot_reload = "0.1.8" -rustls = { version = "0.23.19", default-features = false } -rustls-post-quantum = { version = "0.1.0", optional = true } +rustls = { version = "0.23.20", default-features = false } +rustls-post-quantum = { version = "0.2.1", optional = true } tokio-rustls = { version = "0.26.1", features = ["early-data"] } # acme diff --git a/submodules/s2n-quic b/submodules/s2n-quic index 0e475b8..b49cb51 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit 0e475b839f65daa6eafa6badb748f4087c133fdb +Subproject commit b49cb517d0256864a9382f04fedd0e9f71531d85 From d3adb44087507c1a9761dbb7710b5d73b9e8b91d Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Thu, 12 Dec 2024 15:04:03 +0900 Subject: [PATCH 013/142] chore: actions. remove -pq --- .github/workflows/release.yml | 30 ---------------------- .github/workflows/release_docker.yml | 37 ---------------------------- CHANGELOG.md | 9 ++++++- rpxy-bin/Cargo.toml | 4 +-- 4 files changed, 10 insertions(+), 70 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8b056bb..8c0dca6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,16 +34,6 @@ jobs: platform: linux/arm64 tags-suffix: "-slim" - - target: "musl" - build-feature: "-slim-pq" - platform: linux/amd64 - tags-suffix: "-slim-pq" - - - target: "musl" - build-feature: "-slim-pq" - platform: linux/arm64 - tags-suffix: "-slim-pq" - - target: "gnu" build-feature: "-s2n" platform: linux/amd64 @@ -54,26 +44,6 @@ jobs: platform: linux/arm64 tags-suffix: "-s2n" - - target: "gnu" - build-feature: "-pq" - platform: linux/amd64 - tags-suffix: "-pq" - - - target: "gnu" - build-feature: "-pq" - platform: linux/arm64 - tags-suffix: "-pq" - - - target: "gnu" - build-feature: "-s2n-pq" - platform: linux/amd64 - tags-suffix: "-s2n-pq" - - - target: "gnu" - build-feature: "-s2n-pq" - platform: linux/arm64 - tags-suffix: "-s2n-pq" - - target: "gnu" build-feature: "-webpki-roots" platform: linux/amd64 diff --git a/.github/workflows/release_docker.yml b/.github/workflows/release_docker.yml index 7a3105d..c018272 100644 --- a/.github/workflows/release_docker.yml +++ b/.github/workflows/release_docker.yml @@ -30,17 +30,6 @@ jobs: jqtype/rpxy:latest ghcr.io/junkurihara/rust-rpxy:latest - - target: "default-pq" - dockerfile: ./docker/Dockerfile - platforms: linux/amd64,linux/arm64 - build-args: | - "CARGO_FEATURES=--no-default-features --features=http3-quinn,cache,rustls-backend,acme,post-quantum" - tags-suffix: "-pq" - # Aliases must be used only for release builds - aliases: | - jqtype/rpxy:pq - ghcr.io/junkurihara/rust-rpxy:pq - - target: "default-slim" dockerfile: ./docker/Dockerfile-slim build-contexts: | @@ -53,20 +42,6 @@ jobs: jqtype/rpxy:slim ghcr.io/junkurihara/rust-rpxy:slim - - target: "default-slim-pq" - dockerfile: ./docker/Dockerfile-slim - build-args: | - "CARGO_FEATURES=--no-default-features --features=http3-quinn,cache,rustls-backend,acme,post-quantum" - build-contexts: | - messense/rust-musl-cross:amd64-musl=docker-image://messense/rust-musl-cross:x86_64-musl - messense/rust-musl-cross:arm64-musl=docker-image://messense/rust-musl-cross:aarch64-musl - platforms: linux/amd64,linux/arm64 - tags-suffix: "-slim-pq" - # Aliases must be used only for release builds - aliases: | - jqtype/rpxy:slim-pq - ghcr.io/junkurihara/rust-rpxy:slim-pq - - target: "s2n" dockerfile: ./docker/Dockerfile build-args: | @@ -79,18 +54,6 @@ jobs: jqtype/rpxy:s2n ghcr.io/junkurihara/rust-rpxy:s2n - - target: "s2n-pq" - dockerfile: ./docker/Dockerfile - build-args: | - "CARGO_FEATURES=--no-default-features --features=http3-s2n,cache,rustls-backend,acme,post-quantum" - "ADDITIONAL_DEPS=pkg-config libssl-dev cmake libclang1 gcc g++" - platforms: linux/amd64,linux/arm64 - tags-suffix: "-s2n-pq" - # Aliases must be used only for release builds - aliases: | - jqtype/rpxy:s2n-pq - ghcr.io/junkurihara/rust-rpxy:s2n-pq - - target: "webpki-roots" dockerfile: ./docker/Dockerfile platforms: linux/amd64,linux/arm64 diff --git a/CHANGELOG.md b/CHANGELOG.md index fd67751..d3d2f92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ # CHANGELOG -## 0.9.4 or 0.10.0 (Unreleased) +## 0.9.5 or 0.10.0 (Unreleased) + +## 0.9.4 + +### Improvement + +- Feat: Enable the hybrid post-quantum key exchange for TLS and QUIC with `X25519MLKEM768` by default. +- Deps and refactor ## 0.9.3 diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index 2c14df7..9b22f17 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -13,8 +13,8 @@ publish.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] -# default = ["http3-quinn", "cache", "rustls-backend", "acme", "post-quantum"] # make this default in future -default = ["http3-s2n", "cache", "rustls-backend", "acme", "post-quantum"] +default = ["http3-quinn", "cache", "rustls-backend", "acme", "post-quantum"] +# default = ["http3-s2n", "cache", "rustls-backend", "acme", "post-quantum"] http3-quinn = ["rpxy-lib/http3-quinn"] http3-s2n = ["rpxy-lib/http3-s2n"] native-tls-backend = ["rpxy-lib/native-tls-backend"] From f5b121347694d0f64f0cb3b7fdafed21dfb13a0c Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Thu, 12 Dec 2024 15:08:42 +0900 Subject: [PATCH 014/142] chore: readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5f0467d..ebe3de3 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,11 @@ [^pure_rust]: Doubtfully can be claimed to be written in pure Rust since current `rpxy` is based on `aws-lc-rs` for cryptographic operations. -By default, `rpxy` provides the *TLS connection sanitization* by correctly binding a certificate used to establish a secure channel with the backend application. Specifically, it always keeps the consistency between the given SNI (server name indication) in `ClientHello` of the underlying TLS and the domain name given by the overlaid HTTP HOST header (or URL in Request line) [^1]. Additionally, as a somewhat unstable feature, our `rpxy` can handle the brand-new HTTP/3 connection thanks to [`quinn`](https://github.com/quinn-rs/quinn), [`s2n-quic`](https://github.com/aws/s2n-quic) and [`hyperium/h3`](https://github.com/hyperium/h3).[^h3lib] Furthermore, `rpxy` supports the automatic issuance and renewal of certificates via [TLS-ALPN-01 (RFC8737)](https://www.rfc-editor.org/rfc/rfc8737) of [ACME protocol (RFC8555)](https://www.rfc-editor.org/rfc/rfc8555) thanks to [`rustls-acme`](https://github.com/FlorianUekermann/rustls-acme), and the hybridized post-quantum key exchange [`X25519Kyber768Draft00`](https://datatracker.ietf.org/doc/draft-tls-westerbaan-xyber768d00/)[^kyber] for TLS incoming and outgoing initiation thanks to [`rustls-post-quantum`](https://docs.rs/rustls-post-quantum/latest/rustls_post_quantum/). +By default, `rpxy` provides the *TLS connection sanitization* by correctly binding a certificate used to establish a secure channel with the backend application. Specifically, it always keeps the consistency between the given SNI (server name indication) in `ClientHello` of the underlying TLS and the domain name given by the overlaid HTTP HOST header (or URL in Request line) [^1]. Additionally, as a somewhat unstable feature, our `rpxy` can handle the brand-new HTTP/3 connection thanks to [`quinn`](https://github.com/quinn-rs/quinn), [`s2n-quic`](https://github.com/aws/s2n-quic) and [`hyperium/h3`](https://github.com/hyperium/h3).[^h3lib] Furthermore, `rpxy` supports the automatic issuance and renewal of certificates via [TLS-ALPN-01 (RFC8737)](https://www.rfc-editor.org/rfc/rfc8737) of [ACME protocol (RFC8555)](https://www.rfc-editor.org/rfc/rfc8555) thanks to [`rustls-acme`](https://github.com/FlorianUekermann/rustls-acme), and the hybridized post-quantum key exchange [`X25519MLKEM768`](https://www.ietf.org/archive/id/draft-kwiatkowski-tls-ecdhe-mlkem-02.html)[^kyber] for TLS/QUIC incoming and outgoing initiation thanks to [`rustls-post-quantum`](https://docs.rs/rustls-post-quantum/latest/rustls_post_quantum/). [^h3lib]: HTTP/3 libraries are mutually exclusive. You need to explicitly specify `s2n-quic` with `--no-default-features` flag. Also note that if you build `rpxy` with `s2n-quic`, then it requires `openssl` just for building the package. - [^kyber]: This is not yet a default feature. You need to specify `--features post-quantum` when building `rpxy`. Also note that `X25519Kyber768Draft00` is a draft version yet this is widely used on the Internet. We will update the feature when the newest version (`X25519MLKEM768` in [`ECDHE-MLKEM`](https://www.ietf.org/archive/id/draft-kwiatkowski-tls-ecdhe-mlkem-02.html)) is available. + [^kyber]: This is already a default feature. Also note that `X25519MLKEM768` is still a draft version yet this is widely used on the Internet. This project is still *work-in-progress*. But it is already working in some production environments and serves a number of domain names. Furthermore it *significantly outperforms* NGINX and Caddy, e.g., *1.5x faster than NGINX*, in the setting of a very simple HTTP reverse-proxy scenario (See [`bench`](./bench/) directory). From 81b578e31349fa95206bc88ebad719d62182fb3b Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Thu, 12 Dec 2024 16:15:47 +0900 Subject: [PATCH 015/142] fix: fix docker build options --- .github/workflows/release_docker.yml | 8 ++++---- CHANGELOG.md | 8 +++++++- Cargo.toml | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release_docker.yml b/.github/workflows/release_docker.yml index c018272..6accef5 100644 --- a/.github/workflows/release_docker.yml +++ b/.github/workflows/release_docker.yml @@ -45,7 +45,7 @@ jobs: - target: "s2n" dockerfile: ./docker/Dockerfile build-args: | - "CARGO_FEATURES=--no-default-features --features=http3-s2n,cache,rustls-backend,acme" + "CARGO_FEATURES=--no-default-features --features=http3-s2n,cache,rustls-backend,acme,post-quantum" "ADDITIONAL_DEPS=pkg-config libssl-dev cmake libclang1 gcc g++" platforms: linux/amd64,linux/arm64 tags-suffix: "-s2n" @@ -58,7 +58,7 @@ jobs: dockerfile: ./docker/Dockerfile platforms: linux/amd64,linux/arm64 build-args: | - "CARGO_FEATURES=--no-default-features --features=http3-quinn,cache,webpki-roots,acme" + "CARGO_FEATURES=--no-default-features --features=http3-quinn,cache,webpki-roots,acme,post-quantum" tags-suffix: "-webpki-roots" # Aliases must be used only for release builds aliases: | @@ -68,7 +68,7 @@ jobs: - target: "slim-webpki-roots" dockerfile: ./docker/Dockerfile-slim build-args: | - "CARGO_FEATURES=--no-default-features --features=http3-quinn,cache,webpki-roots,acme" + "CARGO_FEATURES=--no-default-features --features=http3-quinn,cache,webpki-roots,acme,post-quantum" build-contexts: | messense/rust-musl-cross:amd64-musl=docker-image://messense/rust-musl-cross:x86_64-musl messense/rust-musl-cross:arm64-musl=docker-image://messense/rust-musl-cross:aarch64-musl @@ -82,7 +82,7 @@ jobs: - target: "s2n-webpki-roots" dockerfile: ./docker/Dockerfile build-args: | - "CARGO_FEATURES=--no-default-features --features=http3-s2n,cache,webpki-roots,acme" + "CARGO_FEATURES=--no-default-features --features=http3-s2n,cache,webpki-roots,acme,post-quantum" "ADDITIONAL_DEPS=pkg-config libssl-dev cmake libclang1 gcc g++" platforms: linux/amd64,linux/arm64 tags-suffix: "-s2n-webpki-roots" diff --git a/CHANGELOG.md b/CHANGELOG.md index d3d2f92..bbdc388 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # CHANGELOG -## 0.9.5 or 0.10.0 (Unreleased) +## 0.9.6 or 0.10.0 (Unreleased) + +## 0.9.5 + +### Bugfix + +- Fix docker image build options with `post-quantum` feature. ## 0.9.4 diff --git a/Cargo.toml b/Cargo.toml index 492fc22..5ccf368 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "0.9.4" +version = "0.9.5" authors = ["Jun Kurihara"] homepage = "https://github.com/junkurihara/rust-rpxy" repository = "https://github.com/junkurihara/rust-rpxy" From 71c90470a79d80eb24b9274152bb7cb2e2a188f9 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Thu, 26 Dec 2024 14:54:02 +0900 Subject: [PATCH 016/142] chore: deps --- rpxy-acme/Cargo.toml | 6 +++--- rpxy-bin/Cargo.toml | 2 +- rpxy-certs/Cargo.toml | 2 +- rpxy-lib/Cargo.toml | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index c0d473a..dcf2c49 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -16,11 +16,11 @@ post-quantum = ["rustls-post-quantum"] [dependencies] url = { version = "2.5.4" } rustc-hash = "2.1.0" -thiserror = "2.0.6" +thiserror = "2.0.9" tracing = "0.1.41" async-trait = "0.1.83" base64 = "0.22.1" -aws-lc-rs = { version = "1.11.1", default-features = false, features = [ +aws-lc-rs = { version = "1.12.0", default-features = false, features = [ "aws-lc-sys", ] } blocking = "1.6.1" @@ -28,7 +28,7 @@ rustls = { version = "0.23.20", default-features = false, features = [ "std", "aws_lc_rs", ] } -rustls-platform-verifier = { version = "0.4.0" } +rustls-platform-verifier = { version = "0.5.0" } rustls-acme = { path = "../submodules/rustls-acme/", default-features = false, features = [ "aws-lc-rs", ] } diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index 9b22f17..38ddfe6 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -30,7 +30,7 @@ rpxy-lib = { path = "../rpxy-lib/", default-features = false, features = [ ] } mimalloc = { version = "*", default-features = false } -anyhow = "1.0.94" +anyhow = "1.0.95" rustc-hash = "2.1.0" serde = { version = "1.0.216", default-features = false, features = ["derive"] } tokio = { version = "1.42.0", default-features = false, features = [ diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index 1ca8e41..5d33050 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -19,7 +19,7 @@ http3 = [] rustc-hash = { version = "2.1.0" } tracing = { version = "0.1.41" } derive_builder = { version = "0.20.2" } -thiserror = { version = "2.0.6" } +thiserror = { version = "2.0.9" } hot_reload = { version = "0.1.8" } async-trait = { version = "0.1.83" } rustls = { version = "0.23.20", default-features = false, features = [ diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index e5a1806..410baac 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -54,13 +54,13 @@ pin-project-lite = "0.2.15" async-trait = "0.1.83" # Error handling -anyhow = "1.0.94" -thiserror = "2.0.6" +anyhow = "1.0.95" +thiserror = "2.0.9" # http for both server and client http = "1.2.0" http-body-util = "0.1.2" -hyper = { version = "1.5.1", default-features = false } +hyper = { version = "1.5.2", default-features = false } hyper-util = { version = "0.1.10", features = ["full"] } futures-util = { version = "0.3.31", default-features = false } futures-channel = { version = "0.3.31", default-features = false } @@ -70,7 +70,7 @@ hyper-tls = { version = "0.6.0", features = [ "alpn", "vendored", ], optional = true } -hyper-rustls = { version = "0.27.3", default-features = false, features = [ +hyper-rustls = { version = "0.27.5", default-features = false, features = [ "aws-lc-rs", "http1", "http2", From 504f5e54a96d8a4b43eb549d0d1c48db848408a0 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Mon, 6 Jan 2025 16:12:41 +0900 Subject: [PATCH 017/142] chore: deps --- rpxy-acme/Cargo.toml | 2 +- rpxy-bin/Cargo.toml | 4 ++-- rpxy-certs/Cargo.toml | 2 +- rpxy-lib/Cargo.toml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index dcf2c49..40fba29 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -18,7 +18,7 @@ url = { version = "2.5.4" } rustc-hash = "2.1.0" thiserror = "2.0.9" tracing = "0.1.41" -async-trait = "0.1.83" +async-trait = "0.1.84" base64 = "0.22.1" aws-lc-rs = { version = "1.12.0", default-features = false, features = [ "aws-lc-sys", diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index 38ddfe6..18e3814 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -32,7 +32,7 @@ rpxy-lib = { path = "../rpxy-lib/", default-features = false, features = [ mimalloc = { version = "*", default-features = false } anyhow = "1.0.95" rustc-hash = "2.1.0" -serde = { version = "1.0.216", default-features = false, features = ["derive"] } +serde = { version = "1.0.217", default-features = false, features = ["derive"] } tokio = { version = "1.42.0", default-features = false, features = [ "net", "rt-multi-thread", @@ -41,7 +41,7 @@ tokio = { version = "1.42.0", default-features = false, features = [ "macros", ] } tokio-util = { version = "0.7.13", default-features = false } -async-trait = "0.1.83" +async-trait = "0.1.84" futures-util = { version = "0.3.31", default-features = false } # config diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index 5d33050..eb6d20c 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -21,7 +21,7 @@ tracing = { version = "0.1.41" } derive_builder = { version = "0.20.2" } thiserror = { version = "2.0.9" } hot_reload = { version = "0.1.8" } -async-trait = { version = "0.1.83" } +async-trait = { version = "0.1.84" } rustls = { version = "0.23.20", default-features = false, features = [ "std", "aws_lc_rs", diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 410baac..1f48744 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -51,7 +51,7 @@ tokio = { version = "1.42.0", default-features = false, features = [ ] } tokio-util = { version = "0.7.13", default-features = false } pin-project-lite = "0.2.15" -async-trait = "0.1.83" +async-trait = "0.1.84" # Error handling anyhow = "1.0.95" From c0fcee71cfec7764beaa7f4db7c243876844c7ea Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Mon, 6 Jan 2025 17:42:43 +0900 Subject: [PATCH 018/142] feat: change fxhash to ahash for hashmaps and hashsets --- rpxy-acme/Cargo.toml | 2 +- rpxy-acme/src/manager.rs | 2 +- rpxy-bin/Cargo.toml | 2 +- rpxy-bin/src/config/parse.rs | 2 +- rpxy-bin/src/config/toml.rs | 4 ++-- rpxy-certs/Cargo.toml | 2 +- rpxy-certs/src/certs.rs | 2 +- rpxy-certs/src/lib.rs | 2 +- rpxy-certs/src/reloader_service.rs | 2 +- rpxy-certs/src/server_crypto.rs | 2 +- rpxy-lib/Cargo.toml | 2 +- rpxy-lib/src/backend/backend_main.rs | 2 +- rpxy-lib/src/backend/load_balance/load_balance_sticky.rs | 2 +- rpxy-lib/src/backend/upstream.rs | 2 +- rpxy-lib/src/globals.rs | 2 +- rpxy-lib/src/lib.rs | 2 +- rpxy-lib/src/proxy/mod.rs | 3 +-- rpxy-lib/src/proxy/proxy_main.rs | 2 +- 18 files changed, 19 insertions(+), 20 deletions(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index 40fba29..bd8114e 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -15,7 +15,7 @@ post-quantum = ["rustls-post-quantum"] [dependencies] url = { version = "2.5.4" } -rustc-hash = "2.1.0" +ahash = "0.8.11" thiserror = "2.0.9" tracing = "0.1.41" async-trait = "0.1.84" diff --git a/rpxy-acme/src/manager.rs b/rpxy-acme/src/manager.rs index 1fe6f9e..1a4c091 100644 --- a/rpxy-acme/src/manager.rs +++ b/rpxy-acme/src/manager.rs @@ -4,7 +4,7 @@ use crate::{ error::RpxyAcmeError, log::*, }; -use rustc_hash::FxHashMap as HashMap; +use ahash::HashMap; use rustls::ServerConfig; use rustls_acme::AcmeConfig; use std::{path::PathBuf, sync::Arc}; diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index 18e3814..16bc0d3 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -31,7 +31,7 @@ rpxy-lib = { path = "../rpxy-lib/", default-features = false, features = [ mimalloc = { version = "*", default-features = false } anyhow = "1.0.95" -rustc-hash = "2.1.0" +ahash = "0.8.11" serde = { version = "1.0.217", default-features = false, features = ["derive"] } tokio = { version = "1.42.0", default-features = false, features = [ "net", diff --git a/rpxy-bin/src/config/parse.rs b/rpxy-bin/src/config/parse.rs index 7292b58..fdc4b67 100644 --- a/rpxy-bin/src/config/parse.rs +++ b/rpxy-bin/src/config/parse.rs @@ -1,10 +1,10 @@ use super::toml::ConfigToml; use crate::error::{anyhow, ensure}; +use ahash::HashMap; use clap::{Arg, ArgAction}; use hot_reload::{ReloaderReceiver, ReloaderService}; use rpxy_certs::{build_cert_reloader, CryptoFileSourceBuilder, CryptoReloader, ServerCryptoBase}; use rpxy_lib::{AppConfig, AppConfigList, ProxyConfig}; -use rustc_hash::FxHashMap as HashMap; #[cfg(feature = "acme")] use rpxy_acme::{AcmeManager, ACME_DIR_URL, ACME_REGISTRY_PATH}; diff --git a/rpxy-bin/src/config/toml.rs b/rpxy-bin/src/config/toml.rs index 639f927..36eecdf 100644 --- a/rpxy-bin/src/config/toml.rs +++ b/rpxy-bin/src/config/toml.rs @@ -3,8 +3,8 @@ use crate::{ error::{anyhow, ensure}, log::warn, }; +use ahash::HashMap; use rpxy_lib::{reexports::Uri, AppConfig, ProxyConfig, ReverseProxyConfig, TlsConfig, UpstreamUri}; -use rustc_hash::FxHashMap as HashMap; use serde::Deserialize; use std::{fs, net::SocketAddr}; use tokio::time::Duration; @@ -232,7 +232,7 @@ impl ConfigToml { // Check unused fields during deserialization let t = toml::de::Deserializer::new(&config_str); - let mut unused = rustc_hash::FxHashSet::default(); + let mut unused = ahash::HashSet::default(); let res = serde_ignored::deserialize(t, |path| { unused.insert(path.to_string()); diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index eb6d20c..f060b1a 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -16,7 +16,7 @@ post-quantum = ["rustls-post-quantum"] http3 = [] [dependencies] -rustc-hash = { version = "2.1.0" } +ahash = { version = "0.8.11" } tracing = { version = "0.1.41" } derive_builder = { version = "0.20.2" } thiserror = { version = "2.0.9" } diff --git a/rpxy-certs/src/certs.rs b/rpxy-certs/src/certs.rs index 8c8a2fb..1e8802a 100644 --- a/rpxy-certs/src/certs.rs +++ b/rpxy-certs/src/certs.rs @@ -1,5 +1,5 @@ use crate::error::*; -use rustc_hash::FxHashMap as HashMap; +use ahash::HashMap; use rustls::{crypto::aws_lc_rs::sign::any_supported_type, pki_types, sign::CertifiedKey}; use std::sync::Arc; use x509_parser::prelude::*; diff --git a/rpxy-certs/src/lib.rs b/rpxy-certs/src/lib.rs index 43994a1..2cc29bd 100644 --- a/rpxy-certs/src/lib.rs +++ b/rpxy-certs/src/lib.rs @@ -10,8 +10,8 @@ mod log { } use crate::{error::*, log::*, reloader_service::DynCryptoSource}; +use ahash::HashMap; use hot_reload::{ReloaderReceiver, ReloaderService}; -use rustc_hash::FxHashMap as HashMap; use rustls::crypto::CryptoProvider; use std::sync::Arc; diff --git a/rpxy-certs/src/reloader_service.rs b/rpxy-certs/src/reloader_service.rs index 4d10fa1..8f2bdab 100644 --- a/rpxy-certs/src/reloader_service.rs +++ b/rpxy-certs/src/reloader_service.rs @@ -4,9 +4,9 @@ use crate::{ log::*, server_crypto::{ServerCryptoBase, ServerNameBytes}, }; +use ahash::HashMap; use async_trait::async_trait; use hot_reload::{Reload, ReloaderError}; -use rustc_hash::FxHashMap as HashMap; use std::sync::Arc; /* ------------------------------------------------ */ diff --git a/rpxy-certs/src/server_crypto.rs b/rpxy-certs/src/server_crypto.rs index 71426c8..9a15c5a 100644 --- a/rpxy-certs/src/server_crypto.rs +++ b/rpxy-certs/src/server_crypto.rs @@ -1,5 +1,5 @@ use crate::{certs::SingleServerCertsKeys, error::*, log::*}; -use rustc_hash::FxHashMap as HashMap; +use ahash::HashMap; use rustls::{ crypto::CryptoProvider, server::{ResolvesServerCertUsingSni, WebPkiClientVerifier}, diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 1f48744..511e177 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -37,7 +37,7 @@ post-quantum = [ [dependencies] rand = "0.8.5" -rustc-hash = "2.1.0" +ahash = "0.8.11" bytes = "1.9.0" derive_builder = "0.20.2" futures = { version = "0.3.31", features = ["alloc", "async-await"] } diff --git a/rpxy-lib/src/backend/backend_main.rs b/rpxy-lib/src/backend/backend_main.rs index 0282504..1ac49cb 100644 --- a/rpxy-lib/src/backend/backend_main.rs +++ b/rpxy-lib/src/backend/backend_main.rs @@ -4,8 +4,8 @@ use crate::{ name_exp::{ByteName, ServerName}, AppConfig, AppConfigList, }; +use ahash::HashMap; use derive_builder::Builder; -use rustc_hash::FxHashMap as HashMap; use std::borrow::Cow; use super::upstream::PathManager; diff --git a/rpxy-lib/src/backend/load_balance/load_balance_sticky.rs b/rpxy-lib/src/backend/load_balance/load_balance_sticky.rs index d7a9795..46ac74e 100644 --- a/rpxy-lib/src/backend/load_balance/load_balance_sticky.rs +++ b/rpxy-lib/src/backend/load_balance/load_balance_sticky.rs @@ -4,8 +4,8 @@ use super::{ Upstream, }; use crate::{constants::STICKY_COOKIE_NAME, log::*}; +use ahash::HashMap; use derive_builder::Builder; -use rustc_hash::FxHashMap as HashMap; use std::{ borrow::Cow, sync::{ diff --git a/rpxy-lib/src/backend/upstream.rs b/rpxy-lib/src/backend/upstream.rs index 7d9d569..353db99 100644 --- a/rpxy-lib/src/backend/upstream.rs +++ b/rpxy-lib/src/backend/upstream.rs @@ -11,10 +11,10 @@ use crate::{ log::*, name_exp::{ByteName, PathName}, }; +use ahash::{HashMap, HashSet}; #[cfg(feature = "sticky-cookie")] use base64::{engine::general_purpose, Engine as _}; use derive_builder::Builder; -use rustc_hash::{FxHashMap as HashMap, FxHashSet as HashSet}; #[cfg(feature = "sticky-cookie")] use sha2::{Digest, Sha256}; use std::borrow::Cow; diff --git a/rpxy-lib/src/globals.rs b/rpxy-lib/src/globals.rs index 82d66c0..a52f066 100644 --- a/rpxy-lib/src/globals.rs +++ b/rpxy-lib/src/globals.rs @@ -20,7 +20,7 @@ pub struct Globals { #[cfg(feature = "acme")] /// ServerConfig used for only ACME challenge for ACME domains - pub server_configs_acme_challenge: std::sync::Arc>>, + pub server_configs_acme_challenge: std::sync::Arc>>, } /// Configuration parameters for proxy transport and request handlers diff --git a/rpxy-lib/src/lib.rs b/rpxy-lib/src/lib.rs index fa74d42..4cc23ab 100644 --- a/rpxy-lib/src/lib.rs +++ b/rpxy-lib/src/lib.rs @@ -48,7 +48,7 @@ pub struct RpxyOptions { #[cfg(feature = "acme")] /// ServerConfig used for only ACME challenge for ACME domains - pub server_configs_acme_challenge: Arc>>, + pub server_configs_acme_challenge: Arc>>, } /// Entrypoint that creates and spawns tasks of reverse proxy services diff --git a/rpxy-lib/src/proxy/mod.rs b/rpxy-lib/src/proxy/mod.rs index 59bfc3f..be126a8 100644 --- a/rpxy-lib/src/proxy/mod.rs +++ b/rpxy-lib/src/proxy/mod.rs @@ -14,12 +14,11 @@ use crate::{ name_exp::ServerName, }; use hyper_util::server::{self, conn::auto::Builder as ConnectionBuilder}; -use rustc_hash::FxHashMap as HashMap; use rustls::ServerConfig; use std::sync::Arc; /// SNI to ServerConfig map type -pub type SniServerCryptoMap = HashMap>; +pub type SniServerCryptoMap = std::collections::HashMap, ahash::RandomState>; pub(crate) use proxy_main::Proxy; diff --git a/rpxy-lib/src/proxy/proxy_main.rs b/rpxy-lib/src/proxy/proxy_main.rs index 3bb0aec..40e14e5 100644 --- a/rpxy-lib/src/proxy/proxy_main.rs +++ b/rpxy-lib/src/proxy/proxy_main.rs @@ -294,7 +294,7 @@ where let map = server_config.individual_config_map.clone().iter().map(|(k,v)| { let server_name = ServerName::from(k.as_slice()); (server_name, v.clone()) - }).collect::>(); + }).collect::>(); server_crypto_map = Some(Arc::new(map)); } } From 98dc51c266d24a118614f05453775fdcf276f81c Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Mon, 6 Jan 2025 17:53:36 +0900 Subject: [PATCH 019/142] docs: changelog --- CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bbdc388..4e6b294 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ # CHANGELOG -## 0.9.6 or 0.10.0 (Unreleased) +## 0.9.7 or 0.10.0 (Unreleased) + +## 0.9.6 + +### Improvement + +- Feat: Change the default hashing algorithm for internal hashmaps and hashsets from FxHash to aHash. This change is to improve the security against HashDos attacks for colliding domain names and paths, and to improve the speed of hash operations for string keys (c.f., [the performance comparison](https://github.com/tkaitchuck/aHash/blob/master/compare/readme.md)). +- Deps and refactor ## 0.9.5 From 259e09e28b09a168b80099c9b351e06d38c8f233 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Mon, 6 Jan 2025 17:53:59 +0900 Subject: [PATCH 020/142] bump --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 5ccf368..ee0db6c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "0.9.5" +version = "0.9.6" authors = ["Jun Kurihara"] homepage = "https://github.com/junkurihara/rust-rpxy" repository = "https://github.com/junkurihara/rust-rpxy" From 3ba0247df99dd86390180e9865ce2a63ba2e8f4e Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Tue, 7 Jan 2025 13:01:06 +0900 Subject: [PATCH 021/142] fix: add dependabot settings for acme and certs dirs --- .github/dependabot.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 3e44060..e39c88b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -19,6 +19,16 @@ updates: schedule: interval: "daily" + - package-ecosystem: "cargo" + directory: "/rpxy-certs" + schedule: + interval: "daily" + + - package-ecosystem: "cargo" + directory: "/rpxy-acme" + schedule: + interval: "daily" + # Enable version updates for Docker - package-ecosystem: "docker" directory: "/docker" From f9b4a26dab87562a6cbb334738a3831371f4a645 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 8 Jan 2025 10:19:05 +0900 Subject: [PATCH 022/142] chore: deps --- rpxy-acme/Cargo.toml | 2 +- rpxy-bin/Cargo.toml | 4 ++-- rpxy-certs/Cargo.toml | 2 +- rpxy-lib/Cargo.toml | 10 +++++----- submodules/s2n-quic | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index bd8114e..e6fb6f8 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -18,7 +18,7 @@ url = { version = "2.5.4" } ahash = "0.8.11" thiserror = "2.0.9" tracing = "0.1.41" -async-trait = "0.1.84" +async-trait = "0.1.85" base64 = "0.22.1" aws-lc-rs = { version = "1.12.0", default-features = false, features = [ "aws-lc-sys", diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index 16bc0d3..8a3cc33 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -41,11 +41,11 @@ tokio = { version = "1.42.0", default-features = false, features = [ "macros", ] } tokio-util = { version = "0.7.13", default-features = false } -async-trait = "0.1.84" +async-trait = "0.1.85" futures-util = { version = "0.3.31", default-features = false } # config -clap = { version = "4.5.23", features = ["std", "cargo", "wrap_help"] } +clap = { version = "4.5.24", features = ["std", "cargo", "wrap_help"] } toml = { version = "0.8.19", default-features = false, features = ["parse"] } hot_reload = "0.1.8" serde_ignored = "0.1.10" diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index f060b1a..f48af26 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -21,7 +21,7 @@ tracing = { version = "0.1.41" } derive_builder = { version = "0.20.2" } thiserror = { version = "2.0.9" } hot_reload = { version = "0.1.8" } -async-trait = { version = "0.1.84" } +async-trait = { version = "0.1.85" } rustls = { version = "0.23.20", default-features = false, features = [ "std", "aws_lc_rs", diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 511e177..5e93f9f 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -50,8 +50,8 @@ tokio = { version = "1.42.0", default-features = false, features = [ "fs", ] } tokio-util = { version = "0.7.13", default-features = false } -pin-project-lite = "0.2.15" -async-trait = "0.1.84" +pin-project-lite = "0.2.16" +async-trait = "0.1.85" # Error handling anyhow = "1.0.95" @@ -94,11 +94,11 @@ tracing = { version = "0.1.41" } quinn = { version = "0.11.6", optional = true } h3 = { version = "0.0.6", features = ["tracing"], optional = true } h3-quinn = { version = "0.0.7", optional = true } -s2n-quic = { version = "1.51.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [ +s2n-quic = { version = "1.52.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [ "provider-tls-rustls", ], optional = true } -s2n-quic-core = { version = "0.51.0", path = "../submodules/s2n-quic/quic/s2n-quic-core", default-features = false, optional = true } -s2n-quic-rustls = { version = "0.51.0", path = "../submodules/s2n-quic/quic/s2n-quic-rustls", optional = true } +s2n-quic-core = { version = "0.52.0", path = "../submodules/s2n-quic/quic/s2n-quic-core", default-features = false, optional = true } +s2n-quic-rustls = { version = "0.52.0", path = "../submodules/s2n-quic/quic/s2n-quic-rustls", optional = true } s2n-quic-h3 = { path = "../submodules/s2n-quic/quic/s2n-quic-h3/", features = [ "tracing", ], optional = true } diff --git a/submodules/s2n-quic b/submodules/s2n-quic index b49cb51..6115fa4 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit b49cb517d0256864a9382f04fedd0e9f71531d85 +Subproject commit 6115fa43e96ce3745f3457f940d64606642224ee From 3cc44731a4ca5e9dd7a73a3ba04968cf516134f8 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 8 Jan 2025 14:39:12 +0900 Subject: [PATCH 023/142] chore: year++ --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 096f5e1..ddb8c03 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 Jun Kurihara +Copyright (c) 2025 Jun Kurihara Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From b96bba68db31dd91ad3e06b054e33d8f99f754fe Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Fri, 10 Jan 2025 19:26:27 +0900 Subject: [PATCH 024/142] chore: upgrade --- rpxy-acme/Cargo.toml | 6 +++--- rpxy-bin/Cargo.toml | 6 +++--- rpxy-certs/Cargo.toml | 6 +++--- rpxy-lib/Cargo.toml | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index bd8114e..0a12ceb 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -16,9 +16,9 @@ post-quantum = ["rustls-post-quantum"] [dependencies] url = { version = "2.5.4" } ahash = "0.8.11" -thiserror = "2.0.9" +thiserror = "2.0.10" tracing = "0.1.41" -async-trait = "0.1.84" +async-trait = "0.1.85" base64 = "0.22.1" aws-lc-rs = { version = "1.12.0", default-features = false, features = [ "aws-lc-sys", @@ -33,6 +33,6 @@ rustls-acme = { path = "../submodules/rustls-acme/", default-features = false, f "aws-lc-rs", ] } rustls-post-quantum = { version = "0.2.1", optional = true } -tokio = { version = "1.42.0", default-features = false } +tokio = { version = "1.43.0", default-features = false } tokio-util = { version = "0.7.13", default-features = false } tokio-stream = { version = "0.1.17", default-features = false } diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index 16bc0d3..21f7fe4 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -33,7 +33,7 @@ mimalloc = { version = "*", default-features = false } anyhow = "1.0.95" ahash = "0.8.11" serde = { version = "1.0.217", default-features = false, features = ["derive"] } -tokio = { version = "1.42.0", default-features = false, features = [ +tokio = { version = "1.43.0", default-features = false, features = [ "net", "rt-multi-thread", "time", @@ -41,11 +41,11 @@ tokio = { version = "1.42.0", default-features = false, features = [ "macros", ] } tokio-util = { version = "0.7.13", default-features = false } -async-trait = "0.1.84" +async-trait = "0.1.85" futures-util = { version = "0.3.31", default-features = false } # config -clap = { version = "4.5.23", features = ["std", "cargo", "wrap_help"] } +clap = { version = "4.5.26", features = ["std", "cargo", "wrap_help"] } toml = { version = "0.8.19", default-features = false, features = ["parse"] } hot_reload = "0.1.8" serde_ignored = "0.1.10" diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index f060b1a..0bd9f94 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -19,9 +19,9 @@ http3 = [] ahash = { version = "0.8.11" } tracing = { version = "0.1.41" } derive_builder = { version = "0.20.2" } -thiserror = { version = "2.0.9" } +thiserror = { version = "2.0.10" } hot_reload = { version = "0.1.8" } -async-trait = { version = "0.1.84" } +async-trait = { version = "0.1.85" } rustls = { version = "0.23.20", default-features = false, features = [ "std", "aws_lc_rs", @@ -35,7 +35,7 @@ rustls-post-quantum = { version = "0.2.1", optional = true } x509-parser = { version = "0.16.0" } [dev-dependencies] -tokio = { version = "1.42.0", default-features = false, features = [ +tokio = { version = "1.43.0", default-features = false, features = [ "rt-multi-thread", "macros", ] } diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 511e177..534f847 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -41,7 +41,7 @@ ahash = "0.8.11" bytes = "1.9.0" derive_builder = "0.20.2" futures = { version = "0.3.31", features = ["alloc", "async-await"] } -tokio = { version = "1.42.0", default-features = false, features = [ +tokio = { version = "1.43.0", default-features = false, features = [ "net", "rt-multi-thread", "time", @@ -50,12 +50,12 @@ tokio = { version = "1.42.0", default-features = false, features = [ "fs", ] } tokio-util = { version = "0.7.13", default-features = false } -pin-project-lite = "0.2.15" -async-trait = "0.1.84" +pin-project-lite = "0.2.16" +async-trait = "0.1.85" # Error handling anyhow = "1.0.95" -thiserror = "2.0.9" +thiserror = "2.0.10" # http for both server and client http = "1.2.0" From 8ffd80ce945a9b3e24fdbe782d84a64d272f4bac Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Sat, 11 Jan 2025 12:19:49 +0900 Subject: [PATCH 025/142] chore:deps --- rpxy-acme/Cargo.toml | 4 ++-- rpxy-certs/Cargo.toml | 4 ++-- rpxy-lib/Cargo.toml | 4 ++-- submodules/rustls-acme | 2 +- submodules/rusty-http-cache-semantics | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index 0a12ceb..e4eb2cb 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -16,7 +16,7 @@ post-quantum = ["rustls-post-quantum"] [dependencies] url = { version = "2.5.4" } ahash = "0.8.11" -thiserror = "2.0.10" +thiserror = "2.0.11" tracing = "0.1.41" async-trait = "0.1.85" base64 = "0.22.1" @@ -24,7 +24,7 @@ aws-lc-rs = { version = "1.12.0", default-features = false, features = [ "aws-lc-sys", ] } blocking = "1.6.1" -rustls = { version = "0.23.20", default-features = false, features = [ +rustls = { version = "0.23.21", default-features = false, features = [ "std", "aws_lc_rs", ] } diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index 0bd9f94..370596e 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -19,10 +19,10 @@ http3 = [] ahash = { version = "0.8.11" } tracing = { version = "0.1.41" } derive_builder = { version = "0.20.2" } -thiserror = { version = "2.0.10" } +thiserror = { version = "2.0.11" } hot_reload = { version = "0.1.8" } async-trait = { version = "0.1.85" } -rustls = { version = "0.23.20", default-features = false, features = [ +rustls = { version = "0.23.21", default-features = false, features = [ "std", "aws_lc_rs", ] } diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index e9b76b2..19ed17a 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -55,7 +55,7 @@ async-trait = "0.1.85" # Error handling anyhow = "1.0.95" -thiserror = "2.0.10" +thiserror = "2.0.11" # http for both server and client http = "1.2.0" @@ -80,7 +80,7 @@ hyper-rustls = { version = "0.27.5", default-features = false, features = [ # tls and cert management for server rpxy-certs = { path = "../rpxy-certs/", default-features = false } hot_reload = "0.1.8" -rustls = { version = "0.23.20", default-features = false } +rustls = { version = "0.23.21", default-features = false } rustls-post-quantum = { version = "0.2.1", optional = true } tokio-rustls = { version = "0.26.1", features = ["early-data"] } diff --git a/submodules/rustls-acme b/submodules/rustls-acme index af2d016..3261f45 160000 --- a/submodules/rustls-acme +++ b/submodules/rustls-acme @@ -1 +1 @@ -Subproject commit af2d016b6aa4e09586253a0459efc4af6635c79b +Subproject commit 3261f4527baa1c83305b753a8f72c6fbc58a18d7 diff --git a/submodules/rusty-http-cache-semantics b/submodules/rusty-http-cache-semantics index d5b5efd..2500716 160000 --- a/submodules/rusty-http-cache-semantics +++ b/submodules/rusty-http-cache-semantics @@ -1 +1 @@ -Subproject commit d5b5efd9de4dab3c958c50be5380652d801cc65f +Subproject commit 2500716b70bd6e548cdf690188ded7afe6726330 From 3e7240e4cae021a2c4703594873a98c090b8b2ad Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Sat, 11 Jan 2025 13:21:54 +0900 Subject: [PATCH 026/142] chore: refactor --- rpxy-lib/src/message_handler/handler_main.rs | 2 +- rpxy-lib/src/message_handler/utils_headers.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpxy-lib/src/message_handler/handler_main.rs b/rpxy-lib/src/message_handler/handler_main.rs index 4b324df..23133a2 100644 --- a/rpxy-lib/src/message_handler/handler_main.rs +++ b/rpxy-lib/src/message_handler/handler_main.rs @@ -200,7 +200,7 @@ where // Handle StatusCode::SWITCHING_PROTOCOLS in response let upgrade_in_response = extract_upgrade(res_backend.headers()); let should_upgrade = match (upgrade_in_request.as_ref(), upgrade_in_response.as_ref()) { - (Some(u_req), Some(u_res)) => u_req.to_ascii_lowercase() == u_res.to_ascii_lowercase(), + (Some(u_req), Some(u_res)) => u_req.eq_ignore_ascii_case(u_res), _ => false, }; diff --git a/rpxy-lib/src/message_handler/utils_headers.rs b/rpxy-lib/src/message_handler/utils_headers.rs index d058f88..1fa3c99 100644 --- a/rpxy-lib/src/message_handler/utils_headers.rs +++ b/rpxy-lib/src/message_handler/utils_headers.rs @@ -272,7 +272,7 @@ pub(super) fn extract_upgrade(headers: &HeaderMap) -> Option { .to_str() .unwrap_or("") .split(',') - .any(|w| w.trim().to_ascii_lowercase() == header::UPGRADE.as_str().to_ascii_lowercase()) + .any(|w| w.trim().eq_ignore_ascii_case(header::UPGRADE.as_str())) { if let Some(u) = headers.get(header::UPGRADE) { if let Ok(m) = u.to_str() { From a4a4c9f25fd77fe4e97afa78509d23b9fab86427 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Fri, 17 Jan 2025 11:34:05 +0900 Subject: [PATCH 027/142] chore: submodule --- rpxy-acme/Cargo.toml | 2 +- submodules/rustls-acme | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index e4eb2cb..d81e322 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -20,7 +20,7 @@ thiserror = "2.0.11" tracing = "0.1.41" async-trait = "0.1.85" base64 = "0.22.1" -aws-lc-rs = { version = "1.12.0", default-features = false, features = [ +aws-lc-rs = { version = "1.12.1", default-features = false, features = [ "aws-lc-sys", ] } blocking = "1.6.1" diff --git a/submodules/rustls-acme b/submodules/rustls-acme index 3261f45..a65d7e7 160000 --- a/submodules/rustls-acme +++ b/submodules/rustls-acme @@ -1 +1 @@ -Subproject commit 3261f4527baa1c83305b753a8f72c6fbc58a18d7 +Subproject commit a65d7e7000b49e6e1e14daf32baee094f4d8dacd From 046e79e9142f2c8348e38cf1784d9702e1db39bc Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 22 Jan 2025 02:09:48 +0900 Subject: [PATCH 028/142] chore:deps --- rpxy-bin/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index 21f7fe4..393688e 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -45,7 +45,7 @@ async-trait = "0.1.85" futures-util = { version = "0.3.31", default-features = false } # config -clap = { version = "4.5.26", features = ["std", "cargo", "wrap_help"] } +clap = { version = "4.5.27", features = ["std", "cargo", "wrap_help"] } toml = { version = "0.8.19", default-features = false, features = ["parse"] } hot_reload = "0.1.8" serde_ignored = "0.1.10" From 8cc2a5f77c0cbb663fe47ec257a8183065faf230 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Thu, 23 Jan 2025 15:42:23 +0900 Subject: [PATCH 029/142] chore: deps s2n-quic --- rpxy-acme/Cargo.toml | 2 +- rpxy-lib/Cargo.toml | 6 +++--- submodules/s2n-quic | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index d81e322..3489571 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -20,7 +20,7 @@ thiserror = "2.0.11" tracing = "0.1.41" async-trait = "0.1.85" base64 = "0.22.1" -aws-lc-rs = { version = "1.12.1", default-features = false, features = [ +aws-lc-rs = { version = "1.12.2", default-features = false, features = [ "aws-lc-sys", ] } blocking = "1.6.1" diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 19ed17a..fd6c3f4 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -94,11 +94,11 @@ tracing = { version = "0.1.41" } quinn = { version = "0.11.6", optional = true } h3 = { version = "0.0.6", features = ["tracing"], optional = true } h3-quinn = { version = "0.0.7", optional = true } -s2n-quic = { version = "1.52.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [ +s2n-quic = { version = "1.52.1", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [ "provider-tls-rustls", ], optional = true } -s2n-quic-core = { version = "0.52.0", path = "../submodules/s2n-quic/quic/s2n-quic-core", default-features = false, optional = true } -s2n-quic-rustls = { version = "0.52.0", path = "../submodules/s2n-quic/quic/s2n-quic-rustls", optional = true } +s2n-quic-core = { version = "0.52.1", path = "../submodules/s2n-quic/quic/s2n-quic-core", default-features = false, optional = true } +s2n-quic-rustls = { version = "0.52.1", path = "../submodules/s2n-quic/quic/s2n-quic-rustls", optional = true } s2n-quic-h3 = { path = "../submodules/s2n-quic/quic/s2n-quic-h3/", features = [ "tracing", ], optional = true } diff --git a/submodules/s2n-quic b/submodules/s2n-quic index 6115fa4..de2a580 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit 6115fa43e96ce3745f3457f940d64606642224ee +Subproject commit de2a5808b9cd712f51e5b1973ce8065b4cb046b9 From b945d0404ff7c48cf785523e015e71494bfdd697 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 29 Jan 2025 17:51:04 +0900 Subject: [PATCH 030/142] chore: deps lru --- rpxy-lib/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index fd6c3f4..1b00f0e 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -60,7 +60,7 @@ thiserror = "2.0.11" # http for both server and client http = "1.2.0" http-body-util = "0.1.2" -hyper = { version = "1.5.2", default-features = false } +hyper = { version = "1.6.0", default-features = false } hyper-util = { version = "0.1.10", features = ["full"] } futures-util = { version = "0.3.31", default-features = false } futures-channel = { version = "0.3.31", default-features = false } @@ -108,7 +108,7 @@ socket2 = { version = "0.5.8", features = ["all"], optional = true } # cache http-cache-semantics = { path = "../submodules/rusty-http-cache-semantics", default-features = false, optional = true } -lru = { version = "0.12.5", optional = true } +lru = { version = "0.13.0", optional = true } sha2 = { version = "0.10.8", default-features = false, optional = true } # cookie handling for sticky cookie From dc7c34d7e4e8974902816a83375101b59eb3e80e Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 29 Jan 2025 17:55:07 +0900 Subject: [PATCH 031/142] chore: deps rand --- rpxy-lib/Cargo.toml | 2 +- rpxy-lib/src/backend/load_balance/load_balance_main.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 1b00f0e..b04b5f2 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -36,7 +36,7 @@ post-quantum = [ ] [dependencies] -rand = "0.8.5" +rand = "0.9.0" ahash = "0.8.11" bytes = "1.9.0" derive_builder = "0.20.2" diff --git a/rpxy-lib/src/backend/load_balance/load_balance_main.rs b/rpxy-lib/src/backend/load_balance/load_balance_main.rs index 0b3eff8..0db21dd 100644 --- a/rpxy-lib/src/backend/load_balance/load_balance_main.rs +++ b/rpxy-lib/src/backend/load_balance/load_balance_main.rs @@ -80,8 +80,8 @@ impl LoadBalanceRandomBuilder { impl LoadBalanceWithPointer for LoadBalanceRandom { /// Returns the random index within the range fn get_ptr(&self, _info: Option<&LoadBalanceContext>) -> PointerToUpstream { - let mut rng = rand::thread_rng(); - let ptr = rng.gen_range(0..self.num_upstreams); + let mut rng = rand::rng(); + let ptr = rng.random_range(0..self.num_upstreams); PointerToUpstream { ptr, context: None } } } From 130e8823636b885605843829c0a5708bccaf0bff Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Thu, 30 Jan 2025 15:37:31 +0900 Subject: [PATCH 032/142] chore: deps --- rpxy-certs/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index 370596e..7d7cd3a 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -32,7 +32,7 @@ rustls-webpki = { version = "0.102.8", default-features = false, features = [ "aws_lc_rs", ] } rustls-post-quantum = { version = "0.2.1", optional = true } -x509-parser = { version = "0.16.0" } +x509-parser = { version = "0.17.0" } [dev-dependencies] tokio = { version = "1.43.0", default-features = false, features = [ From 6f018447170700e952a69b1c8e3f574ce8f14cf1 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Fri, 31 Jan 2025 11:34:59 +0900 Subject: [PATCH 033/142] deps --- rpxy-acme/Cargo.toml | 4 ++-- rpxy-certs/Cargo.toml | 4 ++-- rpxy-lib/Cargo.toml | 4 ++-- submodules/s2n-quic | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index 3489571..113f01e 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -24,7 +24,7 @@ aws-lc-rs = { version = "1.12.2", default-features = false, features = [ "aws-lc-sys", ] } blocking = "1.6.1" -rustls = { version = "0.23.21", default-features = false, features = [ +rustls = { version = "0.23.22", default-features = false, features = [ "std", "aws_lc_rs", ] } @@ -32,7 +32,7 @@ rustls-platform-verifier = { version = "0.5.0" } rustls-acme = { path = "../submodules/rustls-acme/", default-features = false, features = [ "aws-lc-rs", ] } -rustls-post-quantum = { version = "0.2.1", optional = true } +rustls-post-quantum = { version = "0.2.2", optional = true } tokio = { version = "1.43.0", default-features = false } tokio-util = { version = "0.7.13", default-features = false } tokio-stream = { version = "0.1.17", default-features = false } diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index 7d7cd3a..8ed4fc4 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -22,7 +22,7 @@ derive_builder = { version = "0.20.2" } thiserror = { version = "2.0.11" } hot_reload = { version = "0.1.8" } async-trait = { version = "0.1.85" } -rustls = { version = "0.23.21", default-features = false, features = [ +rustls = { version = "0.23.22", default-features = false, features = [ "std", "aws_lc_rs", ] } @@ -31,7 +31,7 @@ rustls-webpki = { version = "0.102.8", default-features = false, features = [ "std", "aws_lc_rs", ] } -rustls-post-quantum = { version = "0.2.1", optional = true } +rustls-post-quantum = { version = "0.2.2", optional = true } x509-parser = { version = "0.17.0" } [dev-dependencies] diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index b04b5f2..f14d821 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -80,8 +80,8 @@ hyper-rustls = { version = "0.27.5", default-features = false, features = [ # tls and cert management for server rpxy-certs = { path = "../rpxy-certs/", default-features = false } hot_reload = "0.1.8" -rustls = { version = "0.23.21", default-features = false } -rustls-post-quantum = { version = "0.2.1", optional = true } +rustls = { version = "0.23.22", default-features = false } +rustls-post-quantum = { version = "0.2.2", optional = true } tokio-rustls = { version = "0.26.1", features = ["early-data"] } # acme diff --git a/submodules/s2n-quic b/submodules/s2n-quic index de2a580..7852417 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit de2a5808b9cd712f51e5b1973ce8065b4cb046b9 +Subproject commit 78524172f54af5e3d5a0404b230d265c82eaf446 From 201733e1ce49b467ee6b07696c65868ead837719 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Fri, 31 Jan 2025 12:40:45 +0900 Subject: [PATCH 034/142] fix dockerfile --- docker/Dockerfile | 1 + docker/Dockerfile-slim | 1 + 2 files changed, 2 insertions(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index 707c342..c213bc1 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -40,6 +40,7 @@ RUN apt-get update && apt-get install -qy --no-install-recommends $BUILD_DEPS ${ echo "Install toolchain" && \ rustup target add $(cat /arch)-${TARGET_SUFFIX} && \ echo "Building rpxy from source" && \ + cargo update &&\ cargo build --release --target=$(cat /arch)-${TARGET_SUFFIX} ${CARGO_FEATURES} && \ strip --strip-all /tmp/target/$(cat /arch)-${TARGET_SUFFIX}/release/rpxy &&\ cp /tmp/target/$(cat /arch)-${TARGET_SUFFIX}/release/rpxy /tmp/target/release/rpxy diff --git a/docker/Dockerfile-slim b/docker/Dockerfile-slim index 0aa69cc..b58a408 100644 --- a/docker/Dockerfile-slim +++ b/docker/Dockerfile-slim @@ -25,6 +25,7 @@ COPY . /tmp/ ENV RUSTFLAGS "-C link-arg=-s" RUN echo "Building rpxy from source" && \ + cargo update && \ cargo build --release --target $(cat /arch)-unknown-linux-musl ${CARGO_FEATURES} && \ musl-strip --strip-all /tmp/target/$(cat /arch)-unknown-linux-musl/release/rpxy && \ cp /tmp/target/$(cat /arch)-unknown-linux-musl/release/rpxy /tmp/target/release/rpxy From 2371fac115e4f67ebacd5029501b79e518bca13a Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Fri, 31 Jan 2025 13:32:33 +0900 Subject: [PATCH 035/142] tentative downgrade of gha os --- .github/workflows/release_docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_docker.yml b/.github/workflows/release_docker.yml index 6accef5..ba38262 100644 --- a/.github/workflows/release_docker.yml +++ b/.github/workflows/release_docker.yml @@ -16,7 +16,7 @@ env: jobs: build_and_push: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 if: ${{ github.event_name == 'push' }} || ${{ github.event_name == 'pull_request' && github.event.pull_request.merged == true }} strategy: fail-fast: false From 461ef67ef24ad63a8489d85c84c4a4a1d6a87682 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Sat, 1 Feb 2025 02:50:48 +0900 Subject: [PATCH 036/142] support grpc (force http2 when grpc) --- rpxy-lib/src/forwarder/client.rs | 4 +++- rpxy-lib/src/message_handler/utils_request.rs | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/rpxy-lib/src/forwarder/client.rs b/rpxy-lib/src/forwarder/client.rs index bc99b41..292be06 100644 --- a/rpxy-lib/src/forwarder/client.rs +++ b/rpxy-lib/src/forwarder/client.rs @@ -226,7 +226,9 @@ where let connector = builder.https_or_http().enable_all_versions().wrap_connector(http.clone()); let connector_h2 = builder_h2.https_or_http().enable_http2().wrap_connector(http); let inner = Client::builder(LocalExecutor::new(_globals.runtime_handle.clone())).build::<_, B1>(connector); - let inner_h2 = Client::builder(LocalExecutor::new(_globals.runtime_handle.clone())).build::<_, B1>(connector_h2); + let inner_h2 = Client::builder(LocalExecutor::new(_globals.runtime_handle.clone())) + .http2_only(true) + .build::<_, B1>(connector_h2); Ok(Self { inner, diff --git a/rpxy-lib/src/message_handler/utils_request.rs b/rpxy-lib/src/message_handler/utils_request.rs index b60835f..0a0a77c 100644 --- a/rpxy-lib/src/message_handler/utils_request.rs +++ b/rpxy-lib/src/message_handler/utils_request.rs @@ -59,6 +59,18 @@ pub(super) fn update_request_line( upstream_chosen: &Upstream, upstream_candidates: &UpstreamCandidates, ) -> anyhow::Result<()> { + // If request is grpc, HTTP/2 is required + if req + .headers() + .get(header::CONTENT_TYPE) + .map(|v| v.as_bytes().starts_with(b"application/grpc")) + == Some(true) + { + debug!("Must be http/2 for gRPC request."); + *req.version_mut() = Version::HTTP_2; + return Ok(()); + } + // If not specified (force_httpXX_upstream) and https, version is preserved except for http/3 if upstream_chosen.uri.scheme() == Some(&Scheme::HTTP) { // Change version to http/1.1 when destination scheme is http From fe5e9fb166b96c0dcf68f5020b3d50c473f430e6 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Sat, 1 Feb 2025 03:21:01 +0900 Subject: [PATCH 037/142] doces: cleanup heading --- README.md | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ebe3de3..fdb7f87 100644 --- a/README.md +++ b/README.md @@ -14,15 +14,28 @@ [^pure_rust]: Doubtfully can be claimed to be written in pure Rust since current `rpxy` is based on `aws-lc-rs` for cryptographic operations. -By default, `rpxy` provides the *TLS connection sanitization* by correctly binding a certificate used to establish a secure channel with the backend application. Specifically, it always keeps the consistency between the given SNI (server name indication) in `ClientHello` of the underlying TLS and the domain name given by the overlaid HTTP HOST header (or URL in Request line) [^1]. Additionally, as a somewhat unstable feature, our `rpxy` can handle the brand-new HTTP/3 connection thanks to [`quinn`](https://github.com/quinn-rs/quinn), [`s2n-quic`](https://github.com/aws/s2n-quic) and [`hyperium/h3`](https://github.com/hyperium/h3).[^h3lib] Furthermore, `rpxy` supports the automatic issuance and renewal of certificates via [TLS-ALPN-01 (RFC8737)](https://www.rfc-editor.org/rfc/rfc8737) of [ACME protocol (RFC8555)](https://www.rfc-editor.org/rfc/rfc8555) thanks to [`rustls-acme`](https://github.com/FlorianUekermann/rustls-acme), and the hybridized post-quantum key exchange [`X25519MLKEM768`](https://www.ietf.org/archive/id/draft-kwiatkowski-tls-ecdhe-mlkem-02.html)[^kyber] for TLS/QUIC incoming and outgoing initiation thanks to [`rustls-post-quantum`](https://docs.rs/rustls-post-quantum/latest/rustls_post_quantum/). +Supported features are summarized as follows: - [^h3lib]: HTTP/3 libraries are mutually exclusive. You need to explicitly specify `s2n-quic` with `--no-default-features` flag. Also note that if you build `rpxy` with `s2n-quic`, then it requires `openssl` just for building the package. +- Supported HTTP(S) protocols: HTTP/1.1, HTTP/2 and brand-new HTTP/3 [^h3lib] +- gRPC is also supported +- Serving multiple domain names with TLS termination +- Mutual TLS authentication with client certificates +- Automated certificate issuance and renewal via TLS-ALPN-01 ACME protocol [^acme] +- Post-quantum key exchange for TLS/QUIC [^kyber] +- TLS connection sanitization to avoid the domain fronting [^sanitization] +- Load balancing with round-robin, random, and sticky session +- and more... - [^kyber]: This is already a default feature. Also note that `X25519MLKEM768` is still a draft version yet this is widely used on the Internet. +[^h3lib]: HTTP/3 is enabled thanks to [`quinn`](https://github.com/quinn-rs/quinn), [`s2n-quic`](https://github.com/aws/s2n-quic) and [`hyperium/h3`](https://github.com/hyperium/h3). HTTP/3 libraries are mutually exclusive. You need to explicitly specify `s2n-quic` with `--no-default-features` flag. Also note that if you build `rpxy` with `s2n-quic`, then it requires `openssl` just for building the package. + +[^acme]: `rpxy` supports the automatic issuance and renewal of certificates via [TLS-ALPN-01 (RFC8737)](https://www.rfc-editor.org/rfc/rfc8737) of [ACME protocol (RFC8555)](https://www.rfc-editor.org/rfc/rfc8555) thanks to [`rustls-acme`](https://github.com/FlorianUekermann/rustls-acme). + +[^kyber]: `rpxy` supports the hybridized post-quantum key exchange [`X25519MLKEM768`](https://www.ietf.org/archive/id/draft-kwiatkowski-tls-ecdhe-mlkem-02.html)[^kyber] for TLS/QUIC incoming and outgoing initiation thanks to [`rustls-post-quantum`](https://docs.rs/rustls-post-quantum/latest/rustls_post_quantum/). This is already a default feature. Also note that `X25519MLKEM768` is still a draft version yet this is widely used on the Internet. + +[^sanitization]: By default, `rpxy` provides the *TLS connection sanitization* by correctly binding a certificate used to establish a secure channel with the backend application. Specifically, it always keeps the consistency between the given SNI (server name indication) in `ClientHello` of the underlying TLS and the domain name given by the overlaid HTTP HOST header (or URL in Request line). We should note that NGINX doesn't guarantee such a consistency by default. To this end, you have to add `if` statement in the configuration file in NGINX. This project is still *work-in-progress*. But it is already working in some production environments and serves a number of domain names. Furthermore it *significantly outperforms* NGINX and Caddy, e.g., *1.5x faster than NGINX*, in the setting of a very simple HTTP reverse-proxy scenario (See [`bench`](./bench/) directory). - [^1]: We should note that NGINX doesn't guarantee such a consistency by default. To this end, you have to add `if` statement in the configuration file in NGINX. ## Installing/Building an Executable Binary of `rpxy` @@ -422,6 +435,23 @@ Check a third party project [`Gamerboy59/rpxy-webui`](https://github.com/Gamerbo todo! +## Credits + +`rpxy` cannot be built without the following projects and inspirations: + +- [`hyper`](https://github.com/hyperium/hyper) and [`hyperium/h3`](https://github.com/hyperium/h3) + +- [`rustls`](https://github.com/rustls/rustls) + +- [`tokio`](https://github.com/tokio-rs/tokio) + +- [`quinn`](https://github.com/quinn-rs/quinn) + +- [`s2n-quic`](https://github.com/aws/s2n-quic) + +- [`rustls-acme`](https://github.com/FlorianUekermann/rustls-acme) + + ## License `rpxy` is free, open-source software licensed under MIT License. From 22132926e3d4584bcef05f4ab5ee099ab6dcf606 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Sat, 1 Feb 2025 03:22:45 +0900 Subject: [PATCH 038/142] docs: refactor --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index fdb7f87..912ed62 100644 --- a/README.md +++ b/README.md @@ -440,15 +440,10 @@ todo! `rpxy` cannot be built without the following projects and inspirations: - [`hyper`](https://github.com/hyperium/hyper) and [`hyperium/h3`](https://github.com/hyperium/h3) - - [`rustls`](https://github.com/rustls/rustls) - - [`tokio`](https://github.com/tokio-rs/tokio) - - [`quinn`](https://github.com/quinn-rs/quinn) - - [`s2n-quic`](https://github.com/aws/s2n-quic) - - [`rustls-acme`](https://github.com/FlorianUekermann/rustls-acme) From 07a49af316df77a465e3f90bc15dc29f2e5fb3fd Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Sat, 1 Feb 2025 04:16:41 +0900 Subject: [PATCH 039/142] feat: add version tag for github release docker --- .github/workflows/release_docker.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/release_docker.yml b/.github/workflows/release_docker.yml index ba38262..9ebc053 100644 --- a/.github/workflows/release_docker.yml +++ b/.github/workflows/release_docker.yml @@ -170,6 +170,14 @@ jobs: platforms: ${{ matrix.platforms }} labels: ${{ steps.meta.outputs.labels }} + - name: check pull_request title + if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref == 'develop' && github.event.pull_request.base.ref == 'main' && github.event.pull_request.merged == true }} + uses: kaisugi/action-regex-match@v1.0.1 + id: regex-match + with: + text: ${{ github.event.pull_request.title }} + regex: "^(\\d+\\.\\d+\\.\\d+)$" + - name: Release build and push from main branch if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref == 'develop' && github.event.pull_request.base.ref == 'main' && github.event.pull_request.merged == true }} uses: docker/build-push-action@v6 @@ -181,6 +189,8 @@ jobs: ${{ env.GHCR }}/${{ env.GHCR_IMAGE_NAME }}:latest${{ matrix.tags-suffix }} ${{ env.DH_REGISTRY_NAME }}:latest${{ matrix.tags-suffix }} ${{ matrix.aliases }} + ${{ env.GHCR }}/${{ env.GHCR_IMAGE_NAME }}:${{ github.event.pull_request.title }}${{ matrix.tags-suffix }} + ${{ env.DH_REGISTRY_NAME }}:${{ github.event.pull_request.title }}${{ matrix.tags-suffix }} build-contexts: ${{ matrix.build-contexts }} file: ${{ matrix.dockerfile }} cache-from: type=gha,scope=rpxy-latest-${{ matrix.target }} From 6d61f1418736fa9d2108d76ac61fc0d05626ce7d Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Sat, 1 Feb 2025 04:27:25 +0900 Subject: [PATCH 040/142] docs and bump --- CHANGELOG.md | 18 +++++++++++++++++- Cargo.toml | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e6b294..18deef2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,22 @@ # CHANGELOG -## 0.9.7 or 0.10.0 (Unreleased) +## 0.9.8 or 0.10.0 (Unreleased) + +## 0.9.7 + +### Improvement + +- Feat: add version tag for docker images via github actions +- Feat: support gRPC: This makes rpxy to serve gRPC requests on the same port as HTTP and HTTPS, i.e., listen_port and listen_port_tls. This means that by using the different subdomain for HTTP(S) and gRPC, we can multiplex them on same ports without opening another port dedicated to gRPC. To this end, this update made the forwarder to force HTTP/2 for gRPC requests towards backend (gRPC) app. +- Deps and refactor + +### Bugfix + +- Fixed bug for the upstream option "force_http2_upstream" + +### Other + +- Tentative downgrade of github actions `runs-on` from ubuntu-latest to ubuntu-22.04. ## 0.9.6 diff --git a/Cargo.toml b/Cargo.toml index ee0db6c..2cb948f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "0.9.6" +version = "0.9.7" authors = ["Jun Kurihara"] homepage = "https://github.com/junkurihara/rust-rpxy" repository = "https://github.com/junkurihara/rust-rpxy" From 59605ae2bd0ac1cb7eb01b82f9f29f0a5326b066 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Sat, 1 Feb 2025 12:33:45 +0900 Subject: [PATCH 041/142] docs --- docker/README.md | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/docker/README.md b/docker/README.md index f5a4c2b..6fb5135 100644 --- a/docker/README.md +++ b/docker/README.md @@ -27,19 +27,25 @@ e.g. `-v rpxy/ca-certificates:/usr/local/share/ca-certificates` Differences among tags are summarized as follows. -### Latest Builds +### Latest and versioned builds -- `latest`: Built from the `main` branch with default features, running on Ubuntu. -- `latest-slim`, `slim`: Built by `musl` from the `main` branch with default features, running on Alpine. -- `latest-s2n`, `s2n`: Built from the `main` branch with the `http3-s2n` feature, running on Ubuntu. -- `*-pq`: Built with the `post-quantum` feature. This feature supports the post-quantum key exchange using `rustls-post-quantum` crate. +Latest builds are shipped from the `main` branch when the new version is released. For example, when the version `x.y.z` is released, the following images are provided. -### Nightly Builds +- `latest`, `x.y.z`: Built with default features, running on Ubuntu. +- `latest-slim`, `slim`, `x.y.z-slim` : Built by `musl` with default features, running on Alpine. +- `latest-s2n`, `s2n`, `x.y.z-s2n`: Built with the `http3-s2n` feature, running on Ubuntu. -- `nightly`: Built from the `develop` branch with default features, running on Ubuntu. -- `nightly-slim`: Built by `musl` from the `develop` branch with default features, running on Alpine. -- `nightly-s2n`: Built from the `develop` branch with the `http3-s2n` feature, running on Ubuntu. -- `*-pq`: Built with the `post-quantum` feature. This feature supports the hybridized post-quantum key exchange using `rustls-post-quantum` crate. +Additionally, images built with `webpki-roots` are provided in a similar manner to the above (e.g., `latest-s2n-webpki-roots` and `s2n-webpki-roots` tagged for the same image). + +### Nightly builds + +Nightly builds are shipped from the `develop` branch for every push. + +- `nightly`: Built with default features, running on Ubuntu. +- `nightly-slim`: Built by `musl` with default features, running on Alpine. +- `nightly-s2n`: Built with the `http3-s2n` feature, running on Ubuntu. + +Additionally, images built with `webpki-roots` are provided in a similar manner to the above (e.g., `nightly-s2n-webpki-roots`). ## Caveats From 314d2b88e4c3aaf45299b58ad91006789cdf57b8 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Mon, 3 Feb 2025 11:43:08 +0900 Subject: [PATCH 042/142] chore: deps --- rpxy-acme/Cargo.toml | 2 +- rpxy-bin/Cargo.toml | 2 +- rpxy-certs/Cargo.toml | 2 +- rpxy-lib/Cargo.toml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index 113f01e..a86ca82 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -18,7 +18,7 @@ url = { version = "2.5.4" } ahash = "0.8.11" thiserror = "2.0.11" tracing = "0.1.41" -async-trait = "0.1.85" +async-trait = "0.1.86" base64 = "0.22.1" aws-lc-rs = { version = "1.12.2", default-features = false, features = [ "aws-lc-sys", diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index 393688e..06df18a 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -41,7 +41,7 @@ tokio = { version = "1.43.0", default-features = false, features = [ "macros", ] } tokio-util = { version = "0.7.13", default-features = false } -async-trait = "0.1.85" +async-trait = "0.1.86" futures-util = { version = "0.3.31", default-features = false } # config diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index 8ed4fc4..08cc274 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -21,7 +21,7 @@ tracing = { version = "0.1.41" } derive_builder = { version = "0.20.2" } thiserror = { version = "2.0.11" } hot_reload = { version = "0.1.8" } -async-trait = { version = "0.1.85" } +async-trait = { version = "0.1.86" } rustls = { version = "0.23.22", default-features = false, features = [ "std", "aws_lc_rs", diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index f14d821..627d3f7 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -51,7 +51,7 @@ tokio = { version = "1.43.0", default-features = false, features = [ ] } tokio-util = { version = "0.7.13", default-features = false } pin-project-lite = "0.2.16" -async-trait = "0.1.85" +async-trait = "0.1.86" # Error handling anyhow = "1.0.95" From 4b3f71975916b38a05e9a7c7f8bf6495badc30af Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Thu, 6 Feb 2025 18:51:38 +0900 Subject: [PATCH 043/142] chore: deps --- rpxy-bin/Cargo.toml | 4 ++-- rpxy-lib/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index 06df18a..1b1e28e 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -45,8 +45,8 @@ async-trait = "0.1.86" futures-util = { version = "0.3.31", default-features = false } # config -clap = { version = "4.5.27", features = ["std", "cargo", "wrap_help"] } -toml = { version = "0.8.19", default-features = false, features = ["parse"] } +clap = { version = "4.5.28", features = ["std", "cargo", "wrap_help"] } +toml = { version = "0.8.20", default-features = false, features = ["parse"] } hot_reload = "0.1.8" serde_ignored = "0.1.10" diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 627d3f7..5bf6109 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -38,7 +38,7 @@ post-quantum = [ [dependencies] rand = "0.9.0" ahash = "0.8.11" -bytes = "1.9.0" +bytes = "1.10.0" derive_builder = "0.20.2" futures = { version = "0.3.31", features = ["alloc", "async-await"] } tokio = { version = "1.43.0", default-features = false, features = [ From ef2468eb15f4ecc3fa5ae9aec3f9e5189e03d817 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 12 Feb 2025 14:13:23 +0900 Subject: [PATCH 044/142] chore: deps --- rpxy-acme/Cargo.toml | 2 +- rpxy-bin/Cargo.toml | 4 ++-- rpxy-certs/Cargo.toml | 2 +- rpxy-lib/Cargo.toml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index a86ca82..4a93685 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -24,7 +24,7 @@ aws-lc-rs = { version = "1.12.2", default-features = false, features = [ "aws-lc-sys", ] } blocking = "1.6.1" -rustls = { version = "0.23.22", default-features = false, features = [ +rustls = { version = "0.23.23", default-features = false, features = [ "std", "aws_lc_rs", ] } diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index 06df18a..e704dd0 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -45,8 +45,8 @@ async-trait = "0.1.86" futures-util = { version = "0.3.31", default-features = false } # config -clap = { version = "4.5.27", features = ["std", "cargo", "wrap_help"] } -toml = { version = "0.8.19", default-features = false, features = ["parse"] } +clap = { version = "4.5.29", features = ["std", "cargo", "wrap_help"] } +toml = { version = "0.8.20", default-features = false, features = ["parse"] } hot_reload = "0.1.8" serde_ignored = "0.1.10" diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index 08cc274..ad63a2c 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -22,7 +22,7 @@ derive_builder = { version = "0.20.2" } thiserror = { version = "2.0.11" } hot_reload = { version = "0.1.8" } async-trait = { version = "0.1.86" } -rustls = { version = "0.23.22", default-features = false, features = [ +rustls = { version = "0.23.23", default-features = false, features = [ "std", "aws_lc_rs", ] } diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 627d3f7..291db34 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -38,7 +38,7 @@ post-quantum = [ [dependencies] rand = "0.9.0" ahash = "0.8.11" -bytes = "1.9.0" +bytes = "1.10.0" derive_builder = "0.20.2" futures = { version = "0.3.31", features = ["alloc", "async-await"] } tokio = { version = "1.43.0", default-features = false, features = [ @@ -80,7 +80,7 @@ hyper-rustls = { version = "0.27.5", default-features = false, features = [ # tls and cert management for server rpxy-certs = { path = "../rpxy-certs/", default-features = false } hot_reload = "0.1.8" -rustls = { version = "0.23.22", default-features = false } +rustls = { version = "0.23.23", default-features = false } rustls-post-quantum = { version = "0.2.2", optional = true } tokio-rustls = { version = "0.26.1", features = ["early-data"] } From 8d0adde1b0d3aaf96e78c51c967e5332e10598cb Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Fri, 14 Feb 2025 02:36:34 +0900 Subject: [PATCH 045/142] refactor: simplify the watcher option of inner handler --- rpxy-acme/src/manager.rs | 13 +++---- rpxy-bin/src/main.rs | 58 +++++++++++++++----------------- rpxy-lib/src/globals.rs | 3 -- rpxy-lib/src/lib.rs | 33 +++++++----------- rpxy-lib/src/proxy/proxy_main.rs | 44 ++++++++++++++++++------ 5 files changed, 79 insertions(+), 72 deletions(-) diff --git a/rpxy-acme/src/manager.rs b/rpxy-acme/src/manager.rs index 1a4c091..73b786d 100644 --- a/rpxy-acme/src/manager.rs +++ b/rpxy-acme/src/manager.rs @@ -77,7 +77,7 @@ impl AcmeManager { /// Returns a Vec> as a tasks handles and a map of domain to ServerConfig for challenge. pub fn spawn_manager_tasks( &self, - cancel_token: Option, + cancel_token: tokio_util::sync::CancellationToken, ) -> (Vec>, HashMap>) { let rustls_client_config = rustls::ClientConfig::builder() .dangerous() // The `Verifier` we're using is actually safe @@ -115,13 +115,10 @@ impl AcmeManager { } } }; - if let Some(cancel_token) = cancel_token.as_ref() { - tokio::select! { - _ = task => {}, - _ = cancel_token.cancelled() => { debug!("rpxy ACME manager task for {domain} terminated") } - } - } else { - task.await; + + tokio::select! { + _ = task => {}, + _ = cancel_token.cancelled() => { debug!("rpxy ACME manager task for {domain} terminated") } } } }) diff --git a/rpxy-bin/src/main.rs b/rpxy-bin/src/main.rs index d1156d8..855561f 100644 --- a/rpxy-bin/src/main.rs +++ b/rpxy-bin/src/main.rs @@ -99,7 +99,7 @@ impl RpxyService { }) } - async fn start(&self, cancel_token: Option) -> Result<(), anyhow::Error> { + async fn start(&self, cancel_token: CancellationToken) -> Result<(), anyhow::Error> { let RpxyService { runtime_handle, proxy_conf, @@ -114,17 +114,19 @@ impl RpxyService { { let (acme_join_handles, server_config_acme_challenge) = acme_manager .as_ref() - .map(|m| m.spawn_manager_tasks(cancel_token.as_ref().map(|t| t.child_token()))) + .map(|m| m.spawn_manager_tasks(cancel_token.child_token())) .unwrap_or((vec![], Default::default())); let rpxy_opts = RpxyOptionsBuilder::default() .proxy_config(proxy_conf.clone()) .app_config_list(app_conf.clone()) .cert_rx(cert_rx.clone()) .runtime_handle(runtime_handle.clone()) - .cancel_token(cancel_token.as_ref().map(|t| t.child_token())) .server_configs_acme_challenge(Arc::new(server_config_acme_challenge)) .build()?; - self.start_inner(rpxy_opts, acme_join_handles).await.map_err(|e| anyhow!(e)) + self + .start_inner(rpxy_opts, cancel_token, acme_join_handles) + .await + .map_err(|e| anyhow!(e)) } #[cfg(not(feature = "acme"))] @@ -134,9 +136,8 @@ impl RpxyService { .app_config_list(app_conf.clone()) .cert_rx(cert_rx.clone()) .runtime_handle(runtime_handle.clone()) - .cancel_token(cancel_token.as_ref().map(|t| t.child_token())) .build()?; - self.start_inner(rpxy_opts).await.map_err(|e| anyhow!(e)) + self.start_inner(rpxy_opts, cancel_token).await.map_err(|e| anyhow!(e)) } } @@ -144,19 +145,19 @@ impl RpxyService { async fn start_inner( &self, rpxy_opts: RpxyOptions, + cancel_token: CancellationToken, #[cfg(feature = "acme")] acme_task_handles: Vec>, ) -> Result<(), anyhow::Error> { - let cancel_token = rpxy_opts.cancel_token.clone(); + let cancel_token = cancel_token.clone(); let runtime_handle = rpxy_opts.runtime_handle.clone(); // spawn rpxy entrypoint, where cancellation token is possibly contained inside the service let cancel_token_clone = cancel_token.clone(); + let child_cancel_token = cancel_token.child_token(); let rpxy_handle = runtime_handle.spawn(async move { - if let Err(e) = entrypoint(&rpxy_opts).await { + if let Err(e) = entrypoint(&rpxy_opts, child_cancel_token).await { error!("rpxy entrypoint exited on error: {e}"); - if let Some(cancel_token) = cancel_token_clone { - cancel_token.cancel(); - } + cancel_token_clone.cancel(); return Err(anyhow!(e)); } Ok(()) @@ -169,24 +170,20 @@ impl RpxyService { // spawn certificate reloader service, where cert service does not have cancellation token inside the service let cert_service = self.cert_service.as_ref().unwrap().clone(); let cancel_token_clone = cancel_token.clone(); - let child_cancel_token = cancel_token.as_ref().map(|c| c.child_token()); + let child_cancel_token = cancel_token.child_token(); let cert_handle = runtime_handle.spawn(async move { - if let Some(child_cancel_token) = child_cancel_token { - tokio::select! { - cert_res = cert_service.start() => { - if let Err(ref e) = cert_res { - error!("cert reloader service exited on error: {e}"); - } - cancel_token_clone.unwrap().cancel(); - cert_res.map_err(|e| anyhow!(e)) - } - _ = child_cancel_token.cancelled() => { - debug!("cert reloader service terminated"); - Ok(()) + tokio::select! { + cert_res = cert_service.start() => { + if let Err(ref e) = cert_res { + error!("cert reloader service exited on error: {e}"); } + cancel_token_clone.cancel(); + cert_res.map_err(|e| anyhow!(e)) + } + _ = child_cancel_token.cancelled() => { + debug!("cert reloader service terminated"); + Ok(()) } - } else { - cert_service.start().await.map_err(|e| anyhow!(e)) } }); @@ -221,9 +218,7 @@ impl RpxyService { if let Err(ref e) = acme_res { error!("acme manager exited on error: {e}"); } - if let Some(cancel_token) = cancel_token_clone { - cancel_token.cancel(); - } + cancel_token_clone.cancel(); acme_res.map_err(|e| anyhow!(e)) }); let (rpxy_res, cert_res, acme_res) = tokio::join!(rpxy_handle, cert_handle, acme_handle); @@ -245,7 +240,8 @@ async fn rpxy_service_without_watcher( info!("Start rpxy service"); let config_toml = ConfigToml::new(config_file_path).map_err(|e| anyhow!("Invalid toml file: {e}"))?; let service = RpxyService::new(&config_toml, runtime_handle).await?; - service.start(None).await + // Create cancel token that is never be called as dummy + service.start(tokio_util::sync::CancellationToken::new()).await } async fn rpxy_service_with_watcher( @@ -268,7 +264,7 @@ async fn rpxy_service_with_watcher( tokio::select! { /* ---------- */ - rpxy_res = service.start(Some(cancel_token.clone())) => { + rpxy_res = service.start(cancel_token.clone()) => { if let Err(ref e) = rpxy_res { error!("rpxy service exited on error: {e}"); } else { diff --git a/rpxy-lib/src/globals.rs b/rpxy-lib/src/globals.rs index a52f066..c25483f 100644 --- a/rpxy-lib/src/globals.rs +++ b/rpxy-lib/src/globals.rs @@ -2,7 +2,6 @@ use crate::{constants::*, count::RequestCount}; use hot_reload::ReloaderReceiver; use rpxy_certs::ServerCryptoBase; use std::{net::SocketAddr, time::Duration}; -use tokio_util::sync::CancellationToken; /// Global object containing proxy configurations and shared object like counters. /// But note that in Globals, we do not have Mutex and RwLock. It is indeed, the context shared among async tasks. @@ -13,8 +12,6 @@ pub struct Globals { pub request_count: RequestCount, /// Shared context - Async task runtime handler pub runtime_handle: tokio::runtime::Handle, - /// Shared context - Notify object to stop async tasks - pub cancel_token: Option, /// Shared context - Certificate reloader service receiver // TODO: newer one pub cert_reloader_rx: Option>, diff --git a/rpxy-lib/src/lib.rs b/rpxy-lib/src/lib.rs index 4cc23ab..4ec60e0 100644 --- a/rpxy-lib/src/lib.rs +++ b/rpxy-lib/src/lib.rs @@ -43,8 +43,6 @@ pub struct RpxyOptions { pub cert_rx: Option>, // TODO: /// Async task runtime handler pub runtime_handle: tokio::runtime::Handle, - /// Notify object to stop async tasks - pub cancel_token: Option, #[cfg(feature = "acme")] /// ServerConfig used for only ACME challenge for ACME domains @@ -58,10 +56,10 @@ pub async fn entrypoint( app_config_list, cert_rx, // TODO: runtime_handle, - cancel_token, #[cfg(feature = "acme")] server_configs_acme_challenge, }: &RpxyOptions, + cancel_token: CancellationToken, ) -> RpxyResult<()> { #[cfg(all(feature = "http3-quinn", feature = "http3-s2n"))] warn!("Both \"http3-quinn\" and \"http3-s2n\" features are enabled. \"http3-quinn\" will be used"); @@ -117,7 +115,6 @@ pub async fn entrypoint( proxy_config: proxy_config.clone(), request_count: Default::default(), runtime_handle: runtime_handle.clone(), - cancel_token: cancel_token.clone(), cert_reloader_rx: cert_rx.clone(), #[cfg(feature = "acme")] @@ -153,25 +150,21 @@ pub async fn entrypoint( message_handler: message_handler.clone(), }; - let cancel_token = globals.cancel_token.as_ref().map(|t| t.child_token()); - let parent_cancel_token_clone = globals.cancel_token.clone(); + let cancel_token = cancel_token.clone(); globals.runtime_handle.spawn(async move { info!("rpxy proxy service for {listening_on} started"); - if let Some(cancel_token) = cancel_token { - tokio::select! { - _ = cancel_token.cancelled() => { - debug!("rpxy proxy service for {listening_on} terminated"); - Ok(()) - }, - proxy_res = proxy.start() => { - info!("rpxy proxy service for {listening_on} exited"); - // cancel other proxy tasks - parent_cancel_token_clone.unwrap().cancel(); - proxy_res - } + + tokio::select! { + _ = cancel_token.cancelled() => { + debug!("rpxy proxy service for {listening_on} terminated"); + Ok(()) + }, + proxy_res = proxy.start(cancel_token.child_token()) => { + info!("rpxy proxy service for {listening_on} exited"); + // cancel other proxy tasks + cancel_token.cancel(); + proxy_res } - } else { - proxy.start().await } }) }); diff --git a/rpxy-lib/src/proxy/proxy_main.rs b/rpxy-lib/src/proxy/proxy_main.rs index 40e14e5..5244ecf 100644 --- a/rpxy-lib/src/proxy/proxy_main.rs +++ b/rpxy-lib/src/proxy/proxy_main.rs @@ -22,6 +22,7 @@ use hyper_util::{client::legacy::connect::Connect, rt::TokioIo, server::conn::au use rpxy_certs::ServerCrypto; use std::{net::SocketAddr, sync::Arc, time::Duration}; use tokio::time::timeout; +use tokio_util::sync::CancellationToken; /// Wrapper function to handle request for HTTP/1.1 and HTTP/2 /// HTTP/3 is handled in proxy_h3.rs which directly calls the message handler @@ -129,7 +130,7 @@ where } /// Start with TLS (HTTPS) - pub(super) async fn start_with_tls(&self) -> RpxyResult<()> { + pub(super) async fn start_with_tls(&self, cancel_token: CancellationToken) -> RpxyResult<()> { #[cfg(not(any(feature = "http3-quinn", feature = "http3-s2n")))] { self.tls_listener_service().await?; @@ -139,14 +140,37 @@ where #[cfg(any(feature = "http3-quinn", feature = "http3-s2n"))] { if self.globals.proxy_config.http3 { - select! { - _ = self.tls_listener_service().fuse() => { - error!("TCP proxy service for TLS exited"); - }, - _ = self.h3_listener_service().fuse() => { - error!("UDP proxy service for QUIC exited"); + let jh_tls = self.globals.runtime_handle.spawn({ + let self_clone = self.clone(); + let cancel_token = cancel_token.clone(); + async move { + select! { + _ = self_clone.tls_listener_service().fuse() => { + error!("TCP proxy service for TLS exited"); + cancel_token.cancel(); + }, + _ = cancel_token.cancelled().fuse() => { + debug!("Cancel token is called for TLS listener"); + } + } } - }; + }); + let jh_h3 = self.globals.runtime_handle.spawn({ + let self_clone = self.clone(); + async move { + select! { + _ = self_clone.h3_listener_service().fuse() => { + error!("UDP proxy service for QUIC exited"); + cancel_token.cancel(); + }, + _ = cancel_token.cancelled().fuse() => { + debug!("Cancel token is called for QUIC listener"); + } + } + } + }); + let _ = futures::future::join(jh_tls, jh_h3).await; + Ok(()) } else { self.tls_listener_service().await?; @@ -303,10 +327,10 @@ where } /// Entrypoint for HTTP/1.1, 2 and 3 servers - pub async fn start(&self) -> RpxyResult<()> { + pub async fn start(&self, cancel_token: CancellationToken) -> RpxyResult<()> { let proxy_service = async { if self.tls_enabled { - self.start_with_tls().await + self.start_with_tls(cancel_token).await } else { self.start_without_tls().await } From 3588c956e9f42b22967bc7a3274e740edf35d1a1 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 19 Feb 2025 20:53:47 +0900 Subject: [PATCH 046/142] chore deps --- rpxy-bin/Cargo.toml | 2 +- submodules/s2n-quic | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index e704dd0..f8ad72f 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -45,7 +45,7 @@ async-trait = "0.1.86" futures-util = { version = "0.3.31", default-features = false } # config -clap = { version = "4.5.29", features = ["std", "cargo", "wrap_help"] } +clap = { version = "4.5.30", features = ["std", "cargo", "wrap_help"] } toml = { version = "0.8.20", default-features = false, features = ["parse"] } hot_reload = "0.1.8" serde_ignored = "0.1.10" diff --git a/submodules/s2n-quic b/submodules/s2n-quic index 7852417..de2a580 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit 78524172f54af5e3d5a0404b230d265c82eaf446 +Subproject commit de2a5808b9cd712f51e5b1973ce8065b4cb046b9 From 3fe409aaf73b94a65aff4752164d14904cb52e9d Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Thu, 20 Feb 2025 14:06:22 +0900 Subject: [PATCH 047/142] deps --- rpxy-acme/Cargo.toml | 2 +- rpxy-bin/Cargo.toml | 2 +- rpxy-lib/Cargo.toml | 2 +- submodules/s2n-quic | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index 4a93685..f1d31cf 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -20,7 +20,7 @@ thiserror = "2.0.11" tracing = "0.1.41" async-trait = "0.1.86" base64 = "0.22.1" -aws-lc-rs = { version = "1.12.2", default-features = false, features = [ +aws-lc-rs = { version = "1.12.3", default-features = false, features = [ "aws-lc-sys", ] } blocking = "1.6.1" diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index f8ad72f..1b4a343 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -30,7 +30,7 @@ rpxy-lib = { path = "../rpxy-lib/", default-features = false, features = [ ] } mimalloc = { version = "*", default-features = false } -anyhow = "1.0.95" +anyhow = "1.0.96" ahash = "0.8.11" serde = { version = "1.0.217", default-features = false, features = ["derive"] } tokio = { version = "1.43.0", default-features = false, features = [ diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 291db34..47bf867 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -54,7 +54,7 @@ pin-project-lite = "0.2.16" async-trait = "0.1.86" # Error handling -anyhow = "1.0.95" +anyhow = "1.0.96" thiserror = "2.0.11" # http for both server and client diff --git a/submodules/s2n-quic b/submodules/s2n-quic index de2a580..7852417 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit de2a5808b9cd712f51e5b1973ce8065b4cb046b9 +Subproject commit 78524172f54af5e3d5a0404b230d265c82eaf446 From 77fd66bd3522276ca76b3ff41105ddd1abfd1db2 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 26 Feb 2025 12:00:21 +0900 Subject: [PATCH 048/142] chore: deps --- rpxy-acme/Cargo.toml | 2 +- rpxy-bin/Cargo.toml | 4 ++-- rpxy-certs/Cargo.toml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index f1d31cf..e0c1146 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -20,7 +20,7 @@ thiserror = "2.0.11" tracing = "0.1.41" async-trait = "0.1.86" base64 = "0.22.1" -aws-lc-rs = { version = "1.12.3", default-features = false, features = [ +aws-lc-rs = { version = "1.12.4", default-features = false, features = [ "aws-lc-sys", ] } blocking = "1.6.1" diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index 1b4a343..e81376e 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -32,7 +32,7 @@ rpxy-lib = { path = "../rpxy-lib/", default-features = false, features = [ mimalloc = { version = "*", default-features = false } anyhow = "1.0.96" ahash = "0.8.11" -serde = { version = "1.0.217", default-features = false, features = ["derive"] } +serde = { version = "1.0.218", default-features = false, features = ["derive"] } tokio = { version = "1.43.0", default-features = false, features = [ "net", "rt-multi-thread", @@ -45,7 +45,7 @@ async-trait = "0.1.86" futures-util = { version = "0.3.31", default-features = false } # config -clap = { version = "4.5.30", features = ["std", "cargo", "wrap_help"] } +clap = { version = "4.5.31", features = ["std", "cargo", "wrap_help"] } toml = { version = "0.8.20", default-features = false, features = ["parse"] } hot_reload = "0.1.8" serde_ignored = "0.1.10" diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index ad63a2c..e40125c 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -27,9 +27,9 @@ rustls = { version = "0.23.23", default-features = false, features = [ "aws_lc_rs", ] } rustls-pemfile = { version = "2.2.0" } -rustls-webpki = { version = "0.102.8", default-features = false, features = [ +rustls-webpki = { version = "0.103.0", default-features = false, features = [ "std", - "aws_lc_rs", + "aws-lc-rs", ] } rustls-post-quantum = { version = "0.2.2", optional = true } x509-parser = { version = "0.17.0" } From 03e657b312b86aed3e14f50e287c1fb935ccfbdd Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Thu, 27 Feb 2025 11:57:11 +0900 Subject: [PATCH 049/142] chore: deps s2n-quic --- rpxy-lib/Cargo.toml | 8 ++++---- submodules/s2n-quic | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 47bf867..3778e79 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -94,11 +94,11 @@ tracing = { version = "0.1.41" } quinn = { version = "0.11.6", optional = true } h3 = { version = "0.0.6", features = ["tracing"], optional = true } h3-quinn = { version = "0.0.7", optional = true } -s2n-quic = { version = "1.52.1", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [ +s2n-quic = { version = "1.54.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [ "provider-tls-rustls", ], optional = true } -s2n-quic-core = { version = "0.52.1", path = "../submodules/s2n-quic/quic/s2n-quic-core", default-features = false, optional = true } -s2n-quic-rustls = { version = "0.52.1", path = "../submodules/s2n-quic/quic/s2n-quic-rustls", optional = true } +s2n-quic-core = { version = "0.54.0", path = "../submodules/s2n-quic/quic/s2n-quic-core", default-features = false, optional = true } +s2n-quic-rustls = { version = "0.54.0", path = "../submodules/s2n-quic/quic/s2n-quic-rustls", optional = true } s2n-quic-h3 = { path = "../submodules/s2n-quic/quic/s2n-quic-h3/", features = [ "tracing", ], optional = true } @@ -112,7 +112,7 @@ lru = { version = "0.13.0", optional = true } sha2 = { version = "0.10.8", default-features = false, optional = true } # cookie handling for sticky cookie -chrono = { version = "0.4.39", default-features = false, features = [ +chrono = { version = "0.4.40", default-features = false, features = [ "unstable-locales", "alloc", "clock", diff --git a/submodules/s2n-quic b/submodules/s2n-quic index 7852417..9e566e0 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit 78524172f54af5e3d5a0404b230d265c82eaf446 +Subproject commit 9e566e0df9fa44bc6a361b4eb61ddbfa4ab2cb79 From fc09e4d99cda3599f3b22efc9cf506c3214e4e33 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Tue, 4 Mar 2025 15:35:12 +0900 Subject: [PATCH 050/142] chore: deps --- rpxy-acme/Cargo.toml | 6 +++--- rpxy-bin/Cargo.toml | 6 +++--- rpxy-certs/Cargo.toml | 4 ++-- rpxy-lib/Cargo.toml | 8 ++++---- submodules/s2n-quic | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index e0c1146..b636df3 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -16,11 +16,11 @@ post-quantum = ["rustls-post-quantum"] [dependencies] url = { version = "2.5.4" } ahash = "0.8.11" -thiserror = "2.0.11" +thiserror = "2.0.12" tracing = "0.1.41" -async-trait = "0.1.86" +async-trait = "0.1.87" base64 = "0.22.1" -aws-lc-rs = { version = "1.12.4", default-features = false, features = [ +aws-lc-rs = { version = "1.12.5", default-features = false, features = [ "aws-lc-sys", ] } blocking = "1.6.1" diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index e81376e..da03e1e 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -30,7 +30,7 @@ rpxy-lib = { path = "../rpxy-lib/", default-features = false, features = [ ] } mimalloc = { version = "*", default-features = false } -anyhow = "1.0.96" +anyhow = "1.0.97" ahash = "0.8.11" serde = { version = "1.0.218", default-features = false, features = ["derive"] } tokio = { version = "1.43.0", default-features = false, features = [ @@ -41,14 +41,14 @@ tokio = { version = "1.43.0", default-features = false, features = [ "macros", ] } tokio-util = { version = "0.7.13", default-features = false } -async-trait = "0.1.86" +async-trait = "0.1.87" futures-util = { version = "0.3.31", default-features = false } # config clap = { version = "4.5.31", features = ["std", "cargo", "wrap_help"] } toml = { version = "0.8.20", default-features = false, features = ["parse"] } hot_reload = "0.1.8" -serde_ignored = "0.1.10" +serde_ignored = "0.1.11" # logging tracing = { version = "0.1.41" } diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index e40125c..304336c 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -19,9 +19,9 @@ http3 = [] ahash = { version = "0.8.11" } tracing = { version = "0.1.41" } derive_builder = { version = "0.20.2" } -thiserror = { version = "2.0.11" } +thiserror = { version = "2.0.12" } hot_reload = { version = "0.1.8" } -async-trait = { version = "0.1.86" } +async-trait = { version = "0.1.87" } rustls = { version = "0.23.23", default-features = false, features = [ "std", "aws_lc_rs", diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 3778e79..3f5e4e4 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -51,11 +51,11 @@ tokio = { version = "1.43.0", default-features = false, features = [ ] } tokio-util = { version = "0.7.13", default-features = false } pin-project-lite = "0.2.16" -async-trait = "0.1.86" +async-trait = "0.1.87" # Error handling -anyhow = "1.0.96" -thiserror = "2.0.11" +anyhow = "1.0.97" +thiserror = "2.0.12" # http for both server and client http = "1.2.0" @@ -82,7 +82,7 @@ rpxy-certs = { path = "../rpxy-certs/", default-features = false } hot_reload = "0.1.8" rustls = { version = "0.23.23", default-features = false } rustls-post-quantum = { version = "0.2.2", optional = true } -tokio-rustls = { version = "0.26.1", features = ["early-data"] } +tokio-rustls = { version = "0.26.2", features = ["early-data"] } # acme rpxy-acme = { path = "../rpxy-acme/", default-features = false, optional = true } diff --git a/submodules/s2n-quic b/submodules/s2n-quic index 9e566e0..7852417 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit 9e566e0df9fa44bc6a361b4eb61ddbfa4ab2cb79 +Subproject commit 78524172f54af5e3d5a0404b230d265c82eaf446 From 3b29179123f90a8250f1591f71b3c85d85e0e10f Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Tue, 4 Mar 2025 15:37:13 +0900 Subject: [PATCH 051/142] chore: deps --- submodules/s2n-quic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/s2n-quic b/submodules/s2n-quic index 7852417..9e566e0 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit 78524172f54af5e3d5a0404b230d265c82eaf446 +Subproject commit 9e566e0df9fa44bc6a361b4eb61ddbfa4ab2cb79 From d2e49db0fbef7b763625dc79fd95c9f1e66d5534 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Mon, 10 Mar 2025 16:02:28 +0900 Subject: [PATCH 052/142] chore deps --- rpxy-acme/Cargo.toml | 2 +- rpxy-bin/Cargo.toml | 4 ++-- rpxy-certs/Cargo.toml | 2 +- rpxy-lib/Cargo.toml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index b636df3..4315e52 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -33,6 +33,6 @@ rustls-acme = { path = "../submodules/rustls-acme/", default-features = false, f "aws-lc-rs", ] } rustls-post-quantum = { version = "0.2.2", optional = true } -tokio = { version = "1.43.0", default-features = false } +tokio = { version = "1.44.0", default-features = false } tokio-util = { version = "0.7.13", default-features = false } tokio-stream = { version = "0.1.17", default-features = false } diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index da03e1e..25c3c65 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -32,8 +32,8 @@ rpxy-lib = { path = "../rpxy-lib/", default-features = false, features = [ mimalloc = { version = "*", default-features = false } anyhow = "1.0.97" ahash = "0.8.11" -serde = { version = "1.0.218", default-features = false, features = ["derive"] } -tokio = { version = "1.43.0", default-features = false, features = [ +serde = { version = "1.0.219", default-features = false, features = ["derive"] } +tokio = { version = "1.44.0", default-features = false, features = [ "net", "rt-multi-thread", "time", diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index 304336c..d0426cf 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -35,7 +35,7 @@ rustls-post-quantum = { version = "0.2.2", optional = true } x509-parser = { version = "0.17.0" } [dev-dependencies] -tokio = { version = "1.43.0", default-features = false, features = [ +tokio = { version = "1.44.0", default-features = false, features = [ "rt-multi-thread", "macros", ] } diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 3f5e4e4..2d38b50 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -38,10 +38,10 @@ post-quantum = [ [dependencies] rand = "0.9.0" ahash = "0.8.11" -bytes = "1.10.0" +bytes = "1.10.1" derive_builder = "0.20.2" futures = { version = "0.3.31", features = ["alloc", "async-await"] } -tokio = { version = "1.43.0", default-features = false, features = [ +tokio = { version = "1.44.0", default-features = false, features = [ "net", "rt-multi-thread", "time", From 4bc6a474181906e3f0f6cf282f31d76ab6520e25 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Tue, 11 Mar 2025 12:13:07 +0900 Subject: [PATCH 053/142] chore: deps s2n-quic --- rpxy-lib/Cargo.toml | 6 +++--- submodules/s2n-quic | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 2d38b50..6b052ad 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -94,11 +94,11 @@ tracing = { version = "0.1.41" } quinn = { version = "0.11.6", optional = true } h3 = { version = "0.0.6", features = ["tracing"], optional = true } h3-quinn = { version = "0.0.7", optional = true } -s2n-quic = { version = "1.54.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [ +s2n-quic = { version = "1.55.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [ "provider-tls-rustls", ], optional = true } -s2n-quic-core = { version = "0.54.0", path = "../submodules/s2n-quic/quic/s2n-quic-core", default-features = false, optional = true } -s2n-quic-rustls = { version = "0.54.0", path = "../submodules/s2n-quic/quic/s2n-quic-rustls", optional = true } +s2n-quic-core = { version = "0.55.0", path = "../submodules/s2n-quic/quic/s2n-quic-core", default-features = false, optional = true } +s2n-quic-rustls = { version = "0.55.0", path = "../submodules/s2n-quic/quic/s2n-quic-rustls", optional = true } s2n-quic-h3 = { path = "../submodules/s2n-quic/quic/s2n-quic-h3/", features = [ "tracing", ], optional = true } diff --git a/submodules/s2n-quic b/submodules/s2n-quic index 9e566e0..35b6089 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit 9e566e0df9fa44bc6a361b4eb61ddbfa4ab2cb79 +Subproject commit 35b60899586e5d5a8bca28ea6c418428350f89be From a959882f3f9b2cb2908cb43538d07354ea159d9b Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Tue, 11 Mar 2025 12:13:26 +0900 Subject: [PATCH 054/142] chore deps --- rpxy-bin/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index 25c3c65..8084e0c 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -45,7 +45,7 @@ async-trait = "0.1.87" futures-util = { version = "0.3.31", default-features = false } # config -clap = { version = "4.5.31", features = ["std", "cargo", "wrap_help"] } +clap = { version = "4.5.32", features = ["std", "cargo", "wrap_help"] } toml = { version = "0.8.20", default-features = false, features = ["parse"] } hot_reload = "0.1.8" serde_ignored = "0.1.11" From 79539dbc5ecdff62f084192744a3b1c9e5512c5c Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Thu, 13 Mar 2025 20:57:54 +0900 Subject: [PATCH 055/142] chore: deps --- rpxy-acme/Cargo.toml | 6 +++--- rpxy-bin/Cargo.toml | 4 ++-- rpxy-certs/Cargo.toml | 2 +- rpxy-lib/Cargo.toml | 8 ++++---- submodules/rustls-acme | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index 4315e52..8d5c7f5 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -20,7 +20,7 @@ thiserror = "2.0.12" tracing = "0.1.41" async-trait = "0.1.87" base64 = "0.22.1" -aws-lc-rs = { version = "1.12.5", default-features = false, features = [ +aws-lc-rs = { version = "1.12.6", default-features = false, features = [ "aws-lc-sys", ] } blocking = "1.6.1" @@ -33,6 +33,6 @@ rustls-acme = { path = "../submodules/rustls-acme/", default-features = false, f "aws-lc-rs", ] } rustls-post-quantum = { version = "0.2.2", optional = true } -tokio = { version = "1.44.0", default-features = false } -tokio-util = { version = "0.7.13", default-features = false } +tokio = { version = "1.44.1", default-features = false } +tokio-util = { version = "0.7.14", default-features = false } tokio-stream = { version = "0.1.17", default-features = false } diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index 8084e0c..2e21eb1 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -33,14 +33,14 @@ mimalloc = { version = "*", default-features = false } anyhow = "1.0.97" ahash = "0.8.11" serde = { version = "1.0.219", default-features = false, features = ["derive"] } -tokio = { version = "1.44.0", default-features = false, features = [ +tokio = { version = "1.44.1", default-features = false, features = [ "net", "rt-multi-thread", "time", "sync", "macros", ] } -tokio-util = { version = "0.7.13", default-features = false } +tokio-util = { version = "0.7.14", default-features = false } async-trait = "0.1.87" futures-util = { version = "0.3.31", default-features = false } diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index d0426cf..9df0abb 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -35,7 +35,7 @@ rustls-post-quantum = { version = "0.2.2", optional = true } x509-parser = { version = "0.17.0" } [dev-dependencies] -tokio = { version = "1.44.0", default-features = false, features = [ +tokio = { version = "1.44.1", default-features = false, features = [ "rt-multi-thread", "macros", ] } diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 6b052ad..534b1ad 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -41,7 +41,7 @@ ahash = "0.8.11" bytes = "1.10.1" derive_builder = "0.20.2" futures = { version = "0.3.31", features = ["alloc", "async-await"] } -tokio = { version = "1.44.0", default-features = false, features = [ +tokio = { version = "1.44.1", default-features = false, features = [ "net", "rt-multi-thread", "time", @@ -49,7 +49,7 @@ tokio = { version = "1.44.0", default-features = false, features = [ "macros", "fs", ] } -tokio-util = { version = "0.7.13", default-features = false } +tokio-util = { version = "0.7.14", default-features = false } pin-project-lite = "0.2.16" async-trait = "0.1.87" @@ -58,8 +58,8 @@ anyhow = "1.0.97" thiserror = "2.0.12" # http for both server and client -http = "1.2.0" -http-body-util = "0.1.2" +http = "1.3.1" +http-body-util = "0.1.3" hyper = { version = "1.6.0", default-features = false } hyper-util = { version = "0.1.10", features = ["full"] } futures-util = { version = "0.3.31", default-features = false } diff --git a/submodules/rustls-acme b/submodules/rustls-acme index a65d7e7..cc7aeb8 160000 --- a/submodules/rustls-acme +++ b/submodules/rustls-acme @@ -1 +1 @@ -Subproject commit a65d7e7000b49e6e1e14daf32baee094f4d8dacd +Subproject commit cc7aeb870a62cd8d4b962de35927a241525ea30d From e95d00264ee9475467cf773a6a3960b953fab1c0 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Sat, 15 Mar 2025 20:23:59 +0900 Subject: [PATCH 056/142] update deps --- rpxy-acme/Cargo.toml | 2 +- rpxy-bin/Cargo.toml | 2 +- rpxy-certs/Cargo.toml | 2 +- rpxy-lib/Cargo.toml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index 8d5c7f5..260408c 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -18,7 +18,7 @@ url = { version = "2.5.4" } ahash = "0.8.11" thiserror = "2.0.12" tracing = "0.1.41" -async-trait = "0.1.87" +async-trait = "0.1.88" base64 = "0.22.1" aws-lc-rs = { version = "1.12.6", default-features = false, features = [ "aws-lc-sys", diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index 2e21eb1..f740614 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -41,7 +41,7 @@ tokio = { version = "1.44.1", default-features = false, features = [ "macros", ] } tokio-util = { version = "0.7.14", default-features = false } -async-trait = "0.1.87" +async-trait = "0.1.88" futures-util = { version = "0.3.31", default-features = false } # config diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index 9df0abb..a973d60 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -21,7 +21,7 @@ tracing = { version = "0.1.41" } derive_builder = { version = "0.20.2" } thiserror = { version = "2.0.12" } hot_reload = { version = "0.1.8" } -async-trait = { version = "0.1.87" } +async-trait = { version = "0.1.88" } rustls = { version = "0.23.23", default-features = false, features = [ "std", "aws_lc_rs", diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 534b1ad..df378cb 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -51,7 +51,7 @@ tokio = { version = "1.44.1", default-features = false, features = [ ] } tokio-util = { version = "0.7.14", default-features = false } pin-project-lite = "0.2.16" -async-trait = "0.1.87" +async-trait = "0.1.88" # Error handling anyhow = "1.0.97" From a2bbcccefed9cb57d49b8e8982fd993e8076ef9e Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Sat, 15 Mar 2025 20:50:59 +0900 Subject: [PATCH 057/142] fix: patch rustls-acme --- submodules/rustls-acme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/rustls-acme b/submodules/rustls-acme index cc7aeb8..6dea955 160000 --- a/submodules/rustls-acme +++ b/submodules/rustls-acme @@ -1 +1 @@ -Subproject commit cc7aeb870a62cd8d4b962de35927a241525ea30d +Subproject commit 6dea95571ec60a4b6f3b610a446ede210d972e49 From 575160a40ff984d8afb1a837c5b72f71075c3579 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Sat, 15 Mar 2025 21:34:59 +0900 Subject: [PATCH 058/142] yanked rcgen --- submodules/rustls-acme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/rustls-acme b/submodules/rustls-acme index 6dea955..cc7aeb8 160000 --- a/submodules/rustls-acme +++ b/submodules/rustls-acme @@ -1 +1 @@ -Subproject commit 6dea95571ec60a4b6f3b610a446ede210d972e49 +Subproject commit cc7aeb870a62cd8d4b962de35927a241525ea30d From 4ea533bc35b360ff8f3368f7107e94405df6d9f4 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Mon, 17 Mar 2025 12:58:05 +0900 Subject: [PATCH 059/142] dep: h3 (s2n-quic-h3) --- submodules/s2n-quic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/s2n-quic b/submodules/s2n-quic index 35b6089..2d9b871 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit 35b60899586e5d5a8bca28ea6c418428350f89be +Subproject commit 2d9b87175705d481cd1368b828ca9f3cc955c8c4 From e35addf4d975b1904581c2d1e354c81aa6d41614 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Mon, 17 Mar 2025 13:23:39 +0900 Subject: [PATCH 060/142] dep: h3 (s2n-quic-h3) --- rpxy-lib/Cargo.toml | 4 ++-- rpxy-lib/src/proxy/proxy_h3.rs | 2 +- submodules/s2n-quic | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index df378cb..986a197 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -92,8 +92,8 @@ tracing = { version = "0.1.41" } # http/3 quinn = { version = "0.11.6", optional = true } -h3 = { version = "0.0.6", features = ["tracing"], optional = true } -h3-quinn = { version = "0.0.7", optional = true } +h3 = { version = "0.0.7", features = ["tracing"], optional = true } +h3-quinn = { version = "0.0.8", optional = true } s2n-quic = { version = "1.55.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [ "provider-tls-rustls", ], optional = true } diff --git a/rpxy-lib/src/proxy/proxy_h3.rs b/rpxy-lib/src/proxy/proxy_h3.rs index 358dd9e..c1c293f 100644 --- a/rpxy-lib/src/proxy/proxy_h3.rs +++ b/rpxy-lib/src/proxy/proxy_h3.rs @@ -129,7 +129,7 @@ where } // trailers: use inner for work around. (directly get trailer) - let trailers = recv_stream.as_mut().recv_trailers().await?; + let trailers = futures_util::future::poll_fn(|cx| recv_stream.as_mut().poll_recv_trailers(cx)).await?; if trailers.is_some() { debug!("HTTP/3 incoming request trailers"); sender.send_trailers(trailers.unwrap()).await?; diff --git a/submodules/s2n-quic b/submodules/s2n-quic index 2d9b871..1142450 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit 2d9b87175705d481cd1368b828ca9f3cc955c8c4 +Subproject commit 11424508afe1f3b84e6924b07142a5203aa7e14b From fd18dede2f7602b98614a2788d90e820a2a60edf Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Mon, 17 Mar 2025 19:21:08 +0900 Subject: [PATCH 061/142] chore deps --- rpxy-acme/Cargo.toml | 2 +- rpxy-certs/Cargo.toml | 2 +- rpxy-lib/Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index 260408c..78c9164 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -24,7 +24,7 @@ aws-lc-rs = { version = "1.12.6", default-features = false, features = [ "aws-lc-sys", ] } blocking = "1.6.1" -rustls = { version = "0.23.23", default-features = false, features = [ +rustls = { version = "0.23.24", default-features = false, features = [ "std", "aws_lc_rs", ] } diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index a973d60..3055225 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -22,7 +22,7 @@ derive_builder = { version = "0.20.2" } thiserror = { version = "2.0.12" } hot_reload = { version = "0.1.8" } async-trait = { version = "0.1.88" } -rustls = { version = "0.23.23", default-features = false, features = [ +rustls = { version = "0.23.24", default-features = false, features = [ "std", "aws_lc_rs", ] } diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 986a197..8b7359b 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -80,7 +80,7 @@ hyper-rustls = { version = "0.27.5", default-features = false, features = [ # tls and cert management for server rpxy-certs = { path = "../rpxy-certs/", default-features = false } hot_reload = "0.1.8" -rustls = { version = "0.23.23", default-features = false } +rustls = { version = "0.23.24", default-features = false } rustls-post-quantum = { version = "0.2.2", optional = true } tokio-rustls = { version = "0.26.2", features = ["early-data"] } From 5637002200bbe56917a2e835b7e156c8f06eb052 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Mon, 17 Mar 2025 19:34:27 +0900 Subject: [PATCH 062/142] chore update --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d9c9478..f9ce36a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,4 +18,4 @@ jobs: submodules: recursive - name: Run unit tests run: | - cargo test --verbose + cargo update && cargo test --verbose From 3e1204c8328bbd655e387a0b712a1f35af8d4acc Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Mon, 17 Mar 2025 21:35:49 +0900 Subject: [PATCH 063/142] fix: downgrade and pin rustls-0.23.23 --- rpxy-acme/Cargo.toml | 2 +- rpxy-certs/Cargo.toml | 2 +- rpxy-lib/Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index 78c9164..8e6f004 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -24,7 +24,7 @@ aws-lc-rs = { version = "1.12.6", default-features = false, features = [ "aws-lc-sys", ] } blocking = "1.6.1" -rustls = { version = "0.23.24", default-features = false, features = [ +rustls = { version = "=0.23.23", default-features = false, features = [ "std", "aws_lc_rs", ] } diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index 3055225..e548898 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -22,7 +22,7 @@ derive_builder = { version = "0.20.2" } thiserror = { version = "2.0.12" } hot_reload = { version = "0.1.8" } async-trait = { version = "0.1.88" } -rustls = { version = "0.23.24", default-features = false, features = [ +rustls = { version = "=0.23.23", default-features = false, features = [ "std", "aws_lc_rs", ] } diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 8b7359b..a4e23be 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -80,7 +80,7 @@ hyper-rustls = { version = "0.27.5", default-features = false, features = [ # tls and cert management for server rpxy-certs = { path = "../rpxy-certs/", default-features = false } hot_reload = "0.1.8" -rustls = { version = "0.23.24", default-features = false } +rustls = { version = "=0.23.23", default-features = false } rustls-post-quantum = { version = "0.2.2", optional = true } tokio-rustls = { version = "0.26.2", features = ["early-data"] } From ffd3e802c58a5738dea81419aa2dd58082872a5a Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Tue, 18 Mar 2025 23:59:45 +0900 Subject: [PATCH 064/142] [ci skip] fix: typo --- README.md | 2 -- config-example.toml | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 912ed62..6a918e5 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,6 @@ Supported features are summarized as follows: This project is still *work-in-progress*. But it is already working in some production environments and serves a number of domain names. Furthermore it *significantly outperforms* NGINX and Caddy, e.g., *1.5x faster than NGINX*, in the setting of a very simple HTTP reverse-proxy scenario (See [`bench`](./bench/) directory). - ## Installing/Building an Executable Binary of `rpxy` ### Building from Source @@ -446,7 +445,6 @@ todo! - [`s2n-quic`](https://github.com/aws/s2n-quic) - [`rustls-acme`](https://github.com/FlorianUekermann/rustls-acme) - ## License `rpxy` is free, open-source software licensed under MIT License. diff --git a/config-example.toml b/config-example.toml index a6a215e..8ed7621 100644 --- a/config-example.toml +++ b/config-example.toml @@ -28,10 +28,10 @@ max_clients = 512 listen_ipv6 = false # Optional: App that serves all plaintext http request by referring to HOSTS or request header -# execpt for configured application. +# except for configured application. # Note that this is only for http. # Note that nothing is served for requests via https since secure channel cannot be -# established for unconfigured server_name, and they are always rejected by checking SNI. +# established for non-configured server_name, and they are always rejected by checking SNI. default_app = 'another_localhost' ################################### @@ -106,7 +106,7 @@ tls = { https_redirection = true, acme = true } # Experimantal settings # ################################### [experimental] -# Higly recommend not to be true. If true, you ignore RFC. if not specified, it is always false. +# Highly recommend not to be true. If true, you ignore RFC. if not specified, it is always false. # This might be required to be true when a certificate is used by multiple backend hosts, especially in case where a TLS connection is re-used. # We should note that this strongly depends on the client implementation. ignore_sni_consistency = false From 690a364a7d931347db4efda5e23866bc438c93c3 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 19 Mar 2025 00:53:39 +0900 Subject: [PATCH 065/142] [skip ci] docs: update readme --- README.md | 3 +++ rpxy-acme/Cargo.toml | 4 ++-- rpxy-certs/Cargo.toml | 2 +- rpxy-lib/Cargo.toml | 4 ++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6a918e5..c7a1183 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,9 @@ > **WIP Project** +> [!NOTE] +> This project is an HTTP, i.e., Layer 7, reverse-proxy. If you are looking for a TCP/UDP, i.e., Layer 4, reverse-proxy, please check my another project, [`rpxy-l4`](https://github.com/junkurihara/rust-rpxy-l4). + ## Introduction `rpxy` [ahr-pik-see] is an implementation of simple and lightweight reverse-proxy with some additional features. The implementation is based on [`hyper`](https://github.com/hyperium/hyper), [`rustls`](https://github.com/rustls/rustls) and [`tokio`](https://github.com/tokio-rs/tokio), i.e., written in Rust [^pure_rust]. Our `rpxy` routes multiple host names to appropriate backend application servers while serving TLS connections. diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index 8e6f004..07c3b9f 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -24,11 +24,11 @@ aws-lc-rs = { version = "1.12.6", default-features = false, features = [ "aws-lc-sys", ] } blocking = "1.6.1" -rustls = { version = "=0.23.23", default-features = false, features = [ +rustls = { version = "0.23.25", default-features = false, features = [ "std", "aws_lc_rs", ] } -rustls-platform-verifier = { version = "0.5.0" } +rustls-platform-verifier = { version = "0.5.1" } rustls-acme = { path = "../submodules/rustls-acme/", default-features = false, features = [ "aws-lc-rs", ] } diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index e548898..06b7297 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -22,7 +22,7 @@ derive_builder = { version = "0.20.2" } thiserror = { version = "2.0.12" } hot_reload = { version = "0.1.8" } async-trait = { version = "0.1.88" } -rustls = { version = "=0.23.23", default-features = false, features = [ +rustls = { version = "0.23.25", default-features = false, features = [ "std", "aws_lc_rs", ] } diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index a4e23be..84a7f22 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -80,7 +80,7 @@ hyper-rustls = { version = "0.27.5", default-features = false, features = [ # tls and cert management for server rpxy-certs = { path = "../rpxy-certs/", default-features = false } hot_reload = "0.1.8" -rustls = { version = "=0.23.23", default-features = false } +rustls = { version = "0.23.25", default-features = false } rustls-post-quantum = { version = "0.2.2", optional = true } tokio-rustls = { version = "0.26.2", features = ["early-data"] } @@ -91,7 +91,7 @@ rpxy-acme = { path = "../rpxy-acme/", default-features = false, optional = true tracing = { version = "0.1.41" } # http/3 -quinn = { version = "0.11.6", optional = true } +quinn = { version = "0.11.7", optional = true } h3 = { version = "0.0.7", features = ["tracing"], optional = true } h3-quinn = { version = "0.0.8", optional = true } s2n-quic = { version = "1.55.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [ From 5796348acbb618ce95f53f657d38f15f8e45cc87 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 19 Mar 2025 01:08:06 +0900 Subject: [PATCH 066/142] fix: add Cargo lock to avoid hazard... --- .gitignore | 4 - Cargo.lock | 3653 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 3653 insertions(+), 4 deletions(-) create mode 100644 Cargo.lock diff --git a/.gitignore b/.gitignore index 9122944..f53ee49 100644 --- a/.gitignore +++ b/.gitignore @@ -8,9 +8,5 @@ docker/config # will have compiled files and executables /target/ -# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries -# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html -Cargo.lock - # These are backup files generated by rustfmt **/*.rs.bk diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..c3c89b4 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,3653 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "getrandom 0.2.15", + "once_cell", + "version_check", + "zerocopy 0.7.35", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anstream" +version = "0.6.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" + +[[package]] +name = "anstyle-parse" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" +dependencies = [ + "anstyle", + "once_cell", + "windows-sys 0.59.0", +] + +[[package]] +name = "anyhow" +version = "1.0.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" + +[[package]] +name = "asn1-rs" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56624a96882bb8c26d61312ae18cb45868e5a9992ea73c58e45c3101e56a1e60" +dependencies = [ + "asn1-rs-derive", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror 2.0.12", + "time", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3109e49b1e4909e9db6515a30c633684d68cdeaa252f215214cb4fa1a5bfee2c" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "asn1-rs-impl" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "async-channel" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-http-codec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "096146020b08dbc4587685b0730a7ba905625af13c65f8028035cdfd69573c91" +dependencies = [ + "anyhow", + "futures", + "http", + "httparse", + "log", +] + +[[package]] +name = "async-io" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a2b323ccce0a1d90b449fd71f2a06ca7faa7c54c2751f06c9bd851fc061059" +dependencies = [ + "async-lock", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling", + "rustix 0.38.44", + "slab", + "tracing", + "windows-sys 0.59.0", +] + +[[package]] +name = "async-lock" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" +dependencies = [ + "event-listener", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-net" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7" +dependencies = [ + "async-io", + "blocking", + "futures-lite", +] + +[[package]] +name = "async-stream" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + +[[package]] +name = "async-trait" +version = "0.1.88" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "async-web-client" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37381fb4fad3cd9b579628c21a58f528ef029d1f072d10f16cb9431aa2236d29" +dependencies = [ + "async-http-codec", + "async-net", + "futures", + "futures-rustls", + "http", + "lazy_static", + "log", + "rustls-pki-types", + "thiserror 1.0.69", + "webpki-roots", +] + +[[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.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "aws-lc-rs" +version = "1.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dabb68eb3a7aa08b46fddfd59a3d55c978243557a90ab804769f7e20e67d2b01" +dependencies = [ + "aws-lc-sys", + "untrusted 0.7.1", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77926887776171ced7d662120a75998e444d3750c951abfe07f90da130514b1f" +dependencies = [ + "bindgen", + "cc", + "cmake", + "dunce", + "fs_extra", +] + +[[package]] +name = "backtrace" +version = "0.3.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets 0.52.6", +] + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bindgen" +version = "0.69.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" +dependencies = [ + "bitflags", + "cexpr", + "clang-sys", + "itertools", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash 1.1.0", + "shlex", + "syn", + "which", +] + +[[package]] +name = "bitflags" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "blocking" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" +dependencies = [ + "async-channel", + "async-task", + "futures-io", + "futures-lite", + "piper", +] + +[[package]] +name = "bumpalo" +version = "3.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" + +[[package]] +name = "cc" +version = "1.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c" +dependencies = [ + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] +name = "chrono" +version = "0.4.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "num-traits", + "pure-rust-locales", + "windows-link", +] + +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "clap" +version = "4.5.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6088f3ae8c3608d19260cd7445411865a485688711b78b5be70d78cd96136f83" +dependencies = [ + "clap_builder", +] + +[[package]] +name = "clap_builder" +version = "4.5.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22a7ef7f676155edfb82daa97f99441f3ebf4a58d5e32f295a56259f1b6facc8" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", + "terminal_size", +] + +[[package]] +name = "clap_lex" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" + +[[package]] +name = "cmake" +version = "0.1.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0" +dependencies = [ + "cc", +] + +[[package]] +name = "colorchoice" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" + +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "cuckoofilter" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b810a8449931679f64cd7eef1bbd0fa315801b6d5d9cdc1ace2804d6529eee18" +dependencies = [ + "byteorder", + "fnv", + "rand 0.7.3", +] + +[[package]] +name = "darling" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +dependencies = [ + "darling_core", + "quote", + "syn", +] + +[[package]] +name = "data-encoding" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "575f75dfd25738df5b91b8e43e14d44bda14637a58fae779fd2b064f8bf3e010" + +[[package]] +name = "der-parser" +version = "10.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07da5016415d5a3c4dd39b11ed26f915f52fc4e0dc197d87908bc916e51bc1a6" +dependencies = [ + "asn1-rs", + "displaydoc", + "nom", + "num-bigint", + "num-traits", + "rusticata-macros", +] + +[[package]] +name = "deranged" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derive_builder" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "derive_builder_macro" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" +dependencies = [ + "derive_builder_core", + "syn", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "event-listener" +version = "5.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c3e4e0dd3673c1139bf041f3008816d9cf2946bbfac2945c09e523b8d7b05b2" +dependencies = [ + "event-listener", + "pin-project-lite", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-lite" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5edaec856126859abb19ed65f39e90fea3a9574b9707f13539acf4abf7eb532" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f2f12607f92c69b12ed746fabf9ca4f5c482cba46679c1a75b874ed7c26adb" +dependencies = [ + "futures-io", + "rustls", + "rustls-pki-types", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", + "wasm-bindgen", +] + +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + +[[package]] +name = "glob" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" + +[[package]] +name = "h2" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5017294ff4bb30944501348f6f8e42e6ad28f42c8bbef7a74029aff064a4e3c2" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h3" +version = "0.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dfb059a4f28a66f186ed16ad912d142f490676acba59353831d7cb45a96b0d3" +dependencies = [ + "bytes", + "fastrand", + "futures-util", + "http", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "h3-quinn" +version = "0.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "690cbdc6600db8490412edf5e2bbec0c88f4d4e83f9e0800428b51e6c23372dc" +dependencies = [ + "bytes", + "futures", + "h3", + "quinn", + "tokio", + "tokio-util", +] + +[[package]] +name = "hash_hasher" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74721d007512d0cb3338cd20f0654ac913920061a4c4d0d8708edb3f2a698c0c" + +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + +[[package]] +name = "home" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "hot_reload" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7868e56f0992d2573ed9aedcf0406d5be7b6799f277f7fec1994c4e24c1ce63a" +dependencies = [ + "anyhow", + "async-trait", + "thiserror 1.0.69", + "tokio", + "tracing", +] + +[[package]] +name = "http" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "http-cache-semantics" +version = "2.1.0" +dependencies = [ + "http", + "time", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" +dependencies = [ + "futures-util", + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "rustls-platform-verifier", + "tokio", + "tokio-rustls", + "tower-service", + "webpki-roots", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "intrusive-collections" +version = "0.9.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "189d0897e4cbe8c75efedf3502c18c887b05046e59d28404d4d8e46cbc4d1e86" +dependencies = [ + "memoffset", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys", + "log", + "thiserror 1.0.69", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "libc" +version = "0.2.171" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" + +[[package]] +name = "libloading" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +dependencies = [ + "cfg-if", + "windows-targets 0.52.6", +] + +[[package]] +name = "libm" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" + +[[package]] +name = "libmimalloc-sys" +version = "0.1.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23aa6811d3bd4deb8a84dde645f943476d13b248d818edcf8ce0b2f37f036b44" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "linux-raw-sys" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413" + +[[package]] +name = "litemap" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" + +[[package]] +name = "log" +version = "0.4.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" + +[[package]] +name = "lru" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "227748d55f2f0ab4735d87fd623798cb6b664512fe979705f829c9f81c934465" +dependencies = [ + "hashbrown", +] + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "mimalloc" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68914350ae34959d83f732418d51e2427a794055d0b9529f48259ac07af65633" +dependencies = [ + "libmimalloc-sys", +] + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +dependencies = [ + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.52.0", +] + +[[package]] +name = "native-tls" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework 2.11.1", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "object" +version = "0.36.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "memchr", +] + +[[package]] +name = "oid-registry" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f40cff3dde1b6087cc5d5f5d4d65712f34016a03ed60e9c08dcc392736b5b7" +dependencies = [ + "asn1-rs", +] + +[[package]] +name = "once_cell" +version = "1.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d75b0bedcc4fe52caa0e03d9f1151a323e4aa5e2d78ba3580400cd3c9e2bc4bc" + +[[package]] +name = "openssl" +version = "0.10.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" +dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "openssl-src" +version = "300.4.2+3.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168ce4e058f975fe43e89d9ccf78ca668601887ae736090aacc23ae353c298e2" +dependencies = [ + "cc", +] + +[[package]] +name = "openssl-sys" +version = "0.9.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd" +dependencies = [ + "cc", + "libc", + "openssl-src", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "pem" +version = "3.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38af38e8470ac9dee3ce1bae1af9c1671fffc44ddfd8bd1d0a3445bf349a8ef3" +dependencies = [ + "base64", + "serde", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "piper" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" +dependencies = [ + "atomic-waker", + "fastrand", + "futures-io", +] + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "polling" +version = "3.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix 0.38.44", + "tracing", + "windows-sys 0.59.0", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy 0.8.23", +] + +[[package]] +name = "prettyplease" +version = "0.2.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5316f57387668042f561aae71480de936257848f9c43ce528e311d89a07cadeb" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro2" +version = "1.0.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "pure-rust-locales" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1190fd18ae6ce9e137184f207593877e70f39b015040156b1e05081cdfe3733a" + +[[package]] +name = "quinn" +version = "0.11.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3bd15a6f2967aef83887dcb9fec0014580467e33720d073560cf015a5683012" +dependencies = [ + "bytes", + "cfg_aliases", + "futures-io", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash 2.1.1", + "rustls", + "socket2", + "thiserror 2.0.12", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b820744eb4dc9b57a3398183639c511b5a26d2ed702cedd3febaa1393caa22cc" +dependencies = [ + "bytes", + "getrandom 0.3.2", + "rand 0.9.0", + "ring", + "rustc-hash 2.1.1", + "rustls", + "rustls-pki-types", + "rustls-platform-verifier", + "slab", + "thiserror 2.0.12", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e46f3055866785f6b92bc6164b76be02ca8f2eb4b002c0354b28cf4c119e5944" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.59.0", +] + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", + "zerocopy 0.8.23", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.2", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rcgen" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75e669e5202259b5314d1ea5397316ad400819437857b90861765f24c4cf80a2" +dependencies = [ + "aws-lc-rs", + "pem", + "rustls-pki-types", + "time", + "yasna", +] + +[[package]] +name = "regex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.5", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.15", + "libc", + "untrusted 0.9.0", + "windows-sys 0.52.0", +] + +[[package]] +name = "rpxy" +version = "0.9.7" +dependencies = [ + "ahash", + "anyhow", + "async-trait", + "clap", + "futures-util", + "hot_reload", + "mimalloc", + "rpxy-acme", + "rpxy-certs", + "rpxy-lib", + "serde", + "serde_ignored", + "tokio", + "tokio-util", + "toml", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "rpxy-acme" +version = "0.9.7" +dependencies = [ + "ahash", + "async-trait", + "aws-lc-rs", + "base64", + "blocking", + "rustls", + "rustls-acme", + "rustls-platform-verifier", + "rustls-post-quantum", + "thiserror 2.0.12", + "tokio", + "tokio-stream", + "tokio-util", + "tracing", + "url", +] + +[[package]] +name = "rpxy-certs" +version = "0.9.7" +dependencies = [ + "ahash", + "async-trait", + "derive_builder", + "hot_reload", + "rustls", + "rustls-pemfile", + "rustls-post-quantum", + "rustls-webpki 0.103.0", + "thiserror 2.0.12", + "tokio", + "tracing", + "x509-parser", +] + +[[package]] +name = "rpxy-lib" +version = "0.9.7" +dependencies = [ + "ahash", + "anyhow", + "async-trait", + "base64", + "bytes", + "chrono", + "derive_builder", + "futures", + "futures-channel", + "futures-util", + "h3", + "h3-quinn", + "hot_reload", + "http", + "http-body-util", + "http-cache-semantics", + "hyper", + "hyper-rustls", + "hyper-tls", + "hyper-util", + "lru", + "pin-project-lite", + "quinn", + "rand 0.9.0", + "rpxy-acme", + "rpxy-certs", + "rustls", + "rustls-post-quantum", + "s2n-quic", + "s2n-quic-core", + "s2n-quic-h3", + "s2n-quic-rustls", + "sha2", + "socket2", + "thiserror 2.0.12", + "tokio", + "tokio-rustls", + "tokio-test", + "tokio-util", + "tracing", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + +[[package]] +name = "rusticata-macros" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" +dependencies = [ + "nom", +] + +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustix" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e56a18552996ac8d29ecc3b190b4fdbb2d91ca4ec396de7bbffaf43f3d637e96" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys 0.9.3", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustls" +version = "0.23.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47796c98c480fce5406ef69d1c76378375492c3b0a0de587be0c1d9feb12f395" +dependencies = [ + "aws-lc-rs", + "log", + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki 0.102.8", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-acme" +version = "0.13.0" +dependencies = [ + "async-io", + "async-trait", + "async-web-client", + "aws-lc-rs", + "base64", + "blocking", + "chrono", + "futures", + "futures-rustls", + "http", + "log", + "pem", + "rcgen", + "serde", + "serde_json", + "thiserror 2.0.12", + "webpki-roots", + "x509-parser", +] + +[[package]] +name = "rustls-native-certs" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3" +dependencies = [ + "openssl-probe", + "rustls-pki-types", + "schannel", + "security-framework 3.2.0", +] + +[[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.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" +dependencies = [ + "web-time", +] + +[[package]] +name = "rustls-platform-verifier" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e012c45844a1790332c9386ed4ca3a06def221092eda277e6f079728f8ea99da" +dependencies = [ + "core-foundation 0.10.0", + "core-foundation-sys", + "jni", + "log", + "once_cell", + "rustls", + "rustls-native-certs", + "rustls-platform-verifier-android", + "rustls-webpki 0.102.8", + "security-framework 3.2.0", + "security-framework-sys", + "webpki-root-certs", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls-platform-verifier-android" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" + +[[package]] +name = "rustls-post-quantum" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8c6beb003fcb6dbc9a52bd5f11203525f1c7ca3dfb487ab4bd4d17e481af95b" +dependencies = [ + "rustls", +] + +[[package]] +name = "rustls-webpki" +version = "0.102.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +dependencies = [ + "aws-lc-rs", + "ring", + "rustls-pki-types", + "untrusted 0.9.0", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aa4eeac2588ffff23e9d7a7e9b3f971c5fb5b7ebc9452745e0c232c64f83b2f" +dependencies = [ + "aws-lc-rs", + "ring", + "rustls-pki-types", + "untrusted 0.9.0", +] + +[[package]] +name = "rustversion" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "s2n-codec" +version = "0.55.0" +dependencies = [ + "byteorder", + "bytes", + "zerocopy 0.8.23", +] + +[[package]] +name = "s2n-quic" +version = "1.55.0" +dependencies = [ + "bytes", + "cfg-if", + "cuckoofilter", + "futures", + "hash_hasher", + "rand 0.9.0", + "rand_chacha 0.9.0", + "s2n-codec", + "s2n-quic-core", + "s2n-quic-crypto", + "s2n-quic-platform", + "s2n-quic-rustls", + "s2n-quic-tls-default", + "s2n-quic-transport", + "tokio", + "zerocopy 0.8.23", + "zeroize", +] + +[[package]] +name = "s2n-quic-core" +version = "0.55.0" +dependencies = [ + "atomic-waker", + "byteorder", + "bytes", + "cfg-if", + "crossbeam-utils", + "hex-literal", + "num-rational", + "num-traits", + "once_cell", + "pin-project-lite", + "s2n-codec", + "subtle", + "zerocopy 0.8.23", +] + +[[package]] +name = "s2n-quic-crypto" +version = "0.55.0" +dependencies = [ + "aws-lc-rs", + "cfg-if", + "lazy_static", + "s2n-codec", + "s2n-quic-core", + "zeroize", +] + +[[package]] +name = "s2n-quic-h3" +version = "0.1.0" +dependencies = [ + "bytes", + "futures", + "h3", + "s2n-quic", + "tracing", +] + +[[package]] +name = "s2n-quic-platform" +version = "0.55.0" +dependencies = [ + "cfg-if", + "futures", + "lazy_static", + "libc", + "s2n-quic-core", + "socket2", + "tokio", +] + +[[package]] +name = "s2n-quic-rustls" +version = "0.55.0" +dependencies = [ + "bytes", + "rustls", + "rustls-pemfile", + "rustls-post-quantum", + "s2n-codec", + "s2n-quic-core", + "s2n-quic-crypto", +] + +[[package]] +name = "s2n-quic-tls" +version = "0.55.0" +dependencies = [ + "bytes", + "errno", + "libc", + "s2n-codec", + "s2n-quic-core", + "s2n-quic-crypto", + "s2n-tls", +] + +[[package]] +name = "s2n-quic-tls-default" +version = "0.55.0" +dependencies = [ + "s2n-quic-rustls", + "s2n-quic-tls", +] + +[[package]] +name = "s2n-quic-transport" +version = "0.55.0" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "hashbrown", + "intrusive-collections", + "once_cell", + "s2n-codec", + "s2n-quic-core", + "siphasher", + "smallvec", +] + +[[package]] +name = "s2n-tls" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "331e244d4ac5b727bc9c40f8ef0e6a11c0dc5f523ba777778e46d7b4dc926839" +dependencies = [ + "errno", + "hex", + "libc", + "pin-project-lite", + "s2n-tls-sys", +] + +[[package]] +name = "s2n-tls-sys" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d08dfb78b8616abfde3d1432f409ca050e01fd6c8f3b83c1fa01c5266e954a" +dependencies = [ + "aws-lc-rs", + "cc", + "libc", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags", + "core-foundation 0.9.4", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" +dependencies = [ + "bitflags", + "core-foundation 0.10.0", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "serde" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_ignored" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "566da67d80e92e009728b3731ff0e5360cb181432b8ca73ea30bb1d170700d76" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_json" +version = "1.0.140" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "serde_spanned" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +dependencies = [ + "serde", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "siphasher" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" + +[[package]] +name = "socket2" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "2.0.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tempfile" +version = "3.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488960f40a3fd53d72c2a29a58722561dee8afdd175bd88e3db4677d7b2ba600" +dependencies = [ + "fastrand", + "getrandom 0.3.2", + "once_cell", + "rustix 1.0.3", + "windows-sys 0.59.0", +] + +[[package]] +name = "terminal_size" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45c6481c4829e4cc63825e62c49186a34538b7b2750b73b266581ffb612fb5ed" +dependencies = [ + "rustix 1.0.3", + "windows-sys 0.59.0", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +dependencies = [ + "thiserror-impl 2.0.12", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "time" +version = "0.3.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d9c75b47bdff86fa3334a3db91356b8d7d86a9b839dab7d0bdc5c3d3a077618" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" + +[[package]] +name = "time-macros" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29aa485584182073ed57fd5004aa09c371f021325014694e432313345865fd04" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.44.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f382da615b842244d4b8738c82ed1275e6c5dd90c459a30941cd07080b06c91a" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2", + "tokio-macros", + "windows-sys 0.52.0", +] + +[[package]] +name = "tokio-macros" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-test" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2468baabc3311435b55dd935f702f42cd1b8abb7e754fb7dfb16bd36aa88f9f7" +dependencies = [ + "async-stream", + "bytes", + "futures-core", + "tokio", + "tokio-stream", +] + +[[package]] +name = "tokio-util" +version = "0.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b9590b93e6fcc1739458317cccd391ad3955e2bde8913edf6f95f9e65a8f034" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typenum" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" + +[[package]] +name = "unicode-ident" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +dependencies = [ + "bumpalo", + "log", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-root-certs" +version = "0.26.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09aed61f5e8d2c18344b3faa33a4c837855fe56642757754775548fee21386c4" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "webpki-roots" +version = "0.26.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2210b291f7ea53617fbafcc4939f10914214ec15aace5ba62293a668f322c5c9" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix 0.38.44", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-link" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e97b544156e9bebe1a0ffbc03484fc1ffe3100cbce3ffb17eac35f7cdd7ab36" +dependencies = [ + "memchr", +] + +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags", +] + +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + +[[package]] +name = "x509-parser" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4569f339c0c402346d4a75a9e39cf8dad310e287eef1ff56d4c68e5067f53460" +dependencies = [ + "asn1-rs", + "data-encoding", + "der-parser", + "lazy_static", + "nom", + "oid-registry", + "rusticata-macros", + "thiserror 2.0.12", + "time", +] + +[[package]] +name = "yasna" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" +dependencies = [ + "time", +] + +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "zerocopy-derive 0.7.35", +] + +[[package]] +name = "zerocopy" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd97444d05a4328b90e75e503a34bad781f14e28a823ad3557f0750df1ebcbc6" +dependencies = [ + "zerocopy-derive 0.8.23", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6352c01d0edd5db859a63e2605f4ea3183ddbd15e2c4a9e7d32184df75e4f154" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] From 7c4f53c571b48884bd3ab900824e305bd3331166 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 19 Mar 2025 01:16:21 +0900 Subject: [PATCH 067/142] fix: cargo lock... hazardous situation... --- Cargo.lock | 105 +++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 90 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c3c89b4..e749dfc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -957,11 +957,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" dependencies = [ "cfg-if", - "js-sys", "libc", "r-efi", "wasi 0.14.2+wasi-0.2.4", - "wasm-bindgen", ] [[package]] @@ -1168,7 +1166,7 @@ dependencies = [ "hyper-util", "rustls", "rustls-pki-types", - "rustls-platform-verifier", + "rustls-platform-verifier 0.5.0", "tokio", "tokio-rustls", "tower-service", @@ -1418,6 +1416,20 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +[[package]] +name = "jni" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec" +dependencies = [ + "cesu8", + "combine", + "jni-sys", + "log", + "thiserror 1.0.69", + "walkdir", +] + [[package]] name = "jni" version = "0.21.1" @@ -1869,12 +1881,11 @@ checksum = "1190fd18ae6ce9e137184f207593877e70f39b015040156b1e05081cdfe3733a" [[package]] name = "quinn" -version = "0.11.7" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3bd15a6f2967aef83887dcb9fec0014580467e33720d073560cf015a5683012" +checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" dependencies = [ "bytes", - "cfg_aliases", "futures-io", "pin-project-lite", "quinn-proto", @@ -1885,23 +1896,22 @@ dependencies = [ "thiserror 2.0.12", "tokio", "tracing", - "web-time", ] [[package]] name = "quinn-proto" -version = "0.11.10" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b820744eb4dc9b57a3398183639c511b5a26d2ed702cedd3febaa1393caa22cc" +checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" dependencies = [ "bytes", - "getrandom 0.3.2", - "rand 0.9.0", + "getrandom 0.2.15", + "rand 0.8.5", "ring", "rustc-hash 2.1.1", "rustls", "rustls-pki-types", - "rustls-platform-verifier", + "rustls-platform-verifier 0.4.0", "slab", "thiserror 2.0.12", "tinyvec", @@ -1951,6 +1961,17 @@ dependencies = [ "rand_hc", ] +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + [[package]] name = "rand" version = "0.9.0" @@ -1972,6 +1993,16 @@ dependencies = [ "rand_core 0.5.1", ] +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + [[package]] name = "rand_chacha" version = "0.9.0" @@ -1991,6 +2022,15 @@ dependencies = [ "getrandom 0.1.16", ] +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.15", +] + [[package]] name = "rand_core" version = "0.9.3" @@ -2114,7 +2154,7 @@ dependencies = [ "blocking", "rustls", "rustls-acme", - "rustls-platform-verifier", + "rustls-platform-verifier 0.5.0", "rustls-post-quantum", "thiserror 2.0.12", "tokio", @@ -2281,6 +2321,19 @@ dependencies = [ "x509-parser", ] +[[package]] +name = "rustls-native-certs" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "rustls-pki-types", + "schannel", + "security-framework 2.11.1", +] + [[package]] name = "rustls-native-certs" version = "0.8.1" @@ -2311,6 +2364,27 @@ dependencies = [ "web-time", ] +[[package]] +name = "rustls-platform-verifier" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c7dc240fec5517e6c4eab3310438636cfe6391dfc345ba013109909a90d136" +dependencies = [ + "core-foundation 0.9.4", + "core-foundation-sys", + "jni 0.19.0", + "log", + "once_cell", + "rustls", + "rustls-native-certs 0.7.3", + "rustls-platform-verifier-android", + "rustls-webpki 0.102.8", + "security-framework 2.11.1", + "security-framework-sys", + "webpki-root-certs", + "windows-sys 0.52.0", +] + [[package]] name = "rustls-platform-verifier" version = "0.5.0" @@ -2319,11 +2393,11 @@ checksum = "e012c45844a1790332c9386ed4ca3a06def221092eda277e6f079728f8ea99da" dependencies = [ "core-foundation 0.10.0", "core-foundation-sys", - "jni", + "jni 0.21.1", "log", "once_cell", "rustls", - "rustls-native-certs", + "rustls-native-certs 0.8.1", "rustls-platform-verifier-android", "rustls-webpki 0.102.8", "security-framework 3.2.0", @@ -2572,6 +2646,7 @@ dependencies = [ "core-foundation 0.9.4", "core-foundation-sys", "libc", + "num-bigint", "security-framework-sys", ] From 52335ddfdbcc4507834e2856ea7a55dee0240260 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 19 Mar 2025 01:17:30 +0900 Subject: [PATCH 068/142] fix --- Cargo.lock | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c3c89b4..812aea3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2135,7 +2135,7 @@ dependencies = [ "rustls", "rustls-pemfile", "rustls-post-quantum", - "rustls-webpki 0.103.0", + "rustls-webpki", "thiserror 2.0.12", "tokio", "tracing", @@ -2243,16 +2243,16 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.23" +version = "0.23.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47796c98c480fce5406ef69d1c76378375492c3b0a0de587be0c1d9feb12f395" +checksum = "822ee9188ac4ec04a2f0531e55d035fb2de73f18b41a63c70c2712503b6fb13c" dependencies = [ "aws-lc-rs", "log", "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.102.8", + "rustls-webpki", "subtle", "zeroize", ] @@ -2313,9 +2313,9 @@ dependencies = [ [[package]] name = "rustls-platform-verifier" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e012c45844a1790332c9386ed4ca3a06def221092eda277e6f079728f8ea99da" +checksum = "4a5467026f437b4cb2a533865eaa73eb840019a0916f4b9ec563c6e617e086c9" dependencies = [ "core-foundation 0.10.0", "core-foundation-sys", @@ -2325,11 +2325,11 @@ dependencies = [ "rustls", "rustls-native-certs", "rustls-platform-verifier-android", - "rustls-webpki 0.102.8", + "rustls-webpki", "security-framework 3.2.0", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2347,18 +2347,6 @@ dependencies = [ "rustls", ] -[[package]] -name = "rustls-webpki" -version = "0.102.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" -dependencies = [ - "aws-lc-rs", - "ring", - "rustls-pki-types", - "untrusted 0.9.0", -] - [[package]] name = "rustls-webpki" version = "0.103.0" From 59eed264da2ab434785cdc28e6e089c05438a174 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 19 Mar 2025 01:18:36 +0900 Subject: [PATCH 069/142] remove cargo update from test --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f9ce36a..d9c9478 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,4 +18,4 @@ jobs: submodules: recursive - name: Run unit tests run: | - cargo update && cargo test --verbose + cargo test --verbose From 708b77b8a460b86bc1141d821da61872520eecce Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 19 Mar 2025 01:24:36 +0900 Subject: [PATCH 070/142] fixed by updating h3-quinn --- .github/workflows/ci.yml | 2 +- Cargo.lock | 4 ++-- rpxy-lib/Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f9ce36a..d9c9478 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,4 +18,4 @@ jobs: submodules: recursive - name: Run unit tests run: | - cargo update && cargo test --verbose + cargo test --verbose diff --git a/Cargo.lock b/Cargo.lock index 812aea3..e01c6f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1012,9 +1012,9 @@ dependencies = [ [[package]] name = "h3-quinn" -version = "0.0.8" +version = "0.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "690cbdc6600db8490412edf5e2bbec0c88f4d4e83f9e0800428b51e6c23372dc" +checksum = "6d482318ae94198fc8e3cbb0b7ba3099c865d744e6ec7c62039ca7b6b6c66fbf" dependencies = [ "bytes", "futures", diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 84a7f22..33b5dcd 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -93,7 +93,7 @@ tracing = { version = "0.1.41" } # http/3 quinn = { version = "0.11.7", optional = true } h3 = { version = "0.0.7", features = ["tracing"], optional = true } -h3-quinn = { version = "0.0.8", optional = true } +h3-quinn = { version = "0.0.9", optional = true } s2n-quic = { version = "1.55.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [ "provider-tls-rustls", ], optional = true } From b067631a5a3ada04abf6cc8c08cd4b6b96c085b2 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 19 Mar 2025 01:31:42 +0900 Subject: [PATCH 071/142] update deps --- Cargo.lock | 84 ++++++++++-------------------------------------------- 1 file changed, 15 insertions(+), 69 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1ee87da..e01c6f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -957,9 +957,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" dependencies = [ "cfg-if", + "js-sys", "libc", "r-efi", "wasi 0.14.2+wasi-0.2.4", + "wasm-bindgen", ] [[package]] @@ -1166,7 +1168,7 @@ dependencies = [ "hyper-util", "rustls", "rustls-pki-types", - "rustls-platform-verifier 0.5.0", + "rustls-platform-verifier", "tokio", "tokio-rustls", "tower-service", @@ -1416,20 +1418,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" -[[package]] -name = "jni" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec" -dependencies = [ - "cesu8", - "combine", - "jni-sys", - "log", - "thiserror 1.0.69", - "walkdir", -] - [[package]] name = "jni" version = "0.21.1" @@ -1881,11 +1869,12 @@ checksum = "1190fd18ae6ce9e137184f207593877e70f39b015040156b1e05081cdfe3733a" [[package]] name = "quinn" -version = "0.11.6" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" +checksum = "c3bd15a6f2967aef83887dcb9fec0014580467e33720d073560cf015a5683012" dependencies = [ "bytes", + "cfg_aliases", "futures-io", "pin-project-lite", "quinn-proto", @@ -1896,22 +1885,23 @@ dependencies = [ "thiserror 2.0.12", "tokio", "tracing", + "web-time", ] [[package]] name = "quinn-proto" -version = "0.11.9" +version = "0.11.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" +checksum = "b820744eb4dc9b57a3398183639c511b5a26d2ed702cedd3febaa1393caa22cc" dependencies = [ "bytes", - "getrandom 0.2.15", - "rand 0.8.5", + "getrandom 0.3.2", + "rand 0.9.0", "ring", "rustc-hash 2.1.1", "rustls", "rustls-pki-types", - "rustls-platform-verifier 0.4.0", + "rustls-platform-verifier", "slab", "thiserror 2.0.12", "tinyvec", @@ -1961,17 +1951,6 @@ dependencies = [ "rand_hc", ] -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - [[package]] name = "rand" version = "0.9.0" @@ -1993,16 +1972,6 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - [[package]] name = "rand_chacha" version = "0.9.0" @@ -2022,15 +1991,6 @@ dependencies = [ "getrandom 0.1.16", ] -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.15", -] - [[package]] name = "rand_core" version = "0.9.3" @@ -2154,7 +2114,7 @@ dependencies = [ "blocking", "rustls", "rustls-acme", - "rustls-platform-verifier 0.5.0", + "rustls-platform-verifier", "rustls-post-quantum", "thiserror 2.0.12", "tokio", @@ -2321,19 +2281,6 @@ dependencies = [ "x509-parser", ] -[[package]] -name = "rustls-native-certs" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" -dependencies = [ - "openssl-probe", - "rustls-pemfile", - "rustls-pki-types", - "schannel", - "security-framework 2.11.1", -] - [[package]] name = "rustls-native-certs" version = "0.8.1" @@ -2372,11 +2319,11 @@ checksum = "4a5467026f437b4cb2a533865eaa73eb840019a0916f4b9ec563c6e617e086c9" dependencies = [ "core-foundation 0.10.0", "core-foundation-sys", - "jni 0.21.1", + "jni", "log", "once_cell", "rustls", - "rustls-native-certs 0.8.1", + "rustls-native-certs", "rustls-platform-verifier-android", "rustls-webpki", "security-framework 3.2.0", @@ -2613,7 +2560,6 @@ dependencies = [ "core-foundation 0.9.4", "core-foundation-sys", "libc", - "num-bigint", "security-framework-sys", ] From 597f078bf6aa3f3d86d6e3917e83ca8e2a3f1403 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 22:10:40 +0000 Subject: [PATCH 072/142] chore(deps): bump mimalloc from 0.1.43 to 0.1.44 Bumps [mimalloc](https://github.com/purpleprotocol/mimalloc_rust) from 0.1.43 to 0.1.44. - [Release notes](https://github.com/purpleprotocol/mimalloc_rust/releases) - [Commits](https://github.com/purpleprotocol/mimalloc_rust/compare/v0.1.43...v0.1.44) --- updated-dependencies: - dependency-name: mimalloc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e01c6f8..4580472 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1495,9 +1495,9 @@ checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "libmimalloc-sys" -version = "0.1.39" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23aa6811d3bd4deb8a84dde645f943476d13b248d818edcf8ce0b2f37f036b44" +checksum = "07d0e07885d6a754b9c7993f2625187ad694ee985d60f23355ff0e7077261502" dependencies = [ "cc", "libc", @@ -1562,9 +1562,9 @@ dependencies = [ [[package]] name = "mimalloc" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68914350ae34959d83f732418d51e2427a794055d0b9529f48259ac07af65633" +checksum = "99585191385958383e13f6b822e6b6d8d9cf928e7d286ceb092da92b43c87bc1" dependencies = [ "libmimalloc-sys", ] From aa332bc0cf5e75dbebf2a0ac064d8da44c67bfcb Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 26 Mar 2025 16:21:16 +0900 Subject: [PATCH 073/142] chore: deps --- Cargo.lock | 65 ++++++++++++++++++++++--------------------- rpxy-certs/Cargo.toml | 2 +- 2 files changed, 34 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4580472..cea0b9a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -406,9 +406,9 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "cc" -version = "1.2.16" +version = "1.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c" +checksum = "1fcb57c740ae1daf453ae85f16e37396f672b039e00d9d866e07ddb24e328e3a" dependencies = [ "jobserver", "libc", @@ -647,9 +647,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" +checksum = "28cfac68e08048ae1883171632c2aef3ebc555621ae56fbccce1cbf22dd7f058" dependencies = [ "powerfmt", ] @@ -1212,14 +1212,15 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.61" +version = "0.1.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" +checksum = "b2fd658b06e56721792c5df4475705b6cda790e9298d19d2f8af083457bcd127" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", + "log", "wasm-bindgen", "windows-core", ] @@ -1523,9 +1524,9 @@ checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" [[package]] name = "log" -version = "0.4.26" +version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" [[package]] name = "lru" @@ -1839,7 +1840,7 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" dependencies = [ - "zerocopy 0.8.23", + "zerocopy 0.8.24", ] [[package]] @@ -1911,9 +1912,9 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.10" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e46f3055866785f6b92bc6164b76be02ca8f2eb4b002c0354b28cf4c119e5944" +checksum = "541d0f57c6ec747a90738a52741d3221f7960e8ac2f0ff4b1a63680e033b4ab5" dependencies = [ "cfg_aliases", "libc", @@ -1959,7 +1960,7 @@ checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", - "zerocopy 0.8.23", + "zerocopy 0.8.24", ] [[package]] @@ -2349,9 +2350,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.0" +version = "0.103.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aa4eeac2588ffff23e9d7a7e9b3f971c5fb5b7ebc9452745e0c232c64f83b2f" +checksum = "fef8b8769aaccf73098557a87cd1816b4f9c7c16811c9c77142aa695c16f2c03" dependencies = [ "aws-lc-rs", "ring", @@ -2377,7 +2378,7 @@ version = "0.55.0" dependencies = [ "byteorder", "bytes", - "zerocopy 0.8.23", + "zerocopy 0.8.24", ] [[package]] @@ -2399,7 +2400,7 @@ dependencies = [ "s2n-quic-tls-default", "s2n-quic-transport", "tokio", - "zerocopy 0.8.23", + "zerocopy 0.8.24", "zeroize", ] @@ -2419,7 +2420,7 @@ dependencies = [ "pin-project-lite", "s2n-codec", "subtle", - "zerocopy 0.8.23", + "zerocopy 0.8.24", ] [[package]] @@ -2510,9 +2511,9 @@ dependencies = [ [[package]] name = "s2n-tls" -version = "0.3.13" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "331e244d4ac5b727bc9c40f8ef0e6a11c0dc5f523ba777778e46d7b4dc926839" +checksum = "ebf1868fc9471aa5461c3b29c5e11011a5d3cbe36ce62d2a12d33d3681859b80" dependencies = [ "errno", "hex", @@ -2523,9 +2524,9 @@ dependencies = [ [[package]] name = "s2n-tls-sys" -version = "0.3.13" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d08dfb78b8616abfde3d1432f409ca050e01fd6c8f3b83c1fa01c5266e954a" +checksum = "0f49b6ace3b4f332bc550f4ddbf1c1cd4250b10be223ec23a29e28db1e51f3fd" dependencies = [ "aws-lc-rs", "cc", @@ -2735,9 +2736,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.19.0" +version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488960f40a3fd53d72c2a29a58722561dee8afdd175bd88e3db4677d7b2ba600" +checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" dependencies = [ "fastrand", "getrandom 0.3.2", @@ -2808,9 +2809,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.40" +version = "0.3.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d9c75b47bdff86fa3334a3db91356b8d7d86a9b839dab7d0bdc5c3d3a077618" +checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" dependencies = [ "deranged", "itoa", @@ -2829,9 +2830,9 @@ checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" [[package]] name = "time-macros" -version = "0.2.21" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29aa485584182073ed57fd5004aa09c371f021325014694e432313345865fd04" +checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" dependencies = [ "num-conv", "time-core", @@ -3548,11 +3549,11 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.23" +version = "0.8.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd97444d05a4328b90e75e503a34bad781f14e28a823ad3557f0750df1ebcbc6" +checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879" dependencies = [ - "zerocopy-derive 0.8.23", + "zerocopy-derive 0.8.24", ] [[package]] @@ -3568,9 +3569,9 @@ dependencies = [ [[package]] name = "zerocopy-derive" -version = "0.8.23" +version = "0.8.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6352c01d0edd5db859a63e2605f4ea3183ddbd15e2c4a9e7d32184df75e4f154" +checksum = "a996a8f63c5c4448cd959ac1bab0aaa3306ccfd060472f85943ee0750f0169be" dependencies = [ "proc-macro2", "quote", diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index 06b7297..8097431 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -27,7 +27,7 @@ rustls = { version = "0.23.25", default-features = false, features = [ "aws_lc_rs", ] } rustls-pemfile = { version = "2.2.0" } -rustls-webpki = { version = "0.103.0", default-features = false, features = [ +rustls-webpki = { version = "0.103.1", default-features = false, features = [ "std", "aws-lc-rs", ] } From 116a9751cad86fb64665fecfa429c624eca7d99b Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Thu, 27 Mar 2025 12:05:19 +0900 Subject: [PATCH 074/142] chore: deps --- Cargo.lock | 34 +++++++++++++++++----------------- rpxy-bin/Cargo.toml | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cea0b9a..894411a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -468,18 +468,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.32" +version = "4.5.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6088f3ae8c3608d19260cd7445411865a485688711b78b5be70d78cd96136f83" +checksum = "e958897981290da2a852763fe9cdb89cd36977a5d729023127095fa94d95e2ff" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.32" +version = "4.5.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22a7ef7f676155edfb82daa97f99441f3ebf4a58d5e32f295a56259f1b6facc8" +checksum = "83b0f35019843db2160b5bb19ae09b4e6411ac33fc6a712003c33e03090e2489" dependencies = [ "anstream", "anstyle", @@ -731,7 +731,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -1275,9 +1275,9 @@ dependencies = [ [[package]] name = "icu_locid_transform_data" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" +checksum = "7515e6d781098bf9f7205ab3fc7e9709d34554ae0b21ddbcb5febfa4bc7df11d" [[package]] name = "icu_normalizer" @@ -1299,9 +1299,9 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" +checksum = "c5e8338228bdc8ab83303f16b797e177953730f601a96c25d10cb3ab0daa0cb7" [[package]] name = "icu_properties" @@ -1320,9 +1320,9 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" +checksum = "85fb8799753b75aee8d2a21d7c14d9f38921b54b3dbda10f5a3c7a7b82dba5e2" [[package]] name = "icu_provider" @@ -1921,7 +1921,7 @@ dependencies = [ "once_cell", "socket2", "tracing", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -2226,7 +2226,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -2239,7 +2239,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.9.3", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -2330,7 +2330,7 @@ dependencies = [ "security-framework 3.2.0", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -2744,7 +2744,7 @@ dependencies = [ "getrandom 0.3.2", "once_cell", "rustix 1.0.3", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -3286,7 +3286,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index f740614..f801c1a 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -45,7 +45,7 @@ async-trait = "0.1.88" futures-util = { version = "0.3.31", default-features = false } # config -clap = { version = "4.5.32", features = ["std", "cargo", "wrap_help"] } +clap = { version = "4.5.34", features = ["std", "cargo", "wrap_help"] } toml = { version = "0.8.20", default-features = false, features = ["parse"] } hot_reload = "0.1.8" serde_ignored = "0.1.11" From a667270377721025f41a587d56a6d37165f4532a Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Thu, 27 Mar 2025 12:09:27 +0900 Subject: [PATCH 075/142] chore: deps s2n-quic --- Cargo.lock | 18 +++++++++--------- rpxy-lib/Cargo.toml | 6 +++--- submodules/s2n-quic | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 894411a..8e0190e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2374,7 +2374,7 @@ checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "s2n-codec" -version = "0.55.0" +version = "0.56.0" dependencies = [ "byteorder", "bytes", @@ -2383,7 +2383,7 @@ dependencies = [ [[package]] name = "s2n-quic" -version = "1.55.0" +version = "1.56.0" dependencies = [ "bytes", "cfg-if", @@ -2406,7 +2406,7 @@ dependencies = [ [[package]] name = "s2n-quic-core" -version = "0.55.0" +version = "0.56.0" dependencies = [ "atomic-waker", "byteorder", @@ -2425,7 +2425,7 @@ dependencies = [ [[package]] name = "s2n-quic-crypto" -version = "0.55.0" +version = "0.56.0" dependencies = [ "aws-lc-rs", "cfg-if", @@ -2448,7 +2448,7 @@ dependencies = [ [[package]] name = "s2n-quic-platform" -version = "0.55.0" +version = "0.56.0" dependencies = [ "cfg-if", "futures", @@ -2461,7 +2461,7 @@ dependencies = [ [[package]] name = "s2n-quic-rustls" -version = "0.55.0" +version = "0.56.0" dependencies = [ "bytes", "rustls", @@ -2474,7 +2474,7 @@ dependencies = [ [[package]] name = "s2n-quic-tls" -version = "0.55.0" +version = "0.56.0" dependencies = [ "bytes", "errno", @@ -2487,7 +2487,7 @@ dependencies = [ [[package]] name = "s2n-quic-tls-default" -version = "0.55.0" +version = "0.56.0" dependencies = [ "s2n-quic-rustls", "s2n-quic-tls", @@ -2495,7 +2495,7 @@ dependencies = [ [[package]] name = "s2n-quic-transport" -version = "0.55.0" +version = "0.56.0" dependencies = [ "bytes", "futures-channel", diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 33b5dcd..7001af6 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -94,11 +94,11 @@ tracing = { version = "0.1.41" } quinn = { version = "0.11.7", optional = true } h3 = { version = "0.0.7", features = ["tracing"], optional = true } h3-quinn = { version = "0.0.9", optional = true } -s2n-quic = { version = "1.55.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [ +s2n-quic = { version = "1.56.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [ "provider-tls-rustls", ], optional = true } -s2n-quic-core = { version = "0.55.0", path = "../submodules/s2n-quic/quic/s2n-quic-core", default-features = false, optional = true } -s2n-quic-rustls = { version = "0.55.0", path = "../submodules/s2n-quic/quic/s2n-quic-rustls", optional = true } +s2n-quic-core = { version = "0.56.0", path = "../submodules/s2n-quic/quic/s2n-quic-core", default-features = false, optional = true } +s2n-quic-rustls = { version = "0.56.0", path = "../submodules/s2n-quic/quic/s2n-quic-rustls", optional = true } s2n-quic-h3 = { path = "../submodules/s2n-quic/quic/s2n-quic-h3/", features = [ "tracing", ], optional = true } diff --git a/submodules/s2n-quic b/submodules/s2n-quic index 1142450..6a8b169 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit 11424508afe1f3b84e6924b07142a5203aa7e14b +Subproject commit 6a8b169af4e41f1601ffb00cc7e7203e6be72405 From 983a5ff6453c9d971db3f77feb0a0b493072cc7b Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Thu, 27 Mar 2025 13:37:55 +0900 Subject: [PATCH 076/142] edition += 3 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 2cb948f..1ee3118 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ homepage = "https://github.com/junkurihara/rust-rpxy" repository = "https://github.com/junkurihara/rust-rpxy" license = "MIT" readme = "./README.md" -edition = "2021" +edition = "2024" publish = false [workspace] From caa0baf0f4c0dd32bbea976520dc29108d931185 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Mon, 31 Mar 2025 22:59:43 +0900 Subject: [PATCH 077/142] chore: deps --- Cargo.lock | 38 +++++++++++++++++++------------------- rpxy-lib/Cargo.toml | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8e0190e..11f2a9e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -592,9 +592,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.10" +version = "0.20.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" dependencies = [ "darling_core", "darling_macro", @@ -602,9 +602,9 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.10" +version = "0.20.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" dependencies = [ "fnv", "ident_case", @@ -616,9 +616,9 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.10" +version = "0.20.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core", "quote", @@ -731,7 +731,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -747,9 +747,9 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c3e4e0dd3673c1139bf041f3008816d9cf2946bbfac2945c09e523b8d7b05b2" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" dependencies = [ "event-listener", "pin-project-lite", @@ -1698,9 +1698,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.21.1" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75b0bedcc4fe52caa0e03d9f1151a323e4aa5e2d78ba3580400cd3c9e2bc4bc" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "openssl" @@ -1921,7 +1921,7 @@ dependencies = [ "once_cell", "socket2", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2226,7 +2226,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.4.15", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2239,7 +2239,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.9.3", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2330,7 +2330,7 @@ dependencies = [ "security-framework 3.2.0", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2686,9 +2686,9 @@ checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" [[package]] name = "socket2" -version = "0.5.8" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" +checksum = "4f5fd57c80058a56cf5c777ab8a126398ece8e442983605d280a44ce79d0edef" dependencies = [ "libc", "windows-sys 0.52.0", @@ -2744,7 +2744,7 @@ dependencies = [ "getrandom 0.3.2", "once_cell", "rustix 1.0.3", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3286,7 +3286,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 7001af6..a060fe2 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -104,7 +104,7 @@ s2n-quic-h3 = { path = "../submodules/s2n-quic/quic/s2n-quic-h3/", features = [ ], optional = true } ########## # for UDP socket wit SO_REUSEADDR when h3 with quinn -socket2 = { version = "0.5.8", features = ["all"], optional = true } +socket2 = { version = "0.5.9", features = ["all"], optional = true } # cache http-cache-semantics = { path = "../submodules/rusty-http-cache-semantics", default-features = false, optional = true } From 94711ed9c0ad8df9eb67155e60b1059c9a8afec0 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Tue, 1 Apr 2025 10:45:24 +0900 Subject: [PATCH 078/142] chore: deps --- Cargo.lock | 59 +++++++++++++++++++++++++++++++++++++++------ rpxy-lib/Cargo.toml | 2 +- 2 files changed, 53 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 11f2a9e..9b1a5e1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1193,9 +1193,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" +checksum = "497bbc33a26fdd4af9ed9c70d63f61cf56a938375fbb32df34db9b1cd6d643f2" dependencies = [ "bytes", "futures-channel", @@ -1203,6 +1203,7 @@ dependencies = [ "http", "http-body", "hyper", + "libc", "pin-project-lite", "socket2", "tokio", @@ -1212,9 +1213,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.62" +version = "0.1.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2fd658b06e56721792c5df4475705b6cda790e9298d19d2f8af083457bcd127" +checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -3297,11 +3298,37 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.52.0" +version = "0.61.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980" dependencies = [ - "windows-targets 0.52.6", + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-interface" +version = "0.59.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +dependencies = [ + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -3310,6 +3337,24 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" +[[package]] +name = "windows-result" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97" +dependencies = [ + "windows-link", +] + [[package]] name = "windows-sys" version = "0.45.0" diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index a060fe2..f74d010 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -61,7 +61,7 @@ thiserror = "2.0.12" http = "1.3.1" http-body-util = "0.1.3" hyper = { version = "1.6.0", default-features = false } -hyper-util = { version = "0.1.10", features = ["full"] } +hyper-util = { version = "0.1.11", features = ["full"] } futures-util = { version = "0.3.31", default-features = false } futures-channel = { version = "0.3.31", default-features = false } From dd7d9476c906c5d4d3829106a8c3e915f7bca4d9 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Tue, 1 Apr 2025 19:40:29 +0900 Subject: [PATCH 079/142] deps --- Cargo.lock | 6 +++--- rpxy-bin/Cargo.toml | 2 +- rpxy-certs/Cargo.toml | 2 +- rpxy-lib/Cargo.toml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9b1a5e1..0aeb83e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1070,13 +1070,13 @@ dependencies = [ [[package]] name = "hot_reload" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7868e56f0992d2573ed9aedcf0406d5be7b6799f277f7fec1994c4e24c1ce63a" +checksum = "75c6b9b663cacaa5655b282218152476f7d38f6dc29b0d9b93a7f5fd73209b6a" dependencies = [ "anyhow", "async-trait", - "thiserror 1.0.69", + "thiserror 2.0.12", "tokio", "tracing", ] diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index f801c1a..b042954 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -47,7 +47,7 @@ futures-util = { version = "0.3.31", default-features = false } # config clap = { version = "4.5.34", features = ["std", "cargo", "wrap_help"] } toml = { version = "0.8.20", default-features = false, features = ["parse"] } -hot_reload = "0.1.8" +hot_reload = "0.1.9" serde_ignored = "0.1.11" # logging diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index 8097431..a648aaa 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -20,7 +20,7 @@ ahash = { version = "0.8.11" } tracing = { version = "0.1.41" } derive_builder = { version = "0.20.2" } thiserror = { version = "2.0.12" } -hot_reload = { version = "0.1.8" } +hot_reload = { version = "0.1.9" } async-trait = { version = "0.1.88" } rustls = { version = "0.23.25", default-features = false, features = [ "std", diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index f74d010..8fac76c 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -79,7 +79,7 @@ hyper-rustls = { version = "0.27.5", default-features = false, features = [ # tls and cert management for server rpxy-certs = { path = "../rpxy-certs/", default-features = false } -hot_reload = "0.1.8" +hot_reload = "0.1.9" rustls = { version = "0.23.25", default-features = false } rustls-post-quantum = { version = "0.2.2", optional = true } tokio-rustls = { version = "0.26.2", features = ["early-data"] } From e53f987f015b88117266d50b00c0d987926410c9 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 2 Apr 2025 11:11:19 +0900 Subject: [PATCH 080/142] chore: deps --- Cargo.lock | 29 +++++++++++++++-------------- rpxy-acme/Cargo.toml | 2 +- rpxy-bin/Cargo.toml | 2 +- submodules/s2n-quic | 2 +- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0aeb83e..3c86830 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -292,9 +292,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "aws-lc-rs" -version = "1.12.6" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dabb68eb3a7aa08b46fddfd59a3d55c978243557a90ab804769f7e20e67d2b01" +checksum = "19b756939cb2f8dc900aa6dcd505e6e2428e9cae7ff7b028c49e3946efa70878" dependencies = [ "aws-lc-sys", "untrusted 0.7.1", @@ -303,9 +303,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.27.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77926887776171ced7d662120a75998e444d3750c951abfe07f90da130514b1f" +checksum = "b9f7720b74ed28ca77f90769a71fd8c637a0137f6fae4ae947e1050229cff57f" dependencies = [ "bindgen", "cc", @@ -468,18 +468,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.34" +version = "4.5.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e958897981290da2a852763fe9cdb89cd36977a5d729023127095fa94d95e2ff" +checksum = "d8aa86934b44c19c50f87cc2790e19f54f7a67aedb64101c2e1a2e5ecfb73944" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.34" +version = "4.5.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b0f35019843db2160b5bb19ae09b4e6411ac33fc6a712003c33e03090e2489" +checksum = "2414dbb2dd0695280da6ea9261e327479e9d37b0630f6b53ba2a11c60c679fd9" dependencies = [ "anstream", "anstyle", @@ -1444,10 +1444,11 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "jobserver" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" dependencies = [ + "getrandom 0.3.2", "libc", ] @@ -2232,9 +2233,9 @@ dependencies = [ [[package]] name = "rustix" -version = "1.0.3" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e56a18552996ac8d29ecc3b190b4fdbb2d91ca4ec396de7bbffaf43f3d637e96" +checksum = "d97817398dd4bb2e6da002002db259209759911da105da92bec29ccb12cf58bf" dependencies = [ "bitflags", "errno", @@ -2744,7 +2745,7 @@ dependencies = [ "fastrand", "getrandom 0.3.2", "once_cell", - "rustix 1.0.3", + "rustix 1.0.5", "windows-sys 0.59.0", ] @@ -2754,7 +2755,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45c6481c4829e4cc63825e62c49186a34538b7b2750b73b266581ffb612fb5ed" dependencies = [ - "rustix 1.0.3", + "rustix 1.0.5", "windows-sys 0.59.0", ] diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index 07c3b9f..848719a 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -20,7 +20,7 @@ thiserror = "2.0.12" tracing = "0.1.41" async-trait = "0.1.88" base64 = "0.22.1" -aws-lc-rs = { version = "1.12.6", default-features = false, features = [ +aws-lc-rs = { version = "1.13.0", default-features = false, features = [ "aws-lc-sys", ] } blocking = "1.6.1" diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index b042954..51d1f5d 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -45,7 +45,7 @@ async-trait = "0.1.88" futures-util = { version = "0.3.31", default-features = false } # config -clap = { version = "4.5.34", features = ["std", "cargo", "wrap_help"] } +clap = { version = "4.5.35", features = ["std", "cargo", "wrap_help"] } toml = { version = "0.8.20", default-features = false, features = ["parse"] } hot_reload = "0.1.9" serde_ignored = "0.1.11" diff --git a/submodules/s2n-quic b/submodules/s2n-quic index 6a8b169..54250c9 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit 6a8b169af4e41f1601ffb00cc7e7203e6be72405 +Subproject commit 54250c9b1af395594723f7e4a53cb00ccae3e3c7 From e31e61485d40fd3c8aea56570138ab649a6b09ef Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Thu, 3 Apr 2025 13:11:24 +0900 Subject: [PATCH 081/142] fix: stop using mimalloc due to compilation failure with musl --- Cargo.lock | 20 -------------------- rpxy-bin/Cargo.toml | 3 ++- rpxy-bin/src/main.rs | 8 ++++---- 3 files changed, 6 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3c86830..cef6980 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1496,16 +1496,6 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" -[[package]] -name = "libmimalloc-sys" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07d0e07885d6a754b9c7993f2625187ad694ee985d60f23355ff0e7077261502" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "linux-raw-sys" version = "0.4.15" @@ -1563,15 +1553,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "mimalloc" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99585191385958383e13f6b822e6b6d8d9cf928e7d286ceb092da92b43c87bc1" -dependencies = [ - "libmimalloc-sys", -] - [[package]] name = "minimal-lexical" version = "0.2.1" @@ -2093,7 +2074,6 @@ dependencies = [ "clap", "futures-util", "hot_reload", - "mimalloc", "rpxy-acme", "rpxy-certs", "rpxy-lib", diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index 51d1f5d..d6cb213 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -29,7 +29,8 @@ rpxy-lib = { path = "../rpxy-lib/", default-features = false, features = [ "sticky-cookie", ] } -mimalloc = { version = "*", default-features = false } +# TODO: stop using mimalloc doe to compilation failure by musl +# mimalloc = { version = "*", default-features = false } anyhow = "1.0.97" ahash = "0.8.11" serde = { version = "1.0.219", default-features = false, features = ["derive"] } diff --git a/rpxy-bin/src/main.rs b/rpxy-bin/src/main.rs index 855561f..9af0144 100644 --- a/rpxy-bin/src/main.rs +++ b/rpxy-bin/src/main.rs @@ -1,5 +1,5 @@ -#[global_allocator] -static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc; +// #[global_allocator] +// static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc; mod config; mod constants; @@ -9,13 +9,13 @@ mod log; #[cfg(feature = "acme")] use crate::config::build_acme_manager; use crate::{ - config::{build_cert_manager, build_settings, parse_opts, ConfigToml, ConfigTomlReloader}, + config::{ConfigToml, ConfigTomlReloader, build_cert_manager, build_settings, parse_opts}, constants::CONFIG_WATCH_DELAY_SECS, error::*, log::*, }; use hot_reload::{ReloaderReceiver, ReloaderService}; -use rpxy_lib::{entrypoint, RpxyOptions, RpxyOptionsBuilder}; +use rpxy_lib::{RpxyOptions, RpxyOptionsBuilder, entrypoint}; use std::sync::Arc; use tokio_util::sync::CancellationToken; From ec56c45f518b7da067996ce32f919297111d0e43 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Fri, 4 Apr 2025 01:51:55 +0900 Subject: [PATCH 082/142] pin mimalloc and mimalloc-sys #252 --- Cargo.lock | 21 +++++++++++++++++++++ rpxy-bin/Cargo.toml | 5 +++-- rpxy-bin/src/main.rs | 4 ++-- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cef6980..cb4583b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1496,6 +1496,16 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" +[[package]] +name = "libmimalloc-sys" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07d0e07885d6a754b9c7993f2625187ad694ee985d60f23355ff0e7077261502" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "linux-raw-sys" version = "0.4.15" @@ -1553,6 +1563,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "mimalloc" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99585191385958383e13f6b822e6b6d8d9cf928e7d286ceb092da92b43c87bc1" +dependencies = [ + "libmimalloc-sys", +] + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -2074,6 +2093,8 @@ dependencies = [ "clap", "futures-util", "hot_reload", + "libmimalloc-sys", + "mimalloc", "rpxy-acme", "rpxy-certs", "rpxy-lib", diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index d6cb213..ff4d503 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -29,8 +29,9 @@ rpxy-lib = { path = "../rpxy-lib/", default-features = false, features = [ "sticky-cookie", ] } -# TODO: stop using mimalloc doe to compilation failure by musl -# mimalloc = { version = "*", default-features = false } +# TODO: pin mimalloc due to compilation failure by musl +mimalloc = { version = "=0.1.44", default-features = false } +libmimalloc-sys = { version = "=0.1.40" } anyhow = "1.0.97" ahash = "0.8.11" serde = { version = "1.0.219", default-features = false, features = ["derive"] } diff --git a/rpxy-bin/src/main.rs b/rpxy-bin/src/main.rs index 9af0144..b0bf25e 100644 --- a/rpxy-bin/src/main.rs +++ b/rpxy-bin/src/main.rs @@ -1,5 +1,5 @@ -// #[global_allocator] -// static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc; +#[global_allocator] +static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc; mod config; mod constants; From 9d6ed959ca8df90f611a971dd22bd07422837f55 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Mon, 7 Apr 2025 21:51:15 +0900 Subject: [PATCH 083/142] chore: deps --- Cargo.lock | 4 ++-- rpxy-acme/Cargo.toml | 2 +- rpxy-bin/Cargo.toml | 2 +- rpxy-certs/Cargo.toml | 2 +- rpxy-lib/Cargo.toml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cb4583b..cc39661 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2868,9 +2868,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.44.1" +version = "1.44.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f382da615b842244d4b8738c82ed1275e6c5dd90c459a30941cd07080b06c91a" +checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" dependencies = [ "backtrace", "bytes", diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index 848719a..f08bace 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -33,6 +33,6 @@ rustls-acme = { path = "../submodules/rustls-acme/", default-features = false, f "aws-lc-rs", ] } rustls-post-quantum = { version = "0.2.2", optional = true } -tokio = { version = "1.44.1", default-features = false } +tokio = { version = "1.44.2", default-features = false } tokio-util = { version = "0.7.14", default-features = false } tokio-stream = { version = "0.1.17", default-features = false } diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index ff4d503..ab15d8a 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -35,7 +35,7 @@ libmimalloc-sys = { version = "=0.1.40" } anyhow = "1.0.97" ahash = "0.8.11" serde = { version = "1.0.219", default-features = false, features = ["derive"] } -tokio = { version = "1.44.1", default-features = false, features = [ +tokio = { version = "1.44.2", default-features = false, features = [ "net", "rt-multi-thread", "time", diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index a648aaa..92d4ed1 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -35,7 +35,7 @@ rustls-post-quantum = { version = "0.2.2", optional = true } x509-parser = { version = "0.17.0" } [dev-dependencies] -tokio = { version = "1.44.1", default-features = false, features = [ +tokio = { version = "1.44.2", default-features = false, features = [ "rt-multi-thread", "macros", ] } diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 8fac76c..20b3023 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -41,7 +41,7 @@ ahash = "0.8.11" bytes = "1.10.1" derive_builder = "0.20.2" futures = { version = "0.3.31", features = ["alloc", "async-await"] } -tokio = { version = "1.44.1", default-features = false, features = [ +tokio = { version = "1.44.2", default-features = false, features = [ "net", "rt-multi-thread", "time", From 270b69b93c8f789b74ebfb902639cd5f4c9c17c9 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 9 Apr 2025 13:28:12 +0900 Subject: [PATCH 084/142] lock --- Cargo.lock | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cc39661..c7b3ae6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -406,9 +406,9 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "cc" -version = "1.2.17" +version = "1.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fcb57c740ae1daf453ae85f16e37396f672b039e00d9d866e07ddb24e328e3a" +checksum = "525046617d8376e3db1deffb079e91cef90a89fc3ca5c185bbf8c9ecdd15cd5c" dependencies = [ "jobserver", "libc", @@ -647,9 +647,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cfac68e08048ae1883171632c2aef3ebc555621ae56fbccce1cbf22dd7f058" +checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" dependencies = [ "powerfmt", ] @@ -726,9 +726,9 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" dependencies = [ "libc", "windows-sys 0.59.0", @@ -1382,9 +1382,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" +checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" dependencies = [ "equivalent", "hashbrown", @@ -1580,9 +1580,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.5" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" +checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" dependencies = [ "adler2", ] @@ -1706,9 +1706,9 @@ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "openssl" -version = "0.10.71" +version = "0.10.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" +checksum = "fedfea7d58a1f73118430a55da6a286e7b044961736ce96a16a17068ea25e5da" dependencies = [ "bitflags", "cfg-if", @@ -1738,18 +1738,18 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-src" -version = "300.4.2+3.4.1" +version = "300.5.0+3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168ce4e058f975fe43e89d9ccf78ca668601887ae736090aacc23ae353c298e2" +checksum = "e8ce546f549326b0e6052b649198487d91320875da901e7bd11a06d1ee3f9c2f" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.106" +version = "0.9.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd" +checksum = "8288979acd84749c744a9014b4382d42b8f7b2592847b5afb2ed29e5d16ede07" dependencies = [ "cc", "libc", @@ -1847,9 +1847,9 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.31" +version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5316f57387668042f561aae71480de936257848f9c43ce528e311d89a07cadeb" +checksum = "664ec5419c51e34154eec046ebcba56312d5a2fc3b09a06da188e1ad21afadf6" dependencies = [ "proc-macro2", "syn", @@ -2514,9 +2514,9 @@ dependencies = [ [[package]] name = "s2n-tls" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebf1868fc9471aa5461c3b29c5e11011a5d3cbe36ce62d2a12d33d3681859b80" +checksum = "097f3b0be6362628aed46f8058004ae9e19315b04c1cdf7be3293a641942dcda" dependencies = [ "errno", "hex", @@ -2527,9 +2527,9 @@ dependencies = [ [[package]] name = "s2n-tls-sys" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f49b6ace3b4f332bc550f4ddbf1c1cd4250b10be223ec23a29e28db1e51f3fd" +checksum = "50567eb5d5cf444f4c5eef0968561aa2eceb2fbd8b29c83bc99c7a495c43a3ff" dependencies = [ "aws-lc-rs", "cc", @@ -2683,9 +2683,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.14.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" +checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" [[package]] name = "socket2" @@ -3507,9 +3507,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e97b544156e9bebe1a0ffbc03484fc1ffe3100cbce3ffb17eac35f7cdd7ab36" +checksum = "63d3fcd9bba44b03821e7d699eeee959f3126dcc4aa8e4ae18ec617c2a5cea10" dependencies = [ "memchr", ] From 09954719bfd293544ee59cb24a3009cb9e9ee711 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Thu, 10 Apr 2025 13:38:29 +0900 Subject: [PATCH 085/142] chore: deps s2n-quic --- Cargo.lock | 18 +++++++++--------- rpxy-lib/Cargo.toml | 6 +++--- submodules/s2n-quic | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c7b3ae6..2cdcacf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2377,7 +2377,7 @@ checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "s2n-codec" -version = "0.56.0" +version = "0.57.0" dependencies = [ "byteorder", "bytes", @@ -2386,7 +2386,7 @@ dependencies = [ [[package]] name = "s2n-quic" -version = "1.56.0" +version = "1.57.0" dependencies = [ "bytes", "cfg-if", @@ -2409,7 +2409,7 @@ dependencies = [ [[package]] name = "s2n-quic-core" -version = "0.56.0" +version = "0.57.0" dependencies = [ "atomic-waker", "byteorder", @@ -2428,7 +2428,7 @@ dependencies = [ [[package]] name = "s2n-quic-crypto" -version = "0.56.0" +version = "0.57.0" dependencies = [ "aws-lc-rs", "cfg-if", @@ -2451,7 +2451,7 @@ dependencies = [ [[package]] name = "s2n-quic-platform" -version = "0.56.0" +version = "0.57.0" dependencies = [ "cfg-if", "futures", @@ -2464,7 +2464,7 @@ dependencies = [ [[package]] name = "s2n-quic-rustls" -version = "0.56.0" +version = "0.57.0" dependencies = [ "bytes", "rustls", @@ -2477,7 +2477,7 @@ dependencies = [ [[package]] name = "s2n-quic-tls" -version = "0.56.0" +version = "0.57.0" dependencies = [ "bytes", "errno", @@ -2490,7 +2490,7 @@ dependencies = [ [[package]] name = "s2n-quic-tls-default" -version = "0.56.0" +version = "0.57.0" dependencies = [ "s2n-quic-rustls", "s2n-quic-tls", @@ -2498,7 +2498,7 @@ dependencies = [ [[package]] name = "s2n-quic-transport" -version = "0.56.0" +version = "0.57.0" dependencies = [ "bytes", "futures-channel", diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 20b3023..691abf4 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -94,11 +94,11 @@ tracing = { version = "0.1.41" } quinn = { version = "0.11.7", optional = true } h3 = { version = "0.0.7", features = ["tracing"], optional = true } h3-quinn = { version = "0.0.9", optional = true } -s2n-quic = { version = "1.56.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [ +s2n-quic = { version = "1.57.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [ "provider-tls-rustls", ], optional = true } -s2n-quic-core = { version = "0.56.0", path = "../submodules/s2n-quic/quic/s2n-quic-core", default-features = false, optional = true } -s2n-quic-rustls = { version = "0.56.0", path = "../submodules/s2n-quic/quic/s2n-quic-rustls", optional = true } +s2n-quic-core = { version = "0.57.0", path = "../submodules/s2n-quic/quic/s2n-quic-core", default-features = false, optional = true } +s2n-quic-rustls = { version = "0.57.0", path = "../submodules/s2n-quic/quic/s2n-quic-rustls", optional = true } s2n-quic-h3 = { path = "../submodules/s2n-quic/quic/s2n-quic-h3/", features = [ "tracing", ], optional = true } diff --git a/submodules/s2n-quic b/submodules/s2n-quic index 54250c9..3dd7d1f 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit 54250c9b1af395594723f7e4a53cb00ccae3e3c7 +Subproject commit 3dd7d1ff0d311acd1c1abcc86fd9f428a90a0f78 From efade5aff9cf22a50b66288a347caf3d9fd0efa7 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Fri, 11 Apr 2025 15:27:23 +0900 Subject: [PATCH 086/142] chore: deps --- Cargo.lock | 10 +++++----- rpxy-acme/Cargo.toml | 2 +- rpxy-certs/Cargo.toml | 2 +- rpxy-lib/Cargo.toml | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2cdcacf..37eb1a4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1514,9 +1514,9 @@ checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "linux-raw-sys" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413" +checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" [[package]] name = "litemap" @@ -2241,15 +2241,15 @@ dependencies = [ "bitflags", "errno", "libc", - "linux-raw-sys 0.9.3", + "linux-raw-sys 0.9.4", "windows-sys 0.59.0", ] [[package]] name = "rustls" -version = "0.23.25" +version = "0.23.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "822ee9188ac4ec04a2f0531e55d035fb2de73f18b41a63c70c2712503b6fb13c" +checksum = "df51b5869f3a441595eac5e8ff14d486ff285f7b8c0df8770e49c3b56351f0f0" dependencies = [ "aws-lc-rs", "log", diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index f08bace..82d3f5b 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -24,7 +24,7 @@ aws-lc-rs = { version = "1.13.0", default-features = false, features = [ "aws-lc-sys", ] } blocking = "1.6.1" -rustls = { version = "0.23.25", default-features = false, features = [ +rustls = { version = "0.23.26", default-features = false, features = [ "std", "aws_lc_rs", ] } diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index 92d4ed1..2bad8fc 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -22,7 +22,7 @@ derive_builder = { version = "0.20.2" } thiserror = { version = "2.0.12" } hot_reload = { version = "0.1.9" } async-trait = { version = "0.1.88" } -rustls = { version = "0.23.25", default-features = false, features = [ +rustls = { version = "0.23.26", default-features = false, features = [ "std", "aws_lc_rs", ] } diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 691abf4..a1c16d4 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -80,7 +80,7 @@ hyper-rustls = { version = "0.27.5", default-features = false, features = [ # tls and cert management for server rpxy-certs = { path = "../rpxy-certs/", default-features = false } hot_reload = "0.1.9" -rustls = { version = "0.23.25", default-features = false } +rustls = { version = "0.23.26", default-features = false } rustls-post-quantum = { version = "0.2.2", optional = true } tokio-rustls = { version = "0.26.2", features = ["early-data"] } From 463e8199fd292191951f42a3c25b5d6972f6094f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Apr 2025 22:06:07 +0000 Subject: [PATCH 087/142] chore(deps): bump clap from 4.5.35 to 4.5.36 Bumps [clap](https://github.com/clap-rs/clap) from 4.5.35 to 4.5.36. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.35...clap_complete-v4.5.36) --- updated-dependencies: - dependency-name: clap dependency-version: 4.5.36 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- rpxy-bin/Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 37eb1a4..4146172 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -468,18 +468,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.35" +version = "4.5.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8aa86934b44c19c50f87cc2790e19f54f7a67aedb64101c2e1a2e5ecfb73944" +checksum = "2df961d8c8a0d08aa9945718ccf584145eee3f3aa06cddbeac12933781102e04" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.35" +version = "4.5.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2414dbb2dd0695280da6ea9261e327479e9d37b0630f6b53ba2a11c60c679fd9" +checksum = "132dbda40fb6753878316a489d5a1242a8ef2f0d9e47ba01c951ea8aa7d013a5" dependencies = [ "anstream", "anstyle", diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index ab15d8a..2c1eb21 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -47,7 +47,7 @@ async-trait = "0.1.88" futures-util = { version = "0.3.31", default-features = false } # config -clap = { version = "4.5.35", features = ["std", "cargo", "wrap_help"] } +clap = { version = "4.5.36", features = ["std", "cargo", "wrap_help"] } toml = { version = "0.8.20", default-features = false, features = ["parse"] } hot_reload = "0.1.9" serde_ignored = "0.1.11" From bbba70f47c0afc3dc5b4c2e50483e4f847e5e5aa Mon Sep 17 00:00:00 2001 From: Lyamc Date: Sat, 12 Apr 2025 14:54:31 -0600 Subject: [PATCH 088/142] Update .gitmodules to use HTTPS instead of SSH --- .gitmodules | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitmodules b/.gitmodules index a8c5d14..b2635b4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,10 +1,10 @@ [submodule "submodules/rusty-http-cache-semantics"] - path = submodules/rusty-http-cache-semantics - url = git@github.com:junkurihara/rusty-http-cache-semantics.git + path = submodules/rusty-http-cache-semantics + url = https://github.com/junkurihara/rusty-http-cache-semantics.git [submodule "submodules/rustls-acme"] - path = submodules/rustls-acme - url = git@github.com:junkurihara/rustls-acme.git + path = submodules/rustls-acme + url = https://github.com/junkurihara/rustls-acme.git [submodule "submodules/s2n-quic"] - path = submodules/s2n-quic - url = git@github.com:junkurihara/s2n-quic.git - branch = rustls-pq + path = submodules/s2n-quic + url = https://github.com/junkurihara/s2n-quic.git + branch = rustls-pq From 9673eec3a35558e5dc06c742c77ec5cfdff330eb Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Mon, 14 Apr 2025 14:06:05 +0900 Subject: [PATCH 089/142] chore: deps --- Cargo.lock | 12 ++++++------ rpxy-bin/Cargo.toml | 2 +- rpxy-lib/Cargo.toml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4146172..1b5b8f9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -112,9 +112,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.97" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" +checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" [[package]] name = "asn1-rs" @@ -406,9 +406,9 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "cc" -version = "1.2.18" +version = "1.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525046617d8376e3db1deffb079e91cef90a89fc3ca5c185bbf8c9ecdd15cd5c" +checksum = "8e3a13707ac958681c13b39b458c073d0d9bc8a22cb1b2f4c8e55eb72c13f362" dependencies = [ "jobserver", "libc", @@ -627,9 +627,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "575f75dfd25738df5b91b8e43e14d44bda14637a58fae779fd2b064f8bf3e010" +checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476" [[package]] name = "der-parser" diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index 2c1eb21..28dd703 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -32,7 +32,7 @@ rpxy-lib = { path = "../rpxy-lib/", default-features = false, features = [ # TODO: pin mimalloc due to compilation failure by musl mimalloc = { version = "=0.1.44", default-features = false } libmimalloc-sys = { version = "=0.1.40" } -anyhow = "1.0.97" +anyhow = "1.0.98" ahash = "0.8.11" serde = { version = "1.0.219", default-features = false, features = ["derive"] } tokio = { version = "1.44.2", default-features = false, features = [ diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index a1c16d4..1d4d5ab 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -54,7 +54,7 @@ pin-project-lite = "0.2.16" async-trait = "0.1.88" # Error handling -anyhow = "1.0.97" +anyhow = "1.0.98" thiserror = "2.0.12" # http for both server and client From 9170c05748d05d53b51b4a669503a34651318f0d Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Tue, 15 Apr 2025 13:20:50 +0900 Subject: [PATCH 090/142] chore: deps lru --- Cargo.lock | 12 ++++++------ rpxy-lib/Cargo.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1b5b8f9..4abf365 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -978,9 +978,9 @@ checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "h2" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5017294ff4bb30944501348f6f8e42e6ad28f42c8bbef7a74029aff064a4e3c2" +checksum = "75249d144030531f8dee69fe9cea04d3edf809a017ae445e2abdff6629e86633" dependencies = [ "atomic-waker", "bytes", @@ -1476,9 +1476,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.171" +version = "0.2.172" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" +checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" [[package]] name = "libloading" @@ -1532,9 +1532,9 @@ checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" [[package]] name = "lru" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "227748d55f2f0ab4735d87fd623798cb6b664512fe979705f829c9f81c934465" +checksum = "9f8cc7106155f10bdf99a6f379688f543ad6596a415375b36a59a054ceda1198" dependencies = [ "hashbrown", ] diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 1d4d5ab..216a8e0 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -108,7 +108,7 @@ socket2 = { version = "0.5.9", features = ["all"], optional = true } # cache http-cache-semantics = { path = "../submodules/rusty-http-cache-semantics", default-features = false, optional = true } -lru = { version = "0.13.0", optional = true } +lru = { version = "0.14.0", optional = true } sha2 = { version = "0.10.8", default-features = false, optional = true } # cookie handling for sticky cookie From b91b0a2da237a3e918731aada452f83f5ca27aad Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Fri, 18 Apr 2025 12:19:05 +0900 Subject: [PATCH 091/142] chore: deps --- Cargo.lock | 15 +++++++-------- rpxy-lib/Cargo.toml | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4abf365..dc1b7a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1857,9 +1857,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.94" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" dependencies = [ "unicode-ident", ] @@ -1899,7 +1899,7 @@ checksum = "b820744eb4dc9b57a3398183639c511b5a26d2ed702cedd3febaa1393caa22cc" dependencies = [ "bytes", "getrandom 0.3.2", - "rand 0.9.0", + "rand 0.9.1", "ring", "rustc-hash 2.1.1", "rustls", @@ -1956,13 +1956,12 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" +checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", - "zerocopy 0.8.24", ] [[package]] @@ -2173,7 +2172,7 @@ dependencies = [ "lru", "pin-project-lite", "quinn", - "rand 0.9.0", + "rand 0.9.1", "rpxy-acme", "rpxy-certs", "rustls", @@ -2393,7 +2392,7 @@ dependencies = [ "cuckoofilter", "futures", "hash_hasher", - "rand 0.9.0", + "rand 0.9.1", "rand_chacha 0.9.0", "s2n-codec", "s2n-quic-core", diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 216a8e0..4c546ea 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -36,7 +36,7 @@ post-quantum = [ ] [dependencies] -rand = "0.9.0" +rand = "0.9.1" ahash = "0.8.11" bytes = "1.10.1" derive_builder = "0.20.2" From f1fc313cdab9c1c6bc3814036ab6cc1b833bc4de Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Sun, 20 Apr 2025 14:54:00 +0900 Subject: [PATCH 092/142] chore: deps --- Cargo.lock | 20 ++++++++++---------- rpxy-bin/Cargo.toml | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dc1b7a9..dfc15fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -303,9 +303,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f7720b74ed28ca77f90769a71fd8c637a0137f6fae4ae947e1050229cff57f" +checksum = "0ddeb19ee86cb16ecfc871e5b0660aff6285760957aaedda6284cf0e790d3769" dependencies = [ "bindgen", "cc", @@ -468,18 +468,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.36" +version = "4.5.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2df961d8c8a0d08aa9945718ccf584145eee3f3aa06cddbeac12933781102e04" +checksum = "eccb054f56cbd38340b380d4a8e69ef1f02f1af43db2f0cc817a4774d80ae071" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.36" +version = "4.5.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "132dbda40fb6753878316a489d5a1242a8ef2f0d9e47ba01c951ea8aa7d013a5" +checksum = "efd9466fac8543255d3b1fcad4762c5e116ffe808c8a3043d4263cd4fd4862a2" dependencies = [ "anstream", "anstyle", @@ -2513,9 +2513,9 @@ dependencies = [ [[package]] name = "s2n-tls" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "097f3b0be6362628aed46f8058004ae9e19315b04c1cdf7be3293a641942dcda" +checksum = "c2a05886fe90b529c7ffef6b8b5542e26e21e3b0e66612673395c7ecedde0e30" dependencies = [ "errno", "hex", @@ -2526,9 +2526,9 @@ dependencies = [ [[package]] name = "s2n-tls-sys" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50567eb5d5cf444f4c5eef0968561aa2eceb2fbd8b29c83bc99c7a495c43a3ff" +checksum = "c69b480e275a5c3016307c589f2f71bbf9ea21c102e7ce3c19316d908bf0c21f" dependencies = [ "aws-lc-rs", "cc", diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index 28dd703..ded16e2 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -47,7 +47,7 @@ async-trait = "0.1.88" futures-util = { version = "0.3.31", default-features = false } # config -clap = { version = "4.5.36", features = ["std", "cargo", "wrap_help"] } +clap = { version = "4.5.37", features = ["std", "cargo", "wrap_help"] } toml = { version = "0.8.20", default-features = false, features = ["parse"] } hot_reload = "0.1.9" serde_ignored = "0.1.11" From 42630d3b53f66adf5083377db292f54621be34b1 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 23 Apr 2025 17:23:57 +0900 Subject: [PATCH 093/142] refactor --- rpxy-certs/src/certs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpxy-certs/src/certs.rs b/rpxy-certs/src/certs.rs index 1e8802a..18927a2 100644 --- a/rpxy-certs/src/certs.rs +++ b/rpxy-certs/src/certs.rs @@ -65,7 +65,7 @@ impl SingleServerCertsKeys { .cert_keys .clone() .iter() - .find_map(|k| if let Ok(sk) = any_supported_type(k) { Some(sk) } else { None }) + .find_map(|k| any_supported_type(k).ok()) .ok_or_else(|| RpxyCertError::InvalidCertificateAndKey)?; let cert = self.certs.iter().map(|c| Certificate::from(c.to_vec())).collect::>(); From 122ceb21e1f46b12c29f543f00848d7d332d07e4 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Thu, 24 Apr 2025 20:09:01 +0900 Subject: [PATCH 094/142] chore: deps --- Cargo.lock | 125 +++++++++++++++++++++--------------------- rpxy-acme/Cargo.toml | 4 +- rpxy-bin/Cargo.toml | 6 +- rpxy-certs/Cargo.toml | 2 +- rpxy-lib/Cargo.toml | 8 +-- 5 files changed, 72 insertions(+), 73 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cc39661..5038da5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -24,7 +24,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom 0.2.15", + "getrandom 0.2.16", "once_cell", "version_check", "zerocopy 0.7.35", @@ -112,9 +112,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.97" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" +checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" [[package]] name = "asn1-rs" @@ -303,9 +303,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.28.0" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f7720b74ed28ca77f90769a71fd8c637a0137f6fae4ae947e1050229cff57f" +checksum = "bfa9b6986f250236c27e5a204062434a773a13243d2ffc2955f37bdba4c5c6a1" dependencies = [ "bindgen", "cc", @@ -406,9 +406,9 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "cc" -version = "1.2.17" +version = "1.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fcb57c740ae1daf453ae85f16e37396f672b039e00d9d866e07ddb24e328e3a" +checksum = "8e3a13707ac958681c13b39b458c073d0d9bc8a22cb1b2f4c8e55eb72c13f362" dependencies = [ "jobserver", "libc", @@ -468,18 +468,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.35" +version = "4.5.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8aa86934b44c19c50f87cc2790e19f54f7a67aedb64101c2e1a2e5ecfb73944" +checksum = "eccb054f56cbd38340b380d4a8e69ef1f02f1af43db2f0cc817a4774d80ae071" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.35" +version = "4.5.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2414dbb2dd0695280da6ea9261e327479e9d37b0630f6b53ba2a11c60c679fd9" +checksum = "efd9466fac8543255d3b1fcad4762c5e116ffe808c8a3043d4263cd4fd4862a2" dependencies = [ "anstream", "anstyle", @@ -627,9 +627,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "575f75dfd25738df5b91b8e43e14d44bda14637a58fae779fd2b064f8bf3e010" +checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476" [[package]] name = "der-parser" @@ -647,9 +647,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cfac68e08048ae1883171632c2aef3ebc555621ae56fbccce1cbf22dd7f058" +checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" dependencies = [ "powerfmt", ] @@ -726,9 +726,9 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" dependencies = [ "libc", "windows-sys 0.59.0", @@ -939,9 +939,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "js-sys", @@ -978,9 +978,9 @@ checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "h2" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5017294ff4bb30944501348f6f8e42e6ad28f42c8bbef7a74029aff064a4e3c2" +checksum = "75249d144030531f8dee69fe9cea04d3edf809a017ae445e2abdff6629e86633" dependencies = [ "atomic-waker", "bytes", @@ -1382,9 +1382,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" +checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" dependencies = [ "equivalent", "hashbrown", @@ -1476,9 +1476,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.171" +version = "0.2.172" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" +checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" [[package]] name = "libloading" @@ -1492,9 +1492,9 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.11" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" +checksum = "c9627da5196e5d8ed0b0495e61e518847578da83483c37288316d9b2e03a7f72" [[package]] name = "libmimalloc-sys" @@ -1514,9 +1514,9 @@ checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "linux-raw-sys" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413" +checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" [[package]] name = "litemap" @@ -1580,9 +1580,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.5" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" +checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" dependencies = [ "adler2", ] @@ -1706,9 +1706,9 @@ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "openssl" -version = "0.10.71" +version = "0.10.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" +checksum = "fedfea7d58a1f73118430a55da6a286e7b044961736ce96a16a17068ea25e5da" dependencies = [ "bitflags", "cfg-if", @@ -1738,18 +1738,18 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-src" -version = "300.4.2+3.4.1" +version = "300.5.0+3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168ce4e058f975fe43e89d9ccf78ca668601887ae736090aacc23ae353c298e2" +checksum = "e8ce546f549326b0e6052b649198487d91320875da901e7bd11a06d1ee3f9c2f" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.106" +version = "0.9.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd" +checksum = "8288979acd84749c744a9014b4382d42b8f7b2592847b5afb2ed29e5d16ede07" dependencies = [ "cc", "libc", @@ -1847,9 +1847,9 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.31" +version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5316f57387668042f561aae71480de936257848f9c43ce528e311d89a07cadeb" +checksum = "664ec5419c51e34154eec046ebcba56312d5a2fc3b09a06da188e1ad21afadf6" dependencies = [ "proc-macro2", "syn", @@ -1857,9 +1857,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.94" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" dependencies = [ "unicode-ident", ] @@ -1893,13 +1893,13 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.10" +version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b820744eb4dc9b57a3398183639c511b5a26d2ed702cedd3febaa1393caa22cc" +checksum = "bcbafbbdbb0f638fe3f35f3c56739f77a8a1d070cb25603226c83339b391472b" dependencies = [ "bytes", "getrandom 0.3.2", - "rand 0.9.0", + "rand 0.9.1", "ring", "rustc-hash 2.1.1", "rustls", @@ -1956,13 +1956,12 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" +checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", - "zerocopy 0.8.24", ] [[package]] @@ -2077,7 +2076,7 @@ checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.15", + "getrandom 0.2.16", "libc", "untrusted 0.9.0", "windows-sys 0.52.0", @@ -2173,7 +2172,7 @@ dependencies = [ "lru", "pin-project-lite", "quinn", - "rand 0.9.0", + "rand 0.9.1", "rpxy-acme", "rpxy-certs", "rustls", @@ -2241,15 +2240,15 @@ dependencies = [ "bitflags", "errno", "libc", - "linux-raw-sys 0.9.3", + "linux-raw-sys 0.9.4", "windows-sys 0.59.0", ] [[package]] name = "rustls" -version = "0.23.25" +version = "0.23.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "822ee9188ac4ec04a2f0531e55d035fb2de73f18b41a63c70c2712503b6fb13c" +checksum = "df51b5869f3a441595eac5e8ff14d486ff285f7b8c0df8770e49c3b56351f0f0" dependencies = [ "aws-lc-rs", "log", @@ -2393,7 +2392,7 @@ dependencies = [ "cuckoofilter", "futures", "hash_hasher", - "rand 0.9.0", + "rand 0.9.1", "rand_chacha 0.9.0", "s2n-codec", "s2n-quic-core", @@ -2514,9 +2513,9 @@ dependencies = [ [[package]] name = "s2n-tls" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebf1868fc9471aa5461c3b29c5e11011a5d3cbe36ce62d2a12d33d3681859b80" +checksum = "c2a05886fe90b529c7ffef6b8b5542e26e21e3b0e66612673395c7ecedde0e30" dependencies = [ "errno", "hex", @@ -2527,9 +2526,9 @@ dependencies = [ [[package]] name = "s2n-tls-sys" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f49b6ace3b4f332bc550f4ddbf1c1cd4250b10be223ec23a29e28db1e51f3fd" +checksum = "c69b480e275a5c3016307c589f2f71bbf9ea21c102e7ce3c19316d908bf0c21f" dependencies = [ "aws-lc-rs", "cc", @@ -2683,9 +2682,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.14.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" +checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" [[package]] name = "socket2" @@ -2939,9 +2938,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.14" +version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b9590b93e6fcc1739458317cccd391ad3955e2bde8913edf6f95f9e65a8f034" +checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" dependencies = [ "bytes", "futures-core", @@ -3507,9 +3506,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e97b544156e9bebe1a0ffbc03484fc1ffe3100cbce3ffb17eac35f7cdd7ab36" +checksum = "63d3fcd9bba44b03821e7d699eeee959f3126dcc4aa8e4ae18ec617c2a5cea10" dependencies = [ "memchr", ] diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index f08bace..356a991 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -24,7 +24,7 @@ aws-lc-rs = { version = "1.13.0", default-features = false, features = [ "aws-lc-sys", ] } blocking = "1.6.1" -rustls = { version = "0.23.25", default-features = false, features = [ +rustls = { version = "0.23.26", default-features = false, features = [ "std", "aws_lc_rs", ] } @@ -34,5 +34,5 @@ rustls-acme = { path = "../submodules/rustls-acme/", default-features = false, f ] } rustls-post-quantum = { version = "0.2.2", optional = true } tokio = { version = "1.44.2", default-features = false } -tokio-util = { version = "0.7.14", default-features = false } +tokio-util = { version = "0.7.15", default-features = false } tokio-stream = { version = "0.1.17", default-features = false } diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index ab15d8a..d9f5d7f 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -32,7 +32,7 @@ rpxy-lib = { path = "../rpxy-lib/", default-features = false, features = [ # TODO: pin mimalloc due to compilation failure by musl mimalloc = { version = "=0.1.44", default-features = false } libmimalloc-sys = { version = "=0.1.40" } -anyhow = "1.0.97" +anyhow = "1.0.98" ahash = "0.8.11" serde = { version = "1.0.219", default-features = false, features = ["derive"] } tokio = { version = "1.44.2", default-features = false, features = [ @@ -42,12 +42,12 @@ tokio = { version = "1.44.2", default-features = false, features = [ "sync", "macros", ] } -tokio-util = { version = "0.7.14", default-features = false } +tokio-util = { version = "0.7.15", default-features = false } async-trait = "0.1.88" futures-util = { version = "0.3.31", default-features = false } # config -clap = { version = "4.5.35", features = ["std", "cargo", "wrap_help"] } +clap = { version = "4.5.37", features = ["std", "cargo", "wrap_help"] } toml = { version = "0.8.20", default-features = false, features = ["parse"] } hot_reload = "0.1.9" serde_ignored = "0.1.11" diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index 92d4ed1..2bad8fc 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -22,7 +22,7 @@ derive_builder = { version = "0.20.2" } thiserror = { version = "2.0.12" } hot_reload = { version = "0.1.9" } async-trait = { version = "0.1.88" } -rustls = { version = "0.23.25", default-features = false, features = [ +rustls = { version = "0.23.26", default-features = false, features = [ "std", "aws_lc_rs", ] } diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 20b3023..20cf272 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -36,7 +36,7 @@ post-quantum = [ ] [dependencies] -rand = "0.9.0" +rand = "0.9.1" ahash = "0.8.11" bytes = "1.10.1" derive_builder = "0.20.2" @@ -49,12 +49,12 @@ tokio = { version = "1.44.2", default-features = false, features = [ "macros", "fs", ] } -tokio-util = { version = "0.7.14", default-features = false } +tokio-util = { version = "0.7.15", default-features = false } pin-project-lite = "0.2.16" async-trait = "0.1.88" # Error handling -anyhow = "1.0.97" +anyhow = "1.0.98" thiserror = "2.0.12" # http for both server and client @@ -80,7 +80,7 @@ hyper-rustls = { version = "0.27.5", default-features = false, features = [ # tls and cert management for server rpxy-certs = { path = "../rpxy-certs/", default-features = false } hot_reload = "0.1.9" -rustls = { version = "0.23.25", default-features = false } +rustls = { version = "0.23.26", default-features = false } rustls-post-quantum = { version = "0.2.2", optional = true } tokio-rustls = { version = "0.26.2", features = ["early-data"] } From 275135c33de77bf74a3a3cb7e05b975e2c28f369 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Mon, 28 Apr 2025 10:14:15 +0900 Subject: [PATCH 095/142] deps: toml --- Cargo.lock | 54 ++++++++++++++++++++++---------------------- rpxy-acme/Cargo.toml | 2 +- rpxy-bin/Cargo.toml | 2 +- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8b60999..982ff62 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -406,9 +406,9 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "cc" -version = "1.2.19" +version = "1.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e3a13707ac958681c13b39b458c073d0d9bc8a22cb1b2f4c8e55eb72c13f362" +checksum = "04da6a0d40b948dfc4fa8f5bbf402b0fc1a64a28dbf7d12ffd683550f2c1b63a" dependencies = [ "jobserver", "libc", @@ -1842,7 +1842,7 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" dependencies = [ - "zerocopy 0.8.24", + "zerocopy 0.8.25", ] [[package]] @@ -2316,9 +2316,9 @@ dependencies = [ [[package]] name = "rustls-platform-verifier" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5467026f437b4cb2a533865eaa73eb840019a0916f4b9ec563c6e617e086c9" +checksum = "4937d110d34408e9e5ad30ba0b0ca3b6a8a390f8db3636db60144ac4fa792750" dependencies = [ "core-foundation 0.10.0", "core-foundation-sys", @@ -2380,7 +2380,7 @@ version = "0.57.0" dependencies = [ "byteorder", "bytes", - "zerocopy 0.8.24", + "zerocopy 0.8.25", ] [[package]] @@ -2402,7 +2402,7 @@ dependencies = [ "s2n-quic-tls-default", "s2n-quic-transport", "tokio", - "zerocopy 0.8.24", + "zerocopy 0.8.25", "zeroize", ] @@ -2422,7 +2422,7 @@ dependencies = [ "pin-project-lite", "s2n-codec", "subtle", - "zerocopy 0.8.24", + "zerocopy 0.8.25", ] [[package]] @@ -2716,9 +2716,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.100" +version = "2.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" +checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" dependencies = [ "proc-macro2", "quote", @@ -2951,9 +2951,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" +checksum = "900f6c86a685850b1bc9f6223b20125115ee3f31e01207d81655bbcc0aea9231" dependencies = [ "serde", "serde_spanned", @@ -2963,18 +2963,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +checksum = "3da5db5a963e24bc68be8b17b6fa82814bb22ee8660f192bb182771d498f09a3" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.24" +version = "0.22.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" +checksum = "10558ed0bd2a1562e630926a2d1f0b98c827da99fabd3fe20920a59642504485" dependencies = [ "indexmap", "serde", @@ -3238,18 +3238,18 @@ dependencies = [ [[package]] name = "webpki-root-certs" -version = "0.26.8" +version = "0.26.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09aed61f5e8d2c18344b3faa33a4c837855fe56642757754775548fee21386c4" +checksum = "180d2741b6115c3d906577e6533ad89472d48d96df00270fccb78233073d77f7" dependencies = [ "rustls-pki-types", ] [[package]] name = "webpki-roots" -version = "0.26.8" +version = "0.26.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2210b291f7ea53617fbafcc4939f10914214ec15aace5ba62293a668f322c5c9" +checksum = "29aad86cec885cafd03e8305fd727c418e970a521322c91688414d5b8efba16b" dependencies = [ "rustls-pki-types", ] @@ -3506,9 +3506,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63d3fcd9bba44b03821e7d699eeee959f3126dcc4aa8e4ae18ec617c2a5cea10" +checksum = "6cb8234a863ea0e8cd7284fcdd4f145233eb00fee02bbdd9861aec44e6477bc5" dependencies = [ "memchr", ] @@ -3595,11 +3595,11 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.24" +version = "0.8.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879" +checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" dependencies = [ - "zerocopy-derive 0.8.24", + "zerocopy-derive 0.8.25", ] [[package]] @@ -3615,9 +3615,9 @@ dependencies = [ [[package]] name = "zerocopy-derive" -version = "0.8.24" +version = "0.8.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a996a8f63c5c4448cd959ac1bab0aaa3306ccfd060472f85943ee0750f0169be" +checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" dependencies = [ "proc-macro2", "quote", diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index 356a991..f33fd19 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -28,7 +28,7 @@ rustls = { version = "0.23.26", default-features = false, features = [ "std", "aws_lc_rs", ] } -rustls-platform-verifier = { version = "0.5.1" } +rustls-platform-verifier = { version = "0.5.2" } rustls-acme = { path = "../submodules/rustls-acme/", default-features = false, features = [ "aws-lc-rs", ] } diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index d9f5d7f..27b283f 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -48,7 +48,7 @@ futures-util = { version = "0.3.31", default-features = false } # config clap = { version = "4.5.37", features = ["std", "cargo", "wrap_help"] } -toml = { version = "0.8.20", default-features = false, features = ["parse"] } +toml = { version = "0.8.21", default-features = false, features = ["parse"] } hot_reload = "0.1.9" serde_ignored = "0.1.11" From f252959a2f2bfe145c968ae1e0cd09783704e0cd Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Mon, 28 Apr 2025 16:29:21 +0900 Subject: [PATCH 096/142] change log dir option from toml to command line --- CHANGELOG.md | 7 +++- Cargo.lock | 8 ++--- Cargo.toml | 2 +- README.md | 9 ++++-- rpxy-bin/src/config/parse.rs | 25 +++++++------- rpxy-bin/src/config/toml.rs | 2 +- rpxy-bin/src/log.rs | 7 +++- rpxy-bin/src/main.rs | 63 +++++++++++++----------------------- 8 files changed, 61 insertions(+), 62 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18deef2..c54ced1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # CHANGELOG -## 0.9.8 or 0.10.0 (Unreleased) +## 0.10.0 (Unreleased) + +### Important Changes + +- [Breaking] We removed non-`watch` execute option and enabled the dynamic reloading of the config file by default. +- We newly added `log-dir` execute option to specify the directory for `access.log`,`error.log` and `rpxy.log`. This is optional, and if not specified, the logs are written to the standard output by default. ## 0.9.7 diff --git a/Cargo.lock b/Cargo.lock index 982ff62..2b6624f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2084,7 +2084,7 @@ dependencies = [ [[package]] name = "rpxy" -version = "0.9.7" +version = "0.10.0" dependencies = [ "ahash", "anyhow", @@ -2108,7 +2108,7 @@ dependencies = [ [[package]] name = "rpxy-acme" -version = "0.9.7" +version = "0.10.0" dependencies = [ "ahash", "async-trait", @@ -2129,7 +2129,7 @@ dependencies = [ [[package]] name = "rpxy-certs" -version = "0.9.7" +version = "0.10.0" dependencies = [ "ahash", "async-trait", @@ -2147,7 +2147,7 @@ dependencies = [ [[package]] name = "rpxy-lib" -version = "0.9.7" +version = "0.10.0" dependencies = [ "ahash", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index 1ee3118..211fce7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "0.9.7" +version = "0.10.0" authors = ["Jun Kurihara"] homepage = "https://github.com/junkurihara/rust-rpxy" repository = "https://github.com/junkurihara/rust-rpxy" diff --git a/README.md b/README.md index c7a1183..07b48d0 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ You can run `rpxy` with a configuration file like % ./target/release/rpxy --config config.toml ``` -If you specify `-w` option along with the config file path, `rpxy` tracks the change of `config.toml` in the real-time manner and apply the change immediately without restarting the process. +`rpxy` tracks the change of `config.toml` in the real-time manner and apply the change immediately without restarting the process. The full help messages are given follows. @@ -89,11 +89,16 @@ usage: rpxy [OPTIONS] --config Options: -c, --config Configuration file path like ./config.toml - -w, --watch Activate dynamic reloading of the config file via continuous monitoring -h, --help Print help -V, --version Print version ``` +If you set `--log-dir=`, the log files are created in the specified directory. Otherwise, the log is printed to stdout. + +- `${log_dir}/access.log` for access log +- `${log_dir}/error.log` for error log +- `${log_dir}/rpxy.log` for system log + That's all! ## Basic Configuration diff --git a/rpxy-bin/src/config/parse.rs b/rpxy-bin/src/config/parse.rs index fdc4b67..219abb1 100644 --- a/rpxy-bin/src/config/parse.rs +++ b/rpxy-bin/src/config/parse.rs @@ -1,18 +1,18 @@ use super::toml::ConfigToml; use crate::error::{anyhow, ensure}; use ahash::HashMap; -use clap::{Arg, ArgAction}; +use clap::Arg; use hot_reload::{ReloaderReceiver, ReloaderService}; -use rpxy_certs::{build_cert_reloader, CryptoFileSourceBuilder, CryptoReloader, ServerCryptoBase}; +use rpxy_certs::{CryptoFileSourceBuilder, CryptoReloader, ServerCryptoBase, build_cert_reloader}; use rpxy_lib::{AppConfig, AppConfigList, ProxyConfig}; #[cfg(feature = "acme")] -use rpxy_acme::{AcmeManager, ACME_DIR_URL, ACME_REGISTRY_PATH}; +use rpxy_acme::{ACME_DIR_URL, ACME_REGISTRY_PATH, AcmeManager}; /// Parsed options pub struct Opts { pub config_file_path: String, - pub watch: bool, + pub log_dir_path: Option, } /// Parse arg values passed from cli @@ -28,19 +28,22 @@ pub fn parse_opts() -> Result { .help("Configuration file path like ./config.toml"), ) .arg( - Arg::new("watch") - .long("watch") - .short('w') - .action(ArgAction::SetTrue) - .help("Activate dynamic reloading of the config file via continuous monitoring"), + Arg::new("log_dir") + .long("log-dir") + .short('l') + .value_name("LOG_DIR") + .help("Directory for log files. If not specified, logs are printed to stdout."), ); let matches = options.get_matches(); /////////////////////////////////// let config_file_path = matches.get_one::("config_file").unwrap().to_owned(); - let watch = matches.get_one::("watch").unwrap().to_owned(); + let log_dir_path = matches.get_one::("log_dir").map(|v| v.to_owned()); - Ok(Opts { config_file_path, watch }) + Ok(Opts { + config_file_path, + log_dir_path, + }) } pub fn build_settings(config: &ConfigToml) -> std::result::Result<(ProxyConfig, AppConfigList), anyhow::Error> { diff --git a/rpxy-bin/src/config/toml.rs b/rpxy-bin/src/config/toml.rs index 36eecdf..b65db91 100644 --- a/rpxy-bin/src/config/toml.rs +++ b/rpxy-bin/src/config/toml.rs @@ -4,7 +4,7 @@ use crate::{ log::warn, }; use ahash::HashMap; -use rpxy_lib::{reexports::Uri, AppConfig, ProxyConfig, ReverseProxyConfig, TlsConfig, UpstreamUri}; +use rpxy_lib::{AppConfig, ProxyConfig, ReverseProxyConfig, TlsConfig, UpstreamUri, reexports::Uri}; use serde::Deserialize; use std::{fs, net::SocketAddr}; use tokio::time::Duration; diff --git a/rpxy-bin/src/log.rs b/rpxy-bin/src/log.rs index dd98b77..3a9d6bd 100644 --- a/rpxy-bin/src/log.rs +++ b/rpxy-bin/src/log.rs @@ -5,7 +5,12 @@ use tracing_subscriber::{fmt, prelude::*}; pub use tracing::{debug, error, info, warn}; /// Initialize the logger with the RUST_LOG environment variable. -pub fn init_logger() { +pub fn init_logger(log_dir_path: Option<&str>) { + if log_dir_path.is_some() { + // TODO: + println!("Activate logging to files") + } + let level_string = std::env::var("RUST_LOG").unwrap_or_else(|_| "info".to_string()); let level = tracing::Level::from_str(level_string.as_str()).unwrap_or(tracing::Level::INFO); diff --git a/rpxy-bin/src/main.rs b/rpxy-bin/src/main.rs index b0bf25e..822037d 100644 --- a/rpxy-bin/src/main.rs +++ b/rpxy-bin/src/main.rs @@ -20,8 +20,6 @@ use std::sync::Arc; use tokio_util::sync::CancellationToken; fn main() { - init_logger(); - let mut runtime_builder = tokio::runtime::Builder::new_multi_thread(); runtime_builder.enable_all(); runtime_builder.thread_name("rpxy"); @@ -30,40 +28,34 @@ fn main() { runtime.block_on(async { // Initially load options let Ok(parsed_opts) = parse_opts() else { - error!("Invalid toml file"); std::process::exit(1); }; - if !parsed_opts.watch { - if let Err(e) = rpxy_service_without_watcher(&parsed_opts.config_file_path, runtime.handle().clone()).await { - error!("rpxy service existed: {e}"); - std::process::exit(1); - } - } else { - let (config_service, config_rx) = ReloaderService::::new( - &parsed_opts.config_file_path, - CONFIG_WATCH_DELAY_SECS, - false, - ) - .await - .unwrap(); + init_logger(parsed_opts.log_dir_path.as_deref()); - tokio::select! { - config_res = config_service.start() => { - if let Err(e) = config_res { - error!("config reloader service exited: {e}"); - std::process::exit(1); - } - } - rpxy_res = rpxy_service_with_watcher(config_rx, runtime.handle().clone()) => { - if let Err(e) = rpxy_res { - error!("rpxy service existed: {e}"); - std::process::exit(1); - } + let (config_service, config_rx) = ReloaderService::::new( + &parsed_opts.config_file_path, + CONFIG_WATCH_DELAY_SECS, + false, + ) + .await + .unwrap(); + + tokio::select! { + config_res = config_service.start() => { + if let Err(e) = config_res { + error!("config reloader service exited: {e}"); + std::process::exit(1); + } + } + rpxy_res = rpxy_service(config_rx, runtime.handle().clone()) => { + if let Err(e) = rpxy_res { + error!("rpxy service existed: {e}"); + std::process::exit(1); } } - std::process::exit(0); } + std::process::exit(0); }); } @@ -233,18 +225,7 @@ impl RpxyService { } } -async fn rpxy_service_without_watcher( - config_file_path: &str, - runtime_handle: tokio::runtime::Handle, -) -> Result<(), anyhow::Error> { - info!("Start rpxy service"); - let config_toml = ConfigToml::new(config_file_path).map_err(|e| anyhow!("Invalid toml file: {e}"))?; - let service = RpxyService::new(&config_toml, runtime_handle).await?; - // Create cancel token that is never be called as dummy - service.start(tokio_util::sync::CancellationToken::new()).await -} - -async fn rpxy_service_with_watcher( +async fn rpxy_service( mut config_rx: ReloaderReceiver, runtime_handle: tokio::runtime::Handle, ) -> Result<(), anyhow::Error> { From 5dac2c60aa4a44051191a061b68af487dd2f0e3c Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Mon, 28 Apr 2025 17:55:54 +0900 Subject: [PATCH 097/142] docs: update readme --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 07b48d0..2f90401 100644 --- a/README.md +++ b/README.md @@ -88,9 +88,10 @@ The full help messages are given follows. usage: rpxy [OPTIONS] --config Options: - -c, --config Configuration file path like ./config.toml - -h, --help Print help - -V, --version Print version + -c, --config Configuration file path like ./config.toml + -l, --log-dir Directory for log files. If not specified, logs are printed to stdout. + -h, --help Print help + -V, --version Print version ``` If you set `--log-dir=`, the log files are created in the specified directory. Otherwise, the log is printed to stdout. From 5cf2b0c5689307b5bec113dff551c30ca8649ab6 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Mon, 28 Apr 2025 19:09:48 +0900 Subject: [PATCH 098/142] wip: impelement file logger --- README.md | 4 ++-- rpxy-bin/src/log.rs | 37 ++++++++++++++++++++++++++++++++----- 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2f90401..e114859 100644 --- a/README.md +++ b/README.md @@ -97,8 +97,8 @@ Options: If you set `--log-dir=`, the log files are created in the specified directory. Otherwise, the log is printed to stdout. - `${log_dir}/access.log` for access log -- `${log_dir}/error.log` for error log -- `${log_dir}/rpxy.log` for system log + +- `${log_dir}/rpxy.log` for system and error log That's all! diff --git a/rpxy-bin/src/log.rs b/rpxy-bin/src/log.rs index 3a9d6bd..16a6b60 100644 --- a/rpxy-bin/src/log.rs +++ b/rpxy-bin/src/log.rs @@ -6,14 +6,30 @@ pub use tracing::{debug, error, info, warn}; /// Initialize the logger with the RUST_LOG environment variable. pub fn init_logger(log_dir_path: Option<&str>) { - if log_dir_path.is_some() { - // TODO: - println!("Activate logging to files") - } - let level_string = std::env::var("RUST_LOG").unwrap_or_else(|_| "info".to_string()); let level = tracing::Level::from_str(level_string.as_str()).unwrap_or(tracing::Level::INFO); + match log_dir_path { + None => { + // log to stdout + init_stdio_logger(level); + } + Some(log_dir_path) => { + // log to files + println!("Activate logging to files: {log_dir_path}"); + init_file_logger(level, log_dir_path); + } + } +} + +/// file logging +fn init_file_logger(level: tracing::Level, log_dir_path: &str) { + // TODO: implement + init_stdio_logger(level); +} + +/// stdio logging +fn init_stdio_logger(level: tracing::Level) { // This limits the logger to emits only this crate with any level above RUST_LOG, for included crates it will emit only ERROR (in prod)/INFO (in dev) or above level. let stdio_layer = fmt::layer().with_level(true).with_thread_ids(false); if level <= tracing::Level::INFO { @@ -47,3 +63,14 @@ pub fn init_logger(log_dir_path: Option<&str>) { tracing_subscriber::registry().with(stdio_layer).init(); }; } + +#[inline] +/// Create a file for logging +fn open_log_file(path: &str) -> std::fs::File { + // crate a file if it does not exist + std::fs::OpenOptions::new() + .create(true) + .append(true) + .open(path) + .expect("Failed to open the log file") +} From 782ae860724706f21d76cc98eef2aeb29130e549 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 30 Apr 2025 10:01:37 +0900 Subject: [PATCH 099/142] deps --- Cargo.lock | 12 ++++++------ rpxy-bin/Cargo.toml | 2 +- rpxy-lib/Cargo.toml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 982ff62..53b5d9a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -444,9 +444,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.40" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" +checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" dependencies = [ "android-tzdata", "iana-time-zone", @@ -2951,9 +2951,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.21" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900f6c86a685850b1bc9f6223b20125115ee3f31e01207d81655bbcc0aea9231" +checksum = "05ae329d1f08c4d17a59bed7ff5b5a769d062e64a62d34a3261b219e62cd5aae" dependencies = [ "serde", "serde_spanned", @@ -2972,9 +2972,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.25" +version = "0.22.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10558ed0bd2a1562e630926a2d1f0b98c827da99fabd3fe20920a59642504485" +checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e" dependencies = [ "indexmap", "serde", diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index 27b283f..16c6916 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -48,7 +48,7 @@ futures-util = { version = "0.3.31", default-features = false } # config clap = { version = "4.5.37", features = ["std", "cargo", "wrap_help"] } -toml = { version = "0.8.21", default-features = false, features = ["parse"] } +toml = { version = "0.8.22", default-features = false, features = ["parse"] } hot_reload = "0.1.9" serde_ignored = "0.1.11" diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index cfd22b7..8cfad09 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -112,7 +112,7 @@ lru = { version = "0.14.0", optional = true } sha2 = { version = "0.10.8", default-features = false, optional = true } # cookie handling for sticky cookie -chrono = { version = "0.4.40", default-features = false, features = [ +chrono = { version = "0.4.41", default-features = false, features = [ "unstable-locales", "alloc", "clock", From d5b020dcfb9088e9d0147d999dc2f472361de3f1 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 30 Apr 2025 17:36:14 +0900 Subject: [PATCH 100/142] feat: add log-to-file --- rpxy-bin/src/constants.rs | 3 + rpxy-bin/src/log.rs | 71 +++++++++++++++++-- rpxy-lib/src/constants.rs | 6 ++ rpxy-lib/src/forwarder/cache/cache_main.rs | 36 +++------- rpxy-lib/src/lib.rs | 1 + rpxy-lib/src/log.rs | 2 +- rpxy-lib/src/message_handler/handler_main.rs | 2 +- .../handler_manipulate_messages.rs | 8 +-- rpxy-lib/src/message_handler/http_log.rs | 55 +++++++------- rpxy-lib/src/proxy/proxy_h3.rs | 10 +-- rpxy-lib/src/proxy/proxy_quic_quinn.rs | 4 +- rpxy-lib/src/proxy/proxy_quic_s2n.rs | 2 +- 12 files changed, 130 insertions(+), 70 deletions(-) diff --git a/rpxy-bin/src/constants.rs b/rpxy-bin/src/constants.rs index 2f27735..889f7d5 100644 --- a/rpxy-bin/src/constants.rs +++ b/rpxy-bin/src/constants.rs @@ -5,3 +5,6 @@ pub const CONFIG_WATCH_DELAY_SECS: u32 = 15; #[cfg(feature = "cache")] // Cache directory pub const CACHE_DIR: &str = "./cache"; + +pub(crate) const ACCESS_LOG_FILE: &str = "access.log"; +pub(crate) const SYSTEM_LOG_FILE: &str = "rpxy.log"; diff --git a/rpxy-bin/src/log.rs b/rpxy-bin/src/log.rs index 16a6b60..151c94b 100644 --- a/rpxy-bin/src/log.rs +++ b/rpxy-bin/src/log.rs @@ -1,3 +1,5 @@ +use crate::constants::{ACCESS_LOG_FILE, SYSTEM_LOG_FILE}; +use rpxy_lib::log_event_names; use std::str::FromStr; use tracing_subscriber::{fmt, prelude::*}; @@ -22,10 +24,56 @@ pub fn init_logger(log_dir_path: Option<&str>) { } } -/// file logging +/// file logging TODO: fn init_file_logger(level: tracing::Level, log_dir_path: &str) { - // TODO: implement - init_stdio_logger(level); + let log_dir_path = std::path::PathBuf::from(log_dir_path); + // create the directory if it does not exist + if !log_dir_path.exists() { + println!("Directory does not exist, creating: {}", log_dir_path.display()); + std::fs::create_dir_all(&log_dir_path).expect("Failed to create log directory"); + } + let access_log_path = log_dir_path.join(ACCESS_LOG_FILE); + let system_log_path = log_dir_path.join(SYSTEM_LOG_FILE); + println!("Access log: {}", access_log_path.display()); + println!("System and error log: {}", system_log_path.display()); + + let access_log = open_log_file(&access_log_path); + let system_log = open_log_file(&system_log_path); + + let reg = tracing_subscriber::registry(); + + let access_log_base = fmt::layer() + .with_line_number(false) + .with_thread_ids(false) + .with_thread_names(false) + .with_target(false) + .with_level(false) + .compact() + .with_ansi(false); + let reg = reg.with(access_log_base.with_writer(access_log).with_filter(AccessLogFilter)); + + let system_log_base = fmt::layer() + .with_line_number(false) + .with_thread_ids(false) + .with_thread_names(false) + .with_target(false) + .with_level(true) // with level for system log + .compact() + .with_ansi(false); + let reg = reg.with( + system_log_base + .with_writer(system_log) + .with_filter(tracing_subscriber::filter::filter_fn(move |metadata| { + (metadata + .target() + .starts_with(env!("CARGO_PKG_NAME").replace('-', "_").as_str()) + && metadata.name() != log_event_names::ACCESS_LOG + && metadata.level() <= &level) + || metadata.level() <= &tracing::Level::WARN.min(level) + })), + ); + + reg.init(); } /// stdio logging @@ -64,9 +112,24 @@ fn init_stdio_logger(level: tracing::Level) { }; } +/// Access log filter +struct AccessLogFilter; +impl tracing_subscriber::layer::Filter for AccessLogFilter { + fn enabled(&self, metadata: &tracing::Metadata<'_>, _: &tracing_subscriber::layer::Context<'_, S>) -> bool { + metadata + .target() + .starts_with(env!("CARGO_PKG_NAME").replace('-', "_").as_str()) + && metadata.name().contains(log_event_names::ACCESS_LOG) + && metadata.level() <= &tracing::Level::INFO + } +} + #[inline] /// Create a file for logging -fn open_log_file(path: &str) -> std::fs::File { +fn open_log_file

(path: P) -> std::fs::File +where + P: AsRef, +{ // crate a file if it does not exist std::fs::OpenOptions::new() .create(true) diff --git a/rpxy-lib/src/constants.rs b/rpxy-lib/src/constants.rs index 9e2bc6a..3f21d87 100644 --- a/rpxy-lib/src/constants.rs +++ b/rpxy-lib/src/constants.rs @@ -32,3 +32,9 @@ pub const MAX_CACHE_EACH_SIZE: usize = 65_535; pub const MAX_CACHE_EACH_SIZE_ON_MEMORY: usize = 4_096; // TODO: max cache size in total + +/// Logging event name TODO: Other separated logs? +pub mod log_event_names { + /// access log + pub const ACCESS_LOG: &str = "rpxy::access"; +} diff --git a/rpxy-lib/src/forwarder/cache/cache_main.rs b/rpxy-lib/src/forwarder/cache/cache_main.rs index edb1ec5..37e1fa9 100644 --- a/rpxy-lib/src/forwarder/cache/cache_main.rs +++ b/rpxy-lib/src/forwarder/cache/cache_main.rs @@ -1,10 +1,10 @@ use super::cache_error::*; use crate::{ globals::Globals, - hyper_ext::body::{full, BoxBody, ResponseBody, UnboundedStreamBody}, + hyper_ext::body::{BoxBody, ResponseBody, UnboundedStreamBody, full}, log::*, }; -use base64::{engine::general_purpose, Engine as _}; +use base64::{Engine as _, engine::general_purpose}; use bytes::{Buf, Bytes, BytesMut}; use futures::channel::mpsc; use http::{Request, Response, Uri}; @@ -16,8 +16,8 @@ use sha2::{Digest, Sha256}; use std::{ path::{Path, PathBuf}, sync::{ - atomic::{AtomicUsize, Ordering}, Arc, Mutex, + atomic::{AtomicUsize, Ordering}, }, time::SystemTime, }; @@ -59,9 +59,7 @@ impl RpxyCache { let max_each_size = globals.proxy_config.cache_max_each_size; let mut max_each_size_on_memory = globals.proxy_config.cache_max_each_size_on_memory; if max_each_size < max_each_size_on_memory { - warn!( - "Maximum size of on memory cache per entry must be smaller than or equal to the maximum of each file cache" - ); + warn!("Maximum size of on memory cache per entry must be smaller than or equal to the maximum of each file cache"); max_each_size_on_memory = max_each_size; } @@ -89,12 +87,7 @@ impl RpxyCache { } /// Put response into the cache - pub(crate) async fn put( - &self, - uri: &hyper::Uri, - mut body: Incoming, - policy: &CachePolicy, - ) -> CacheResult { + pub(crate) async fn put(&self, uri: &hyper::Uri, mut body: Incoming, policy: &CachePolicy) -> CacheResult { let cache_manager = self.inner.clone(); let mut file_store = self.file_store.clone(); let uri = uri.clone(); @@ -155,7 +148,7 @@ impl RpxyCache { let mut hasher = Sha256::new(); hasher.update(buf.as_ref()); let hash_bytes = Bytes::copy_from_slice(hasher.finalize().as_ref()); - debug!("Cached data: {} bytes, hash = {:?}", size, hash_bytes); + trace!("Cached data: {} bytes, hash = {:?}", size, hash_bytes); // Create cache object let cache_key = derive_cache_key_from_uri(&uri); @@ -188,10 +181,7 @@ impl RpxyCache { /// Get cached response pub(crate) async fn get(&self, req: &Request) -> Option> { - debug!( - "Current cache status: (total, on-memory, file) = {:?}", - self.count().await - ); + trace!("Current cache status: (total, on-memory, file) = {:?}", self.count().await); let cache_key = derive_cache_key_from_uri(req.uri()); // First check cache chance @@ -282,11 +272,7 @@ impl FileStore { }; } /// Read a temporary file cache - async fn read( - &self, - path: impl AsRef + Send + Sync + 'static, - hash: &Bytes, - ) -> CacheResult { + async fn read(&self, path: impl AsRef + Send + Sync + 'static, hash: &Bytes) -> CacheResult { let inner = self.inner.read().await; inner.read(path, hash).await } @@ -336,11 +322,7 @@ impl FileStoreInner { } /// Retrieve a stored temporary file cache - async fn read( - &self, - path: impl AsRef + Send + Sync + 'static, - hash: &Bytes, - ) -> CacheResult { + async fn read(&self, path: impl AsRef + Send + Sync + 'static, hash: &Bytes) -> CacheResult { let Ok(mut file) = File::open(&path).await else { warn!("Cache file object cannot be opened"); return Err(CacheError::FailedToOpenCacheFile); diff --git a/rpxy-lib/src/lib.rs b/rpxy-lib/src/lib.rs index 4ec60e0..72ddbd3 100644 --- a/rpxy-lib/src/lib.rs +++ b/rpxy-lib/src/lib.rs @@ -27,6 +27,7 @@ use std::sync::Arc; use tokio_util::sync::CancellationToken; /* ------------------------------------------------ */ +pub use crate::constants::log_event_names; pub use crate::globals::{AppConfig, AppConfigList, ProxyConfig, ReverseProxyConfig, TlsConfig, UpstreamUri}; pub mod reexports { pub use hyper::Uri; diff --git a/rpxy-lib/src/log.rs b/rpxy-lib/src/log.rs index c55b5c2..f4af411 100644 --- a/rpxy-lib/src/log.rs +++ b/rpxy-lib/src/log.rs @@ -1 +1 @@ -pub use tracing::{debug, error, info, warn}; +pub use tracing::{debug, error, info, trace, warn}; diff --git a/rpxy-lib/src/message_handler/handler_main.rs b/rpxy-lib/src/message_handler/handler_main.rs index 23133a2..9496e6a 100644 --- a/rpxy-lib/src/message_handler/handler_main.rs +++ b/rpxy-lib/src/message_handler/handler_main.rs @@ -71,7 +71,7 @@ where Ok(v) } Err(e) => { - error!("{e}"); + error!("{e}: {log_data}"); let code = StatusCode::from(e); log_data.status_code(&code).output(); synthetic_error_response(code) diff --git a/rpxy-lib/src/message_handler/handler_manipulate_messages.rs b/rpxy-lib/src/message_handler/handler_manipulate_messages.rs index e7cecc4..680c6ee 100644 --- a/rpxy-lib/src/message_handler/handler_manipulate_messages.rs +++ b/rpxy-lib/src/message_handler/handler_manipulate_messages.rs @@ -1,11 +1,11 @@ -use super::{handler_main::HandlerContext, utils_headers::*, utils_request::update_request_line, HttpMessageHandler}; +use super::{HttpMessageHandler, handler_main::HandlerContext, utils_headers::*, utils_request::update_request_line}; use crate::{ backend::{BackendApp, UpstreamCandidates}, constants::RESPONSE_HEADER_SERVER, log::*, }; -use anyhow::{anyhow, ensure, Result}; -use http::{header, HeaderValue, Request, Response, Uri}; +use anyhow::{Result, anyhow, ensure}; +use http::{HeaderValue, Request, Response, Uri, header}; use hyper_util::client::legacy::connect::Connect; use std::net::SocketAddr; @@ -66,7 +66,7 @@ where upstream_candidates: &UpstreamCandidates, tls_enabled: bool, ) -> Result { - debug!("Generate request to be forwarded"); + trace!("Generate request to be forwarded"); // Add te: trailer if contained in original request let contains_te_trailers = { diff --git a/rpxy-lib/src/message_handler/http_log.rs b/rpxy-lib/src/message_handler/http_log.rs index acda9f0..40d13cc 100644 --- a/rpxy-lib/src/message_handler/http_log.rs +++ b/rpxy-lib/src/message_handler/http_log.rs @@ -34,11 +34,7 @@ impl From<&http::Request> for HttpMessageLog { client_addr: "".to_string(), method: req.method().to_string(), host: header_mapper(header::HOST), - p_and_q: req - .uri() - .path_and_query() - .map_or_else(|| "", |v| v.as_str()) - .to_string(), + p_and_q: req.uri().path_and_query().map_or_else(|| "", |v| v.as_str()).to_string(), version: req.version(), uri_scheme: req.uri().scheme_str().unwrap_or("").to_string(), uri_host: req.uri().host().unwrap_or("").to_string(), @@ -50,6 +46,33 @@ impl From<&http::Request> for HttpMessageLog { } } +impl std::fmt::Display for HttpMessageLog { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!( + f, + "{} <- {} -- {} {} {:?} -- {} -- {} \"{}\", \"{}\" \"{}\"", + if !self.host.is_empty() { + self.host.as_str() + } else { + self.uri_host.as_str() + }, + self.client_addr, + self.method, + self.p_and_q, + self.version, + self.status, + if !self.uri_scheme.is_empty() && !self.uri_host.is_empty() { + format!("{}://{}", self.uri_scheme, self.uri_host) + } else { + "".to_string() + }, + self.ua, + self.xff, + self.upstream + ) + } +} + impl HttpMessageLog { pub fn client_addr(&mut self, client_addr: &SocketAddr) -> &mut Self { self.client_addr = client_addr.to_canonical().to_string(); @@ -74,26 +97,8 @@ impl HttpMessageLog { pub fn output(&self) { info!( - "{} <- {} -- {} {} {:?} -- {} -- {} \"{}\", \"{}\" \"{}\"", - if !self.host.is_empty() { - self.host.as_str() - } else { - self.uri_host.as_str() - }, - self.client_addr, - self.method, - self.p_and_q, - self.version, - self.status, - if !self.uri_scheme.is_empty() && !self.uri_host.is_empty() { - format!("{}://{}", self.uri_scheme, self.uri_host) - } else { - "".to_string() - }, - self.ua, - self.xff, - self.upstream, - // self.tls_server_name + name: crate::constants::log_event_names::ACCESS_LOG, + "{}", self ); } } diff --git a/rpxy-lib/src/proxy/proxy_h3.rs b/rpxy-lib/src/proxy/proxy_h3.rs index c1c293f..3d5143f 100644 --- a/rpxy-lib/src/proxy/proxy_h3.rs +++ b/rpxy-lib/src/proxy/proxy_h3.rs @@ -33,7 +33,7 @@ where <>::BidiStream as BidiStream>::SendStream: Send, { let mut h3_conn = h3::server::Connection::<_, Bytes>::new(quic_connection).await?; - info!( + debug!( "QUIC/HTTP3 connection established from {:?} {}", client_addr, <&ServerName as TryInto>::try_into(&tls_server_name).unwrap_or_default() @@ -115,7 +115,7 @@ where let mut sender = body_sender; let mut size = 0usize; while let Some(mut body) = recv_stream.recv_data().await? { - debug!("HTTP/3 incoming request body: remaining {}", body.remaining()); + trace!("HTTP/3 incoming request body: remaining {}", body.remaining()); size += body.remaining(); if size > max_body_size { error!( @@ -131,7 +131,7 @@ where // trailers: use inner for work around. (directly get trailer) let trailers = futures_util::future::poll_fn(|cx| recv_stream.as_mut().poll_recv_trailers(cx)).await?; if trailers.is_some() { - debug!("HTTP/3 incoming request trailers"); + trace!("HTTP/3 incoming request trailers"); sender.send_trailers(trailers.unwrap()).await?; } Ok(()) as RpxyResult<()> @@ -154,13 +154,13 @@ where match send_stream.send_response(new_res).await { Ok(_) => { - debug!("HTTP/3 response to connection successful"); + trace!("HTTP/3 response to connection successful"); // on-demand body streaming to downstream without expanding the object onto memory. loop { let frame = match new_body.frame().await { Some(frame) => frame, None => { - debug!("Response body finished"); + trace!("Response body finished"); break; } } diff --git a/rpxy-lib/src/proxy/proxy_quic_quinn.rs b/rpxy-lib/src/proxy/proxy_quic_quinn.rs index c316ed9..4fd4c38 100644 --- a/rpxy-lib/src/proxy/proxy_quic_quinn.rs +++ b/rpxy-lib/src/proxy/proxy_quic_quinn.rs @@ -2,8 +2,8 @@ use super::{proxy_main::Proxy, socket::bind_udp_socket}; use crate::{error::*, log::*, name_exp::ByteName}; use hyper_util::client::legacy::connect::Connect; use quinn::{ - crypto::rustls::{HandshakeData, QuicServerConfig}, Endpoint, TransportConfig, + crypto::rustls::{HandshakeData, QuicServerConfig}, }; use rpxy_certs::ServerCrypto; use rustls::ServerConfig; @@ -82,7 +82,7 @@ where let client_addr = incoming.remote_address(); let quic_connection = match incoming.await { Ok(new_conn) => { - info!("New connection established"); + trace!("New connection established"); h3_quinn::Connection::new(new_conn) }, Err(e) => { diff --git a/rpxy-lib/src/proxy/proxy_quic_s2n.rs b/rpxy-lib/src/proxy/proxy_quic_s2n.rs index 0fd1c7c..70659dd 100644 --- a/rpxy-lib/src/proxy/proxy_quic_s2n.rs +++ b/rpxy-lib/src/proxy/proxy_quic_s2n.rs @@ -110,7 +110,7 @@ where // quic event loop. this immediately cancels when crypto is updated by tokio::select! while let Some(new_conn) = server.accept().await { - debug!("New QUIC connection established"); + trace!("New QUIC connection established"); let Ok(Some(new_server_name)) = new_conn.server_name() else { warn!("HTTP/3 no SNI is given"); continue; From 9947a1e81acf76b529fc889dbf366fc94ab21cb0 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 30 Apr 2025 17:48:51 +0900 Subject: [PATCH 101/142] deps --- submodules/s2n-quic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/s2n-quic b/submodules/s2n-quic index 3dd7d1f..f9d0c4f 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit 3dd7d1ff0d311acd1c1abcc86fd9f428a90a0f78 +Subproject commit f9d0c4feb83160b6fe66fe34da76c443fc2b381c From f73b2ce91969966cebf05ed2da6d9073d634d9f1 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 30 Apr 2025 18:25:14 +0900 Subject: [PATCH 102/142] update docker for log-dir option --- .gitignore | 1 + CHANGELOG.md | 9 ++++++++- docker/Dockerfile | 12 ++++++------ docker/README.md | 7 +++---- docker/docker-compose-slim.yml | 3 +-- docker/docker-compose.yml | 3 +-- docker/entrypoint.sh | 31 +++++++++++++++++++++---------- docker/run.sh | 18 ++++++------------ 8 files changed, 47 insertions(+), 37 deletions(-) diff --git a/.gitignore b/.gitignore index f53ee49..20b6fd3 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ docker/log docker/cache docker/config +docker/acme_registry # Generated by Cargo # will have compiled files and executables diff --git a/CHANGELOG.md b/CHANGELOG.md index c54ced1..a76b24d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,19 @@ # CHANGELOG -## 0.10.0 (Unreleased) +## 0.10.1 or 0.11.0 (Unreleased) + +## 0.10.0 ### Important Changes - [Breaking] We removed non-`watch` execute option and enabled the dynamic reloading of the config file by default. - We newly added `log-dir` execute option to specify the directory for `access.log`,`error.log` and `rpxy.log`. This is optional, and if not specified, the logs are written to the standard output by default. +### Improvement + +- Refactor: lots of minor improvements +- Deps + ## 0.9.7 ### Improvement diff --git a/docker/Dockerfile b/docker/Dockerfile index c213bc1..8d9ff29 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -2,13 +2,13 @@ FROM ubuntu:24.04 AS base LABEL maintainer="Jun Kurihara" SHELL ["/bin/sh", "-x", "-c"] -ENV SERIAL 2 +ENV SERIAL=2 ######################################## FROM --platform=$BUILDPLATFORM base AS builder ENV CFLAGS=-Ofast -ENV BUILD_DEPS curl make ca-certificates build-essential +ENV BUILD_DEPS="curl make ca-certificates build-essential" ENV TARGET_SUFFIX=unknown-linux-gnu WORKDIR /tmp @@ -17,9 +17,9 @@ COPY . /tmp/ ARG TARGETARCH ARG CARGO_FEATURES -ENV CARGO_FEATURES ${CARGO_FEATURES} +ENV CARGO_FEATURES="${CARGO_FEATURES}" ARG ADDITIONAL_DEPS -ENV ADDITIONAL_DEPS ${ADDITIONAL_DEPS} +ENV ADDITIONAL_DEPS="${ADDITIONAL_DEPS}" RUN if [ $TARGETARCH = "amd64" ]; then \ echo "x86_64" > /arch; \ @@ -30,7 +30,7 @@ RUN if [ $TARGETARCH = "amd64" ]; then \ exit 1; \ fi -ENV RUSTFLAGS "-C link-arg=-s" +ENV RUSTFLAGS="-C link-arg=-s" RUN update-ca-certificates 2> /dev/null || true @@ -48,7 +48,7 @@ RUN apt-get update && apt-get install -qy --no-install-recommends $BUILD_DEPS ${ ######################################## FROM --platform=$TARGETPLATFORM base AS runner -ENV RUNTIME_DEPS logrotate ca-certificates gosu +ENV RUNTIME_DEPS="logrotate ca-certificates gosu" RUN apt-get update && \ apt-get install -qy --no-install-recommends $RUNTIME_DEPS && \ diff --git a/docker/README.md b/docker/README.md index 6fb5135..f2de23b 100644 --- a/docker/README.md +++ b/docker/README.md @@ -9,11 +9,10 @@ There are several docker-specific environment variables. - `HOST_USER` (default: `user`): User name executing `rpxy` inside the container. - `HOST_UID` (default: `900`): `UID` of `HOST_USER`. - `HOST_GID` (default: `900`): `GID` of `HOST_USER` -- `LOG_LEVEL=debug|info|warn|error`: Log level -- `LOG_TO_FILE=true|false`: Enable logging to the log file `/rpxy/log/rpxy.log` using `logrotate`. You should mount `/rpxy/log` via docker volume option if enabled. The log dir and file will be owned by the `HOST_USER` with `HOST_UID:HOST_GID` on the host machine. Hence, `HOST_USER`, `HOST_UID` and `HOST_GID` should be the same as ones of the user who executes the `rpxy` docker container on the host. -- `WATCH=true|false` (default: `false`): Activate continuous watching of the config file if true. +- `LOG_LEVEL=trace|debug|info|warn|error`: Log level +- `LOG_TO_FILE=true|false`: Enable logging to the log files using `logrotate` (locations: system/error log = `/rpxy/log/rpxy.log`, and access log = `/rpxy/log/access.log`). You should mount `/rpxy/log` via docker volume option if enabled. The log dir and file will be owned by the `HOST_USER` with `HOST_UID:HOST_GID` on the host machine. Hence, `HOST_USER`, `HOST_UID` and `HOST_GID` should be the same as ones of the user who executes the `rpxy` docker container on the host. -Then, all you need is to mount your `config.toml` as `/etc/rpxy.toml` and certificates/private keys as you like through the docker volume option. **If `WATCH=true`, You need to mount a directory, e.g., `./rpxy-config/`, including `rpxy.toml` on `/rpxy/config` instead of a file to correctly track file changes**. This is a docker limitation. Even if `WATCH=false`, you can mount the dir onto `/rpxy/config` rather than `/etc/rpxy.toml`. A file mounted on `/etc/rpxy` is prioritized over a dir mounted on `/rpxy/config`. +Then, all you need is to mount your `config.toml` as `/etc/rpxy.toml` and certificates/private keys as you like through the docker volume option. **You need to mount a directory, e.g., `./rpxy-config/`, including `rpxy.toml` on `/rpxy/config` instead of a file to dynamically track file changes**. This is a docker limitation. You can mount the dir onto `/rpxy/config` rather than `/etc/rpxy.toml`. A file mounted on `/etc/rpxy` is prioritized over a dir mounted on `/rpxy/config`. See [`docker-compose.yml`](./docker-compose.yml) for the detailed configuration. Note that the file path of keys and certificates must be ones in your docker container. diff --git a/docker/docker-compose-slim.yml b/docker/docker-compose-slim.yml index 0337d20..0c79f4c 100644 --- a/docker/docker-compose-slim.yml +++ b/docker/docker-compose-slim.yml @@ -20,12 +20,11 @@ services: # - "linux/amd64" - "linux/arm64" environment: - - LOG_LEVEL=debug + - LOG_LEVEL=trace - LOG_TO_FILE=true - HOST_USER=jun - HOST_UID=501 - HOST_GID=501 - # - WATCH=true tty: false privileged: true volumes: diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index a8ad4af..28f5b03 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -20,12 +20,11 @@ services: # - "linux/amd64" - "linux/arm64" environment: - - LOG_LEVEL=debug + - LOG_LEVEL=trace - LOG_TO_FILE=true - HOST_USER=jun - HOST_UID=501 - HOST_GID=501 - # - WATCH=true tty: false privileged: true volumes: diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index d7fee43..bf11a13 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -1,6 +1,7 @@ #!/usr/bin/env sh LOG_DIR=/rpxy/log -LOG_FILE=${LOG_DIR}/rpxy.log +SYSTEM_LOG_FILE=${LOG_DIR}/rpxy.log +ACCESS_LOG_FILE=${LOG_DIR}/access.log LOG_SIZE=10M LOG_NUM=10 @@ -43,8 +44,24 @@ include /etc/logrotate.d # system-specific logs may be also be configured here. EOF - cat > /etc/logrotate.d/rpxy.conf << EOF -${LOG_FILE} { + cat > /etc/logrotate.d/rpxy-system.conf << EOF +${SYSTEM_LOG_FILE} { + dateext + daily + missingok + rotate ${LOG_NUM} + notifempty + compress + delaycompress + dateformat -%Y-%m-%d-%s + size ${LOG_SIZE} + copytruncate + su ${USER} ${USER} +} +EOF + + cat > /etc/logrotate.d/rpxy-access.conf << EOF +${ACCESS_LOG_FILE} { dateext daily missingok @@ -157,10 +174,4 @@ fi # Run rpxy cd /rpxy echo "rpxy: Start with user: ${USER} (${USER_ID}:${GROUP_ID})" -if "${LOGGING}"; then - echo "rpxy: Start with writing log file" - gosu ${USER} sh -c "/rpxy/run.sh 2>&1 | tee ${LOG_FILE}" -else - echo "rpxy: Start without writing log file" - gosu ${USER} sh -c "/rpxy/run.sh 2>&1" -fi +gosu ${USER} sh -c "/rpxy/run.sh 2>&1" diff --git a/docker/run.sh b/docker/run.sh index 25f50d6..cfb726d 100644 --- a/docker/run.sh +++ b/docker/run.sh @@ -1,5 +1,7 @@ #!/usr/bin/env sh CONFIG_FILE=/etc/rpxy.toml +LOG_DIR=/rpxy/log +LOGGING=${LOG_TO_FILE:-false} # debug level logging if [ -z $LOG_LEVEL ]; then @@ -7,19 +9,11 @@ if [ -z $LOG_LEVEL ]; then fi echo "rpxy: Logging with level ${LOG_LEVEL}" -# continuously watch and reload the config file -if [ -z $WATCH ]; then - WATCH=false -else - if [ "$WATCH" = "true" ]; then - WATCH=true - else - WATCH=false - fi -fi -if $WATCH ; then - RUST_LOG=${LOG_LEVEL} /rpxy/bin/rpxy --config ${CONFIG_FILE} -w +if "${LOGGING}"; then + echo "rpxy: Start with writing log files" + RUST_LOG=${LOG_LEVEL} /rpxy/bin/rpxy --config ${CONFIG_FILE} --log-dir ${LOG_DIR} else + echo "rpxy: Start without writing log files" RUST_LOG=${LOG_LEVEL} /rpxy/bin/rpxy --config ${CONFIG_FILE} fi From 7438f70381b3ee1b385b840bdf750084c8d5fad2 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Thu, 1 May 2025 09:43:43 +0900 Subject: [PATCH 103/142] deps --- Cargo.lock | 36 ++++++++++++++++++------------------ rpxy-lib/Cargo.toml | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a81530c..1efc653 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1032,9 +1032,9 @@ checksum = "74721d007512d0cb3338cd20f0654ac913920061a4c4d0d8708edb3f2a698c0c" [[package]] name = "hashbrown" -version = "0.15.2" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" dependencies = [ "allocator-api2", "equivalent", @@ -1747,9 +1747,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.107" +version = "0.9.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8288979acd84749c744a9014b4382d42b8f7b2592847b5afb2ed29e5d16ede07" +checksum = "e145e1651e858e820e4860f7b9c5e169bc1d8ce1c86043be79fa7b7634821847" dependencies = [ "cc", "libc", @@ -1914,9 +1914,9 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.11" +version = "0.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "541d0f57c6ec747a90738a52741d3221f7960e8ac2f0ff4b1a63680e033b4ab5" +checksum = "ee4e529991f949c5e25755532370b8af5d114acae52326361d68d47af64aa842" dependencies = [ "cfg_aliases", "libc", @@ -2233,9 +2233,9 @@ dependencies = [ [[package]] name = "rustix" -version = "1.0.5" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97817398dd4bb2e6da002002db259209759911da105da92bec29ccb12cf58bf" +checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" dependencies = [ "bitflags", "errno", @@ -2641,9 +2641,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.8" +version = "0.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", "cpufeatures", @@ -2727,9 +2727,9 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", @@ -2745,7 +2745,7 @@ dependencies = [ "fastrand", "getrandom 0.3.2", "once_cell", - "rustix 1.0.5", + "rustix 1.0.7", "windows-sys 0.59.0", ] @@ -2755,7 +2755,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45c6481c4829e4cc63825e62c49186a34538b7b2750b73b266581ffb612fb5ed" dependencies = [ - "rustix 1.0.5", + "rustix 1.0.7", "windows-sys 0.59.0", ] @@ -3238,18 +3238,18 @@ dependencies = [ [[package]] name = "webpki-root-certs" -version = "0.26.9" +version = "0.26.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180d2741b6115c3d906577e6533ad89472d48d96df00270fccb78233073d77f7" +checksum = "c99403924bc5f23afefc319b8ac67ed0e50669f6e52a413314cccb1fdbc93ba0" dependencies = [ "rustls-pki-types", ] [[package]] name = "webpki-roots" -version = "0.26.9" +version = "0.26.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29aad86cec885cafd03e8305fd727c418e970a521322c91688414d5b8efba16b" +checksum = "37493cadf42a2a939ed404698ded7fb378bf301b5011f973361779a3a74f8c93" dependencies = [ "rustls-pki-types", ] diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 8cfad09..7e96bd4 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -109,7 +109,7 @@ socket2 = { version = "0.5.9", features = ["all"], optional = true } # cache http-cache-semantics = { path = "../submodules/rusty-http-cache-semantics", default-features = false, optional = true } lru = { version = "0.14.0", optional = true } -sha2 = { version = "0.10.8", default-features = false, optional = true } +sha2 = { version = "0.10.9", default-features = false, optional = true } # cookie handling for sticky cookie chrono = { version = "0.4.41", default-features = false, features = [ From 67e78041b416b4688afdf4e9617e1dc84fe9e65a Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Tue, 6 May 2025 23:51:04 +0900 Subject: [PATCH 104/142] deps --- Cargo.lock | 74 +++++++++++++++++++++++++++---------------- rpxy-acme/Cargo.toml | 6 ++-- rpxy-bin/Cargo.toml | 2 +- rpxy-certs/Cargo.toml | 6 ++-- rpxy-lib/Cargo.toml | 4 +-- 5 files changed, 55 insertions(+), 37 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1efc653..8bae735 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -275,7 +275,7 @@ dependencies = [ "log", "rustls-pki-types", "thiserror 1.0.69", - "webpki-roots", + "webpki-roots 0.26.11", ] [[package]] @@ -406,9 +406,9 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "cc" -version = "1.2.20" +version = "1.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04da6a0d40b948dfc4fa8f5bbf402b0fc1a64a28dbf7d12ffd683550f2c1b63a" +checksum = "8691782945451c1c383942c4874dbe63814f61cb57ef773cda2972682b7bb3c0" dependencies = [ "jobserver", "libc", @@ -978,9 +978,9 @@ checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "h2" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75249d144030531f8dee69fe9cea04d3edf809a017ae445e2abdff6629e86633" +checksum = "a9421a676d1b147b16b82c9225157dc629087ef8ec4d5e2960f9437a90dac0a5" dependencies = [ "atomic-waker", "bytes", @@ -1172,7 +1172,7 @@ dependencies = [ "tokio", "tokio-rustls", "tower-service", - "webpki-roots", + "webpki-roots 0.26.11", ] [[package]] @@ -1492,9 +1492,9 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9627da5196e5d8ed0b0495e61e518847578da83483c37288316d9b2e03a7f72" +checksum = "a25169bd5913a4b437588a7e3d127cd6e90127b60e0ffbd834a38f1599e016b8" [[package]] name = "libmimalloc-sys" @@ -2246,9 +2246,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.26" +version = "0.23.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df51b5869f3a441595eac5e8ff14d486ff285f7b8c0df8770e49c3b56351f0f0" +checksum = "730944ca083c1c233a75c09f199e973ca499344a2b7ba9e755c457e86fb4a321" dependencies = [ "aws-lc-rs", "log", @@ -2280,7 +2280,7 @@ dependencies = [ "serde", "serde_json", "thiserror 2.0.12", - "webpki-roots", + "webpki-roots 0.26.11", "x509-parser", ] @@ -2316,9 +2316,9 @@ dependencies = [ [[package]] name = "rustls-platform-verifier" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4937d110d34408e9e5ad30ba0b0ca3b6a8a390f8db3636db60144ac4fa792750" +checksum = "19787cda76408ec5404443dc8b31795c87cd8fec49762dc75fa727740d34acc1" dependencies = [ "core-foundation 0.10.0", "core-foundation-sys", @@ -2331,7 +2331,7 @@ dependencies = [ "rustls-webpki", "security-framework 3.2.0", "security-framework-sys", - "webpki-root-certs", + "webpki-root-certs 0.26.11", "windows-sys 0.59.0", ] @@ -2352,9 +2352,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.1" +version = "0.103.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fef8b8769aaccf73098557a87cd1816b4f9c7c16811c9c77142aa695c16f2c03" +checksum = "7149975849f1abb3832b246010ef62ccc80d3a76169517ada7188252b9cfb437" dependencies = [ "aws-lc-rs", "ring", @@ -2513,9 +2513,9 @@ dependencies = [ [[package]] name = "s2n-tls" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2a05886fe90b529c7ffef6b8b5542e26e21e3b0e66612673395c7ecedde0e30" +checksum = "e1c2355bbfcccc93a61d56a8e8b8a22325a5c68b693ddeba904a5aa293cc66c8" dependencies = [ "errno", "hex", @@ -2526,9 +2526,9 @@ dependencies = [ [[package]] name = "s2n-tls-sys" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c69b480e275a5c3016307c589f2f71bbf9ea21c102e7ce3c19316d908bf0c21f" +checksum = "65818edc12b815a4b2140a6a031f6e5fe3a59b31c28d7f01835b9aa38654f81f" dependencies = [ "aws-lc-rs", "cc", @@ -2867,9 +2867,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.44.2" +version = "1.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" +checksum = "2513ca694ef9ede0fb23fe71a4ee4107cb102b9dc1930f6d0fd77aae068ae165" dependencies = [ "backtrace", "bytes", @@ -3238,18 +3238,36 @@ dependencies = [ [[package]] name = "webpki-root-certs" -version = "0.26.10" +version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c99403924bc5f23afefc319b8ac67ed0e50669f6e52a413314cccb1fdbc93ba0" +checksum = "75c7f0ef91146ebfb530314f5f1d24528d7f0767efbfd31dce919275413e393e" +dependencies = [ + "webpki-root-certs 1.0.0", +] + +[[package]] +name = "webpki-root-certs" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01a83f7e1a9f8712695c03eabe9ed3fbca0feff0152f33f12593e5a6303cb1a4" dependencies = [ "rustls-pki-types", ] [[package]] name = "webpki-roots" -version = "0.26.10" +version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37493cadf42a2a939ed404698ded7fb378bf301b5011f973361779a3a74f8c93" +checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" +dependencies = [ + "webpki-roots 1.0.0", +] + +[[package]] +name = "webpki-roots" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2853738d1cc4f2da3a225c18ec6c3721abb31961096e9dbf5ab35fa88b19cfdb" dependencies = [ "rustls-pki-types", ] @@ -3506,9 +3524,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.7.7" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cb8234a863ea0e8cd7284fcdd4f145233eb00fee02bbdd9861aec44e6477bc5" +checksum = "d9fb597c990f03753e08d3c29efbfcf2019a003b4bf4ba19225c158e1549f0f3" dependencies = [ "memchr", ] diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index f33fd19..a10395a 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -24,15 +24,15 @@ aws-lc-rs = { version = "1.13.0", default-features = false, features = [ "aws-lc-sys", ] } blocking = "1.6.1" -rustls = { version = "0.23.26", default-features = false, features = [ +rustls = { version = "0.23.27", default-features = false, features = [ "std", "aws_lc_rs", ] } -rustls-platform-verifier = { version = "0.5.2" } +rustls-platform-verifier = { version = "0.5.3" } rustls-acme = { path = "../submodules/rustls-acme/", default-features = false, features = [ "aws-lc-rs", ] } rustls-post-quantum = { version = "0.2.2", optional = true } -tokio = { version = "1.44.2", default-features = false } +tokio = { version = "1.45.0", default-features = false } tokio-util = { version = "0.7.15", default-features = false } tokio-stream = { version = "0.1.17", default-features = false } diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index 16c6916..6e52772 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -35,7 +35,7 @@ libmimalloc-sys = { version = "=0.1.40" } anyhow = "1.0.98" ahash = "0.8.11" serde = { version = "1.0.219", default-features = false, features = ["derive"] } -tokio = { version = "1.44.2", default-features = false, features = [ +tokio = { version = "1.45.0", default-features = false, features = [ "net", "rt-multi-thread", "time", diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index 2bad8fc..712d31a 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -22,12 +22,12 @@ derive_builder = { version = "0.20.2" } thiserror = { version = "2.0.12" } hot_reload = { version = "0.1.9" } async-trait = { version = "0.1.88" } -rustls = { version = "0.23.26", default-features = false, features = [ +rustls = { version = "0.23.27", default-features = false, features = [ "std", "aws_lc_rs", ] } rustls-pemfile = { version = "2.2.0" } -rustls-webpki = { version = "0.103.1", default-features = false, features = [ +rustls-webpki = { version = "0.103.2", default-features = false, features = [ "std", "aws-lc-rs", ] } @@ -35,7 +35,7 @@ rustls-post-quantum = { version = "0.2.2", optional = true } x509-parser = { version = "0.17.0" } [dev-dependencies] -tokio = { version = "1.44.2", default-features = false, features = [ +tokio = { version = "1.45.0", default-features = false, features = [ "rt-multi-thread", "macros", ] } diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 7e96bd4..f7520a4 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -41,7 +41,7 @@ ahash = "0.8.11" bytes = "1.10.1" derive_builder = "0.20.2" futures = { version = "0.3.31", features = ["alloc", "async-await"] } -tokio = { version = "1.44.2", default-features = false, features = [ +tokio = { version = "1.45.0", default-features = false, features = [ "net", "rt-multi-thread", "time", @@ -80,7 +80,7 @@ hyper-rustls = { version = "0.27.5", default-features = false, features = [ # tls and cert management for server rpxy-certs = { path = "../rpxy-certs/", default-features = false } hot_reload = "0.1.9" -rustls = { version = "0.23.26", default-features = false } +rustls = { version = "0.23.27", default-features = false } rustls-post-quantum = { version = "0.2.2", optional = true } tokio-rustls = { version = "0.26.2", features = ["early-data"] } From 9e743b0dca4fbb24d301572ac17288f93e4f60c8 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 7 May 2025 11:22:30 +0900 Subject: [PATCH 105/142] wip: h3-0.0.8 --- Cargo.lock | 24 +++++++++++++++++++----- rpxy-lib/Cargo.toml | 4 ++-- rpxy-lib/src/error.rs | 7 +++++-- rpxy-lib/src/proxy/proxy_h3.rs | 15 ++++++++++----- 4 files changed, 36 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8bae735..46120eb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1000,6 +1000,20 @@ name = "h3" version = "0.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7dfb059a4f28a66f186ed16ad912d142f490676acba59353831d7cb45a96b0d3" +dependencies = [ + "bytes", + "fastrand", + "futures-util", + "http", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "h3" +version = "0.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10872b55cfb02a821b69dc7cf8dc6a71d6af25eb9a79662bec4a9d016056b3be" dependencies = [ "bytes", "fastrand", @@ -1012,13 +1026,13 @@ dependencies = [ [[package]] name = "h3-quinn" -version = "0.0.9" +version = "0.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d482318ae94198fc8e3cbb0b7ba3099c865d744e6ec7c62039ca7b6b6c66fbf" +checksum = "8b2e732c8d91a74731663ac8479ab505042fbf547b9a207213ab7fbcbfc4f8b4" dependencies = [ "bytes", "futures", - "h3", + "h3 0.0.8", "quinn", "tokio", "tokio-util", @@ -2159,7 +2173,7 @@ dependencies = [ "futures", "futures-channel", "futures-util", - "h3", + "h3 0.0.8", "h3-quinn", "hot_reload", "http", @@ -2443,7 +2457,7 @@ version = "0.1.0" dependencies = [ "bytes", "futures", - "h3", + "h3 0.0.7", "s2n-quic", "tracing", ] diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index f7520a4..6b1c76d 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -92,8 +92,8 @@ tracing = { version = "0.1.41" } # http/3 quinn = { version = "0.11.7", optional = true } -h3 = { version = "0.0.7", features = ["tracing"], optional = true } -h3-quinn = { version = "0.0.9", optional = true } +h3 = { version = "0.0.8", features = ["tracing"], optional = true } +h3-quinn = { version = "0.0.10", optional = true } s2n-quic = { version = "1.57.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [ "provider-tls-rustls", ], optional = true } diff --git a/rpxy-lib/src/error.rs b/rpxy-lib/src/error.rs index 20470ed..4554cb7 100644 --- a/rpxy-lib/src/error.rs +++ b/rpxy-lib/src/error.rs @@ -37,8 +37,11 @@ pub enum RpxyError { // http/3 errors #[cfg(any(feature = "http3-quinn", feature = "http3-s2n"))] - #[error("H3 error: {0}")] - H3Error(#[from] h3::Error), + #[error("h3 connection error: {0}")] + H3ConnectionError(#[from] h3::error::ConnectionError), + #[cfg(any(feature = "http3-quinn", feature = "http3-s2n"))] + #[error("h3 connection error: {0}")] + H3StreamError(#[from] h3::error::StreamError), // #[cfg(feature = "http3-s2n")] // #[error("H3 error: {0}")] // H3Error(#[from] s2n_quic_h3::h3::Error), diff --git a/rpxy-lib/src/proxy/proxy_h3.rs b/rpxy-lib/src/proxy/proxy_h3.rs index 3d5143f..acfe07d 100644 --- a/rpxy-lib/src/proxy/proxy_h3.rs +++ b/rpxy-lib/src/proxy/proxy_h3.rs @@ -49,12 +49,17 @@ where } Err(e) => { warn!("HTTP/3 error on accept incoming connection: {}", e); - match e.get_error_level() { - h3::error::ErrorLevel::ConnectionError => break, - h3::error::ErrorLevel::StreamError => continue, - } + break; } - Ok(Some((req, stream))) => { + // Ok(Some((req, stream))) => { + Ok(Some(req_resolver)) => { + let (req, stream) = match req_resolver.resolve_request().await { + Ok((req, stream)) => (req, stream), + Err(e) => { + warn!("HTTP/3 error on resolve request in stream: {}", e); + continue; + } + }; // We consider the connection count separately from the stream count. // Max clients for h1/h2 = max 'stream' for h3. let request_count = self.globals.request_count.clone(); From df3792f87f97a69e1d074f3a8884dbd43fcf9593 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 7 May 2025 12:33:58 +0900 Subject: [PATCH 106/142] deps: h3-0.0.8 --- Cargo.lock | 20 +++----------------- rpxy-bin/Cargo.toml | 4 ++-- submodules/s2n-quic | 2 +- 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 46120eb..e0ab8a1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -995,20 +995,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "h3" -version = "0.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dfb059a4f28a66f186ed16ad912d142f490676acba59353831d7cb45a96b0d3" -dependencies = [ - "bytes", - "fastrand", - "futures-util", - "http", - "pin-project-lite", - "tokio", -] - [[package]] name = "h3" version = "0.0.8" @@ -1032,7 +1018,7 @@ checksum = "8b2e732c8d91a74731663ac8479ab505042fbf547b9a207213ab7fbcbfc4f8b4" dependencies = [ "bytes", "futures", - "h3 0.0.8", + "h3", "quinn", "tokio", "tokio-util", @@ -2173,7 +2159,7 @@ dependencies = [ "futures", "futures-channel", "futures-util", - "h3 0.0.8", + "h3", "h3-quinn", "hot_reload", "http", @@ -2457,7 +2443,7 @@ version = "0.1.0" dependencies = [ "bytes", "futures", - "h3 0.0.7", + "h3", "s2n-quic", "tracing", ] diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index 6e52772..911aadb 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -13,8 +13,8 @@ publish.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] -default = ["http3-quinn", "cache", "rustls-backend", "acme", "post-quantum"] -# default = ["http3-s2n", "cache", "rustls-backend", "acme", "post-quantum"] +# default = ["http3-quinn", "cache", "rustls-backend", "acme", "post-quantum"] +default = ["http3-s2n", "cache", "rustls-backend", "acme", "post-quantum"] http3-quinn = ["rpxy-lib/http3-quinn"] http3-s2n = ["rpxy-lib/http3-s2n"] native-tls-backend = ["rpxy-lib/native-tls-backend"] diff --git a/submodules/s2n-quic b/submodules/s2n-quic index f9d0c4f..4ef7425 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit f9d0c4feb83160b6fe66fe34da76c443fc2b381c +Subproject commit 4ef74256bcf8d04e218d88bb72856da332d3e8c2 From 500ab56c10b5dd581e94b97f8e969f1480d7852e Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 7 May 2025 12:37:24 +0900 Subject: [PATCH 107/142] fix default --- rpxy-bin/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index 911aadb..6e52772 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -13,8 +13,8 @@ publish.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] -# default = ["http3-quinn", "cache", "rustls-backend", "acme", "post-quantum"] -default = ["http3-s2n", "cache", "rustls-backend", "acme", "post-quantum"] +default = ["http3-quinn", "cache", "rustls-backend", "acme", "post-quantum"] +# default = ["http3-s2n", "cache", "rustls-backend", "acme", "post-quantum"] http3-quinn = ["rpxy-lib/http3-quinn"] http3-s2n = ["rpxy-lib/http3-s2n"] native-tls-backend = ["rpxy-lib/native-tls-backend"] From 50442376887cf277f5793a9994e1e6cfad801f20 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 7 May 2025 18:59:38 +0900 Subject: [PATCH 108/142] deps --- Cargo.lock | 12 ++++++------ submodules/s2n-quic | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e0ab8a1..a5a0f29 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -316,9 +316,9 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.74" +version = "0.3.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" dependencies = [ "addr2line", "cfg-if", @@ -1492,9 +1492,9 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a25169bd5913a4b437588a7e3d127cd6e90127b60e0ffbd834a38f1599e016b8" +checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" [[package]] name = "libmimalloc-sys" @@ -3524,9 +3524,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9fb597c990f03753e08d3c29efbfcf2019a003b4bf4ba19225c158e1549f0f3" +checksum = "c06928c8748d81b05c9be96aad92e1b6ff01833332f281e8cfca3be4b35fc9ec" dependencies = [ "memchr", ] diff --git a/submodules/s2n-quic b/submodules/s2n-quic index 4ef7425..a4e601d 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit 4ef74256bcf8d04e218d88bb72856da332d3e8c2 +Subproject commit a4e601db45c1de09a088ca3c021e73c32760dfb7 From 669e2bf00b2f8c35312373c9423536f17d004129 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 7 May 2025 20:01:03 +0900 Subject: [PATCH 109/142] chore: refactor dockerfile-slim --- docker/Dockerfile-slim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile-slim b/docker/Dockerfile-slim index b58a408..b0ef5b1 100644 --- a/docker/Dockerfile-slim +++ b/docker/Dockerfile-slim @@ -5,7 +5,7 @@ LABEL maintainer="Jun Kurihara" ARG TARGETARCH ARG CARGO_FEATURES -ENV CARGO_FEATURES ${CARGO_FEATURES} +ENV CARGO_FEATURES=${CARGO_FEATURES} RUN if [ $TARGETARCH = "amd64" ]; then \ echo "x86_64" > /arch; \ @@ -22,7 +22,7 @@ WORKDIR /tmp COPY . /tmp/ -ENV RUSTFLAGS "-C link-arg=-s" +ENV RUSTFLAGS="-C link-arg=-s" RUN echo "Building rpxy from source" && \ cargo update && \ @@ -34,7 +34,7 @@ RUN echo "Building rpxy from source" && \ FROM --platform=$TARGETPLATFORM alpine:latest AS runner LABEL maintainer="Jun Kurihara" -ENV RUNTIME_DEPS logrotate ca-certificates su-exec +ENV RUNTIME_DEPS="logrotate ca-certificates su-exec" RUN apk add --no-cache ${RUNTIME_DEPS} && \ update-ca-certificates && \ From b558c882f3f2c7fb8dc458c90f38d86906252967 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 May 2025 22:05:39 +0000 Subject: [PATCH 110/142] chore(deps): bump ahash from 0.8.11 to 0.8.12 Bumps [ahash](https://github.com/tkaitchuck/ahash) from 0.8.11 to 0.8.12. - [Release notes](https://github.com/tkaitchuck/ahash/releases) - [Commits](https://github.com/tkaitchuck/ahash/commits) --- updated-dependencies: - dependency-name: ahash dependency-version: 0.8.12 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 38 +++++++++----------------------------- rpxy-acme/Cargo.toml | 2 +- rpxy-bin/Cargo.toml | 2 +- rpxy-certs/Cargo.toml | 2 +- rpxy-lib/Cargo.toml | 2 +- 5 files changed, 13 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a5a0f29..9bf59ab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,15 +19,15 @@ checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "ahash" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", - "getrandom 0.2.16", + "getrandom 0.3.2", "once_cell", "version_check", - "zerocopy 0.7.35", + "zerocopy", ] [[package]] @@ -1842,7 +1842,7 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" dependencies = [ - "zerocopy 0.8.25", + "zerocopy", ] [[package]] @@ -2380,7 +2380,7 @@ version = "0.57.0" dependencies = [ "byteorder", "bytes", - "zerocopy 0.8.25", + "zerocopy", ] [[package]] @@ -2402,7 +2402,7 @@ dependencies = [ "s2n-quic-tls-default", "s2n-quic-transport", "tokio", - "zerocopy 0.8.25", + "zerocopy", "zeroize", ] @@ -2422,7 +2422,7 @@ dependencies = [ "pin-project-lite", "s2n-codec", "subtle", - "zerocopy 0.8.25", + "zerocopy", ] [[package]] @@ -3602,33 +3602,13 @@ dependencies = [ "synstructure", ] -[[package]] -name = "zerocopy" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" -dependencies = [ - "zerocopy-derive 0.7.35", -] - [[package]] name = "zerocopy" version = "0.8.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" dependencies = [ - "zerocopy-derive 0.8.25", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "zerocopy-derive", ] [[package]] diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index a10395a..cb7a5a2 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -15,7 +15,7 @@ post-quantum = ["rustls-post-quantum"] [dependencies] url = { version = "2.5.4" } -ahash = "0.8.11" +ahash = "0.8.12" thiserror = "2.0.12" tracing = "0.1.41" async-trait = "0.1.88" diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index 6e52772..a99de63 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -33,7 +33,7 @@ rpxy-lib = { path = "../rpxy-lib/", default-features = false, features = [ mimalloc = { version = "=0.1.44", default-features = false } libmimalloc-sys = { version = "=0.1.40" } anyhow = "1.0.98" -ahash = "0.8.11" +ahash = "0.8.12" serde = { version = "1.0.219", default-features = false, features = ["derive"] } tokio = { version = "1.45.0", default-features = false, features = [ "net", diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index 712d31a..90b15e6 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -16,7 +16,7 @@ post-quantum = ["rustls-post-quantum"] http3 = [] [dependencies] -ahash = { version = "0.8.11" } +ahash = { version = "0.8.12" } tracing = { version = "0.1.41" } derive_builder = { version = "0.20.2" } thiserror = { version = "2.0.12" } diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 6b1c76d..3b14531 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -37,7 +37,7 @@ post-quantum = [ [dependencies] rand = "0.9.1" -ahash = "0.8.11" +ahash = "0.8.12" bytes = "1.10.1" derive_builder = "0.20.2" futures = { version = "0.3.31", features = ["alloc", "async-await"] } From bbde3ff4f3826deaff113a1e9dba70df4dd06637 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 May 2025 22:05:50 +0000 Subject: [PATCH 111/142] chore(deps): bump aws-lc-rs from 1.13.0 to 1.13.1 Bumps [aws-lc-rs](https://github.com/aws/aws-lc-rs) from 1.13.0 to 1.13.1. - [Release notes](https://github.com/aws/aws-lc-rs/releases) - [Commits](https://github.com/aws/aws-lc-rs/compare/v1.13.0...v1.13.1) --- updated-dependencies: - dependency-name: aws-lc-rs dependency-version: 1.13.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- rpxy-acme/Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a5a0f29..914c3e2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -292,9 +292,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "aws-lc-rs" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b756939cb2f8dc900aa6dcd505e6e2428e9cae7ff7b028c49e3946efa70878" +checksum = "93fcc8f365936c834db5514fc45aee5b1202d677e6b40e48468aaaa8183ca8c7" dependencies = [ "aws-lc-sys", "untrusted 0.7.1", @@ -303,9 +303,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.28.2" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa9b6986f250236c27e5a204062434a773a13243d2ffc2955f37bdba4c5c6a1" +checksum = "61b1d86e7705efe1be1b569bab41d4fa1e14e220b60a160f78de2db687add079" dependencies = [ "bindgen", "cc", diff --git a/rpxy-acme/Cargo.toml b/rpxy-acme/Cargo.toml index a10395a..73c44d9 100644 --- a/rpxy-acme/Cargo.toml +++ b/rpxy-acme/Cargo.toml @@ -20,7 +20,7 @@ thiserror = "2.0.12" tracing = "0.1.41" async-trait = "0.1.88" base64 = "0.22.1" -aws-lc-rs = { version = "1.13.0", default-features = false, features = [ +aws-lc-rs = { version = "1.13.1", default-features = false, features = [ "aws-lc-sys", ] } blocking = "1.6.1" From 31b6817e2328c240d359fe7f10c4c804247d8585 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Fri, 9 May 2025 11:39:51 +0900 Subject: [PATCH 112/142] deps: s2n-quic --- Cargo.lock | 171 +++++++++++++++++++------------------------- rpxy-lib/Cargo.toml | 6 +- submodules/s2n-quic | 2 +- 3 files changed, 78 insertions(+), 101 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ca8f3c2..0ee23d9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1237,21 +1237,22 @@ dependencies = [ [[package]] name = "icu_collections" -version = "1.5.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" dependencies = [ "displaydoc", + "potential_utf", "yoke", "zerofrom", "zerovec", ] [[package]] -name = "icu_locid" -version = "1.5.0" +name = "icu_locale_core" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" dependencies = [ "displaydoc", "litemap", @@ -1260,31 +1261,11 @@ dependencies = [ "zerovec", ] -[[package]] -name = "icu_locid_transform" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_locid_transform_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_locid_transform_data" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7515e6d781098bf9f7205ab3fc7e9709d34554ae0b21ddbcb5febfa4bc7df11d" - [[package]] name = "icu_normalizer" -version = "1.5.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" dependencies = [ "displaydoc", "icu_collections", @@ -1292,67 +1273,54 @@ dependencies = [ "icu_properties", "icu_provider", "smallvec", - "utf16_iter", - "utf8_iter", - "write16", "zerovec", ] [[package]] name = "icu_normalizer_data" -version = "1.5.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e8338228bdc8ab83303f16b797e177953730f601a96c25d10cb3ab0daa0cb7" +checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" [[package]] name = "icu_properties" -version = "1.5.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +checksum = "2549ca8c7241c82f59c80ba2a6f415d931c5b58d24fb8412caa1a1f02c49139a" dependencies = [ "displaydoc", "icu_collections", - "icu_locid_transform", + "icu_locale_core", "icu_properties_data", "icu_provider", - "tinystr", + "potential_utf", + "zerotrie", "zerovec", ] [[package]] name = "icu_properties_data" -version = "1.5.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85fb8799753b75aee8d2a21d7c14d9f38921b54b3dbda10f5a3c7a7b82dba5e2" +checksum = "8197e866e47b68f8f7d95249e172903bec06004b18b2937f1095d40a0c57de04" [[package]] name = "icu_provider" -version = "1.5.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" dependencies = [ "displaydoc", - "icu_locid", - "icu_provider_macros", + "icu_locale_core", "stable_deref_trait", "tinystr", "writeable", "yoke", "zerofrom", + "zerotrie", "zerovec", ] -[[package]] -name = "icu_provider_macros" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "ident_case" version = "1.0.1" @@ -1372,9 +1340,9 @@ dependencies = [ [[package]] name = "idna_adapter" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" dependencies = [ "icu_normalizer", "icu_properties", @@ -1520,9 +1488,9 @@ checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" [[package]] name = "litemap" -version = "0.7.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" +checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" [[package]] name = "log" @@ -1830,6 +1798,15 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "potential_utf" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" +dependencies = [ + "zerovec", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -2307,11 +2284,12 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" +checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" dependencies = [ "web-time", + "zeroize", ] [[package]] @@ -2376,7 +2354,7 @@ checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "s2n-codec" -version = "0.57.0" +version = "0.58.0" dependencies = [ "byteorder", "bytes", @@ -2385,7 +2363,7 @@ dependencies = [ [[package]] name = "s2n-quic" -version = "1.57.0" +version = "1.58.0" dependencies = [ "bytes", "cfg-if", @@ -2408,7 +2386,7 @@ dependencies = [ [[package]] name = "s2n-quic-core" -version = "0.57.0" +version = "0.58.0" dependencies = [ "atomic-waker", "byteorder", @@ -2427,7 +2405,7 @@ dependencies = [ [[package]] name = "s2n-quic-crypto" -version = "0.57.0" +version = "0.58.0" dependencies = [ "aws-lc-rs", "cfg-if", @@ -2450,7 +2428,7 @@ dependencies = [ [[package]] name = "s2n-quic-platform" -version = "0.57.0" +version = "0.58.0" dependencies = [ "cfg-if", "futures", @@ -2463,7 +2441,7 @@ dependencies = [ [[package]] name = "s2n-quic-rustls" -version = "0.57.0" +version = "0.58.0" dependencies = [ "bytes", "rustls", @@ -2476,7 +2454,7 @@ dependencies = [ [[package]] name = "s2n-quic-tls" -version = "0.57.0" +version = "0.58.0" dependencies = [ "bytes", "errno", @@ -2489,7 +2467,7 @@ dependencies = [ [[package]] name = "s2n-quic-tls-default" -version = "0.57.0" +version = "0.58.0" dependencies = [ "s2n-quic-rustls", "s2n-quic-tls", @@ -2497,7 +2475,7 @@ dependencies = [ [[package]] name = "s2n-quic-transport" -version = "0.57.0" +version = "0.58.0" dependencies = [ "bytes", "futures-channel", @@ -2513,9 +2491,9 @@ dependencies = [ [[package]] name = "s2n-tls" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1c2355bbfcccc93a61d56a8e8b8a22325a5c68b693ddeba904a5aa293cc66c8" +checksum = "821c6c037686bbc60273f3c4af20012eecbe5e9b1c4ac3d7f766a1f2464681bf" dependencies = [ "errno", "hex", @@ -2526,9 +2504,9 @@ dependencies = [ [[package]] name = "s2n-tls-sys" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65818edc12b815a4b2140a6a031f6e5fe3a59b31c28d7f01835b9aa38654f81f" +checksum = "6a755df740916e2fc0aaf99c6fc0e519028702a75bff018b6b55a735eada406a" dependencies = [ "aws-lc-rs", "cc", @@ -2842,9 +2820,9 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.7.6" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" dependencies = [ "displaydoc", "zerovec", @@ -3092,12 +3070,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "utf16_iter" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" - [[package]] name = "utf8_iter" version = "1.0.4" @@ -3540,17 +3512,11 @@ dependencies = [ "bitflags", ] -[[package]] -name = "write16" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" - [[package]] name = "writeable" -version = "0.5.5" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" +checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" [[package]] name = "x509-parser" @@ -3580,9 +3546,9 @@ dependencies = [ [[package]] name = "yoke" -version = "0.7.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" dependencies = [ "serde", "stable_deref_trait", @@ -3592,9 +3558,9 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.7.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", @@ -3664,10 +3630,21 @@ dependencies = [ ] [[package]] -name = "zerovec" -version = "0.10.4" +name = "zerotrie" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" dependencies = [ "yoke", "zerofrom", @@ -3676,9 +3653,9 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.10.3" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 3b14531..5d0b400 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -94,11 +94,11 @@ tracing = { version = "0.1.41" } quinn = { version = "0.11.7", optional = true } h3 = { version = "0.0.8", features = ["tracing"], optional = true } h3-quinn = { version = "0.0.10", optional = true } -s2n-quic = { version = "1.57.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [ +s2n-quic = { version = "1.58.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [ "provider-tls-rustls", ], optional = true } -s2n-quic-core = { version = "0.57.0", path = "../submodules/s2n-quic/quic/s2n-quic-core", default-features = false, optional = true } -s2n-quic-rustls = { version = "0.57.0", path = "../submodules/s2n-quic/quic/s2n-quic-rustls", optional = true } +s2n-quic-core = { version = "0.58.0", path = "../submodules/s2n-quic/quic/s2n-quic-core", default-features = false, optional = true } +s2n-quic-rustls = { version = "0.58.0", path = "../submodules/s2n-quic/quic/s2n-quic-rustls", optional = true } s2n-quic-h3 = { path = "../submodules/s2n-quic/quic/s2n-quic-h3/", features = [ "tracing", ], optional = true } diff --git a/submodules/s2n-quic b/submodules/s2n-quic index a4e601d..3e9b3f2 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit a4e601db45c1de09a088ca3c021e73c32760dfb7 +Subproject commit 3e9b3f2f499626acbf1d697aa8f58095b6585ce3 From 80d980541e0762ec29cdc743f295f9985df7231d Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Mon, 12 May 2025 00:46:38 +0900 Subject: [PATCH 113/142] deps --- Cargo.lock | 69 +++++++++++++++++++++++++++++++++++-------- rpxy-bin/Cargo.toml | 4 +-- rpxy-certs/Cargo.toml | 2 +- rpxy-lib/Cargo.toml | 2 +- 4 files changed, 61 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0ee23d9..eda3fd1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -392,6 +392,12 @@ version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" +[[package]] +name = "bytemuck" +version = "1.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9134a6ef01ce4b366b50689c94f82c14bc72bc5d0386829828a2e2752ef7958c" + [[package]] name = "byteorder" version = "1.5.0" @@ -468,18 +474,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.37" +version = "4.5.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eccb054f56cbd38340b380d4a8e69ef1f02f1af43db2f0cc817a4774d80ae071" +checksum = "ed93b9805f8ba930df42c2590f05453d5ec36cbb85d018868a5b24d31f6ac000" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.37" +version = "4.5.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd9466fac8543255d3b1fcad4762c5e116ffe808c8a3043d4263cd4fd4862a2" +checksum = "379026ff283facf611b0ea629334361c4211d1b12ee01024eec1591133b04120" dependencies = [ "anstream", "anstyle", @@ -755,6 +761,18 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "fastbloom" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27cea6e7f512d43b098939ff4d5a5d6fe3db07971e1d05176fe26c642d33f5b8" +dependencies = [ + "getrandom 0.3.2", + "rand 0.9.1", + "siphasher", + "wide", +] + [[package]] name = "fastrand" version = "2.3.0" @@ -1507,6 +1525,12 @@ dependencies = [ "hashbrown", ] +[[package]] +name = "lru-slab" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" + [[package]] name = "matchers" version = "0.1.0" @@ -1849,9 +1873,9 @@ checksum = "1190fd18ae6ce9e137184f207593877e70f39b015040156b1e05081cdfe3733a" [[package]] name = "quinn" -version = "0.11.7" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3bd15a6f2967aef83887dcb9fec0014580467e33720d073560cf015a5683012" +checksum = "626214629cda6781b6dc1d316ba307189c85ba657213ce642d9c77670f8202c8" dependencies = [ "bytes", "cfg_aliases", @@ -1870,12 +1894,14 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.11" +version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcbafbbdbb0f638fe3f35f3c56739f77a8a1d070cb25603226c83339b391472b" +checksum = "49df843a9161c85bb8aae55f101bc0bac8bcafd637a620d9122fd7e0b2f7422e" dependencies = [ "bytes", + "fastbloom", "getrandom 0.3.2", + "lru-slab", "rand 0.9.1", "ring", "rustc-hash 2.1.1", @@ -2330,9 +2356,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.2" +version = "0.103.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7149975849f1abb3832b246010ef62ccc80d3a76169517ada7188252b9cfb437" +checksum = "e4a72fe2bcf7a6ac6fd7d0b9e5cb68aeb7d4c0a0271730218b3e92d43b4eb435" dependencies = [ "aws-lc-rs", "ring", @@ -2513,6 +2539,15 @@ dependencies = [ "libc", ] +[[package]] +name = "safe_arch" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96b02de82ddbe1b636e6170c21be622223aea188ef2e139be0a5b219ec215323" +dependencies = [ + "bytemuck", +] + [[package]] name = "same-file" version = "1.0.6" @@ -2589,9 +2624,9 @@ dependencies = [ [[package]] name = "serde_ignored" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "566da67d80e92e009728b3731ff0e5360cb181432b8ca73ea30bb1d170700d76" +checksum = "b516445dac1e3535b6d658a7b528d771153dfb272ed4180ca4617a20550365ff" dependencies = [ "serde", ] @@ -3256,6 +3291,16 @@ dependencies = [ "rustix 0.38.44", ] +[[package]] +name = "wide" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41b5576b9a81633f3e8df296ce0063042a73507636cbe956c61133dd7034ab22" +dependencies = [ + "bytemuck", + "safe_arch", +] + [[package]] name = "winapi" version = "0.3.9" diff --git a/rpxy-bin/Cargo.toml b/rpxy-bin/Cargo.toml index a99de63..a0664ac 100644 --- a/rpxy-bin/Cargo.toml +++ b/rpxy-bin/Cargo.toml @@ -47,10 +47,10 @@ async-trait = "0.1.88" futures-util = { version = "0.3.31", default-features = false } # config -clap = { version = "4.5.37", features = ["std", "cargo", "wrap_help"] } +clap = { version = "4.5.38", features = ["std", "cargo", "wrap_help"] } toml = { version = "0.8.22", default-features = false, features = ["parse"] } hot_reload = "0.1.9" -serde_ignored = "0.1.11" +serde_ignored = "0.1.12" # logging tracing = { version = "0.1.41" } diff --git a/rpxy-certs/Cargo.toml b/rpxy-certs/Cargo.toml index 90b15e6..3ccbc19 100644 --- a/rpxy-certs/Cargo.toml +++ b/rpxy-certs/Cargo.toml @@ -27,7 +27,7 @@ rustls = { version = "0.23.27", default-features = false, features = [ "aws_lc_rs", ] } rustls-pemfile = { version = "2.2.0" } -rustls-webpki = { version = "0.103.2", default-features = false, features = [ +rustls-webpki = { version = "0.103.3", default-features = false, features = [ "std", "aws-lc-rs", ] } diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 5d0b400..2457bfc 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -91,7 +91,7 @@ rpxy-acme = { path = "../rpxy-acme/", default-features = false, optional = true tracing = { version = "0.1.41" } # http/3 -quinn = { version = "0.11.7", optional = true } +quinn = { version = "0.11.8", optional = true } h3 = { version = "0.0.8", features = ["tracing"], optional = true } h3-quinn = { version = "0.0.10", optional = true } s2n-quic = { version = "1.58.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [ From 102b4964dc0d05cebe9a6f40449aab3d8d400ea1 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Tue, 13 May 2025 14:50:22 +0900 Subject: [PATCH 114/142] deps --- submodules/s2n-quic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/s2n-quic b/submodules/s2n-quic index 3e9b3f2..6af2c33 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit 3e9b3f2f499626acbf1d697aa8f58095b6585ce3 +Subproject commit 6af2c33b89f5dc6a314e2b2bb957225853ceb4d1 From 4761439338861dfd662c24d36d24989f75431846 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Tue, 13 May 2025 19:28:48 +0900 Subject: [PATCH 115/142] refactor --- Cargo.lock | 96 +++++++++++++++---- rpxy-bin/src/error.rs | 2 +- rpxy-certs/src/server_crypto.rs | 2 +- rpxy-lib/src/backend/backend_main.rs | 2 +- .../backend/load_balance/load_balance_main.rs | 2 +- .../load_balance/load_balance_sticky.rs | 4 +- rpxy-lib/src/backend/load_balance/mod.rs | 2 +- .../src/backend/load_balance/sticky_cookie.rs | 7 +- rpxy-lib/src/backend/upstream.rs | 4 +- rpxy-lib/src/forwarder/cache/mod.rs | 2 +- rpxy-lib/src/forwarder/client.rs | 4 +- rpxy-lib/src/hyper_ext/body_incoming_like.rs | 2 +- rpxy-lib/src/hyper_ext/body_type.rs | 2 +- rpxy-lib/src/hyper_ext/mod.rs | 2 +- rpxy-lib/src/hyper_ext/watch.rs | 2 +- .../src/message_handler/canonical_address.rs | 5 +- .../src/message_handler/synthetic_response.rs | 2 +- rpxy-lib/src/message_handler/utils_headers.rs | 4 +- rpxy-lib/src/message_handler/utils_request.rs | 4 +- rpxy-lib/src/proxy/proxy_main.rs | 2 +- 20 files changed, 104 insertions(+), 48 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eda3fd1..da1d618 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -24,7 +24,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", - "getrandom 0.3.2", + "getrandom 0.3.3", "once_cell", "version_check", "zerocopy", @@ -412,9 +412,9 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "cc" -version = "1.2.21" +version = "1.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8691782945451c1c383942c4874dbe63814f61cb57ef773cda2972682b7bb3c0" +checksum = "32db95edf998450acc7881c932f94cd9b05c87b4b2599e8bab064753da4acfd1" dependencies = [ "jobserver", "libc", @@ -767,7 +767,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27cea6e7f512d43b098939ff4d5a5d6fe3db07971e1d05176fe26c642d33f5b8" dependencies = [ - "getrandom 0.3.2", + "getrandom 0.3.3", "rand 0.9.1", "siphasher", "wide", @@ -970,9 +970,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ "cfg-if", "js-sys", @@ -1434,7 +1434,7 @@ version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" dependencies = [ - "getrandom 0.3.2", + "getrandom 0.3.3", "libc", ] @@ -1468,12 +1468,12 @@ checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" [[package]] name = "libloading" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +checksum = "6a793df0d7afeac54f95b471d3af7f0d4fb975699f972341a4b76988d49cdf0c" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.53.0", ] [[package]] @@ -1900,7 +1900,7 @@ checksum = "49df843a9161c85bb8aae55f101bc0bac8bcafd637a620d9122fd7e0b2f7422e" dependencies = [ "bytes", "fastbloom", - "getrandom 0.3.2", + "getrandom 0.3.3", "lru-slab", "rand 0.9.1", "ring", @@ -2002,7 +2002,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "getrandom 0.3.2", + "getrandom 0.3.3", ] [[package]] @@ -2751,12 +2751,12 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.19.1" +version = "3.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" +checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" dependencies = [ "fastrand", - "getrandom 0.3.2", + "getrandom 0.3.3", "once_cell", "rustix 1.0.7", "windows-sys 0.59.0", @@ -3442,13 +3442,29 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", + "windows_i686_gnullvm 0.52.6", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] +[[package]] +name = "windows-targets" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" +dependencies = [ + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -3461,6 +3477,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -3473,6 +3495,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -3485,12 +3513,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -3503,6 +3543,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -3515,6 +3561,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -3527,6 +3579,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -3539,6 +3597,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + [[package]] name = "winnow" version = "0.7.10" diff --git a/rpxy-bin/src/error.rs b/rpxy-bin/src/error.rs index 9751fb5..adb0969 100644 --- a/rpxy-bin/src/error.rs +++ b/rpxy-bin/src/error.rs @@ -1,2 +1,2 @@ #[allow(unused)] -pub use anyhow::{anyhow, bail, ensure, Context}; +pub use anyhow::{Context, anyhow, bail, ensure}; diff --git a/rpxy-certs/src/server_crypto.rs b/rpxy-certs/src/server_crypto.rs index 9a15c5a..a3282cc 100644 --- a/rpxy-certs/src/server_crypto.rs +++ b/rpxy-certs/src/server_crypto.rs @@ -1,9 +1,9 @@ use crate::{certs::SingleServerCertsKeys, error::*, log::*}; use ahash::HashMap; use rustls::{ + RootCertStore, ServerConfig, crypto::CryptoProvider, server::{ResolvesServerCertUsingSni, WebPkiClientVerifier}, - RootCertStore, ServerConfig, }; use std::sync::Arc; diff --git a/rpxy-lib/src/backend/backend_main.rs b/rpxy-lib/src/backend/backend_main.rs index 1ac49cb..af05704 100644 --- a/rpxy-lib/src/backend/backend_main.rs +++ b/rpxy-lib/src/backend/backend_main.rs @@ -1,8 +1,8 @@ use crate::{ + AppConfig, AppConfigList, error::*, log::*, name_exp::{ByteName, ServerName}, - AppConfig, AppConfigList, }; use ahash::HashMap; use derive_builder::Builder; diff --git a/rpxy-lib/src/backend/load_balance/load_balance_main.rs b/rpxy-lib/src/backend/load_balance/load_balance_main.rs index 0db21dd..6d14572 100644 --- a/rpxy-lib/src/backend/load_balance/load_balance_main.rs +++ b/rpxy-lib/src/backend/load_balance/load_balance_main.rs @@ -7,8 +7,8 @@ pub use super::{ use derive_builder::Builder; use rand::Rng; use std::sync::{ - atomic::{AtomicUsize, Ordering}, Arc, + atomic::{AtomicUsize, Ordering}, }; /// Constants to specify a load balance option diff --git a/rpxy-lib/src/backend/load_balance/load_balance_sticky.rs b/rpxy-lib/src/backend/load_balance/load_balance_sticky.rs index 46ac74e..93fc2ba 100644 --- a/rpxy-lib/src/backend/load_balance/load_balance_sticky.rs +++ b/rpxy-lib/src/backend/load_balance/load_balance_sticky.rs @@ -1,7 +1,7 @@ use super::{ + Upstream, load_balance_main::{LoadBalanceContext, LoadBalanceWithPointer, PointerToUpstream}, sticky_cookie::StickyCookieConfig, - Upstream, }; use crate::{constants::STICKY_COOKIE_NAME, log::*}; use ahash::HashMap; @@ -9,8 +9,8 @@ use derive_builder::Builder; use std::{ borrow::Cow, sync::{ - atomic::{AtomicUsize, Ordering}, Arc, + atomic::{AtomicUsize, Ordering}, }, }; diff --git a/rpxy-lib/src/backend/load_balance/mod.rs b/rpxy-lib/src/backend/load_balance/mod.rs index 38d312b..b77f72c 100644 --- a/rpxy-lib/src/backend/load_balance/mod.rs +++ b/rpxy-lib/src/backend/load_balance/mod.rs @@ -8,7 +8,7 @@ use super::upstream::Upstream; use thiserror::Error; pub use load_balance_main::{ - load_balance_options, LoadBalance, LoadBalanceContext, LoadBalanceRandomBuilder, LoadBalanceRoundRobinBuilder, + LoadBalance, LoadBalanceContext, LoadBalanceRandomBuilder, LoadBalanceRoundRobinBuilder, load_balance_options, }; #[cfg(feature = "sticky-cookie")] pub use load_balance_sticky::LoadBalanceStickyBuilder; diff --git a/rpxy-lib/src/backend/load_balance/sticky_cookie.rs b/rpxy-lib/src/backend/load_balance/sticky_cookie.rs index 28572b5..cad603c 100644 --- a/rpxy-lib/src/backend/load_balance/sticky_cookie.rs +++ b/rpxy-lib/src/backend/load_balance/sticky_cookie.rs @@ -91,12 +91,7 @@ impl<'a> StickyCookieBuilder { self } /// Set the meta information of sticky cookie - pub fn info( - &mut self, - domain: impl Into>, - path: impl Into>, - duration_secs: i64, - ) -> &mut Self { + pub fn info(&mut self, domain: impl Into>, path: impl Into>, duration_secs: i64) -> &mut Self { let info = StickyCookieInfoBuilder::default() .domain(domain) .path(path) diff --git a/rpxy-lib/src/backend/upstream.rs b/rpxy-lib/src/backend/upstream.rs index 353db99..4699b5b 100644 --- a/rpxy-lib/src/backend/upstream.rs +++ b/rpxy-lib/src/backend/upstream.rs @@ -1,7 +1,7 @@ #[cfg(feature = "sticky-cookie")] use super::load_balance::LoadBalanceStickyBuilder; use super::load_balance::{ - load_balance_options as lb_opts, LoadBalance, LoadBalanceContext, LoadBalanceRandomBuilder, LoadBalanceRoundRobinBuilder, + LoadBalance, LoadBalanceContext, LoadBalanceRandomBuilder, LoadBalanceRoundRobinBuilder, load_balance_options as lb_opts, }; // use super::{BytesName, LbContext, PathNameBytesExp, UpstreamOption}; use super::upstream_opts::UpstreamOption; @@ -13,7 +13,7 @@ use crate::{ }; use ahash::{HashMap, HashSet}; #[cfg(feature = "sticky-cookie")] -use base64::{engine::general_purpose, Engine as _}; +use base64::{Engine as _, engine::general_purpose}; use derive_builder::Builder; #[cfg(feature = "sticky-cookie")] use sha2::{Digest, Sha256}; diff --git a/rpxy-lib/src/forwarder/cache/mod.rs b/rpxy-lib/src/forwarder/cache/mod.rs index 076eaa3..8856bc0 100644 --- a/rpxy-lib/src/forwarder/cache/mod.rs +++ b/rpxy-lib/src/forwarder/cache/mod.rs @@ -2,4 +2,4 @@ mod cache_error; mod cache_main; pub use cache_error::CacheError; -pub(crate) use cache_main::{get_policy_if_cacheable, RpxyCache}; +pub(crate) use cache_main::{RpxyCache, get_policy_if_cacheable}; diff --git a/rpxy-lib/src/forwarder/client.rs b/rpxy-lib/src/forwarder/client.rs index 292be06..45597bc 100644 --- a/rpxy-lib/src/forwarder/client.rs +++ b/rpxy-lib/src/forwarder/client.rs @@ -9,13 +9,13 @@ use async_trait::async_trait; use http::{Request, Response, Version}; use hyper::body::{Body, Incoming}; use hyper_util::client::legacy::{ - connect::{Connect, HttpConnector}, Client, + connect::{Connect, HttpConnector}, }; use std::sync::Arc; #[cfg(feature = "cache")] -use super::cache::{get_policy_if_cacheable, RpxyCache}; +use super::cache::{RpxyCache, get_policy_if_cacheable}; #[async_trait] /// Definition of the forwarder that simply forward requests from downstream client to upstream app servers. diff --git a/rpxy-lib/src/hyper_ext/body_incoming_like.rs b/rpxy-lib/src/hyper_ext/body_incoming_like.rs index 1a86409..844b0bd 100644 --- a/rpxy-lib/src/hyper_ext/body_incoming_like.rs +++ b/rpxy-lib/src/hyper_ext/body_incoming_like.rs @@ -1,7 +1,7 @@ use super::watch; use crate::error::*; use futures_channel::{mpsc, oneshot}; -use futures_util::{stream::FusedStream, Future, Stream}; +use futures_util::{Future, Stream, stream::FusedStream}; use http::HeaderMap; use hyper::body::{Body, Bytes, Frame, SizeHint}; use std::{ diff --git a/rpxy-lib/src/hyper_ext/body_type.rs b/rpxy-lib/src/hyper_ext/body_type.rs index ca44756..5d39fb4 100644 --- a/rpxy-lib/src/hyper_ext/body_type.rs +++ b/rpxy-lib/src/hyper_ext/body_type.rs @@ -1,7 +1,7 @@ use super::body::IncomingLike; use crate::error::RpxyError; use futures::channel::mpsc::UnboundedReceiver; -use http_body_util::{combinators, BodyExt, Empty, Full, StreamBody}; +use http_body_util::{BodyExt, Empty, Full, StreamBody, combinators}; use hyper::body::{Body, Bytes, Frame, Incoming}; use std::pin::Pin; diff --git a/rpxy-lib/src/hyper_ext/mod.rs b/rpxy-lib/src/hyper_ext/mod.rs index a4c5196..4f68cc5 100644 --- a/rpxy-lib/src/hyper_ext/mod.rs +++ b/rpxy-lib/src/hyper_ext/mod.rs @@ -12,5 +12,5 @@ pub(crate) mod rt { #[allow(unused)] pub(crate) mod body { pub(crate) use super::body_incoming_like::IncomingLike; - pub(crate) use super::body_type::{empty, full, BoxBody, RequestBody, ResponseBody, UnboundedStreamBody}; + pub(crate) use super::body_type::{BoxBody, RequestBody, ResponseBody, UnboundedStreamBody, empty, full}; } diff --git a/rpxy-lib/src/hyper_ext/watch.rs b/rpxy-lib/src/hyper_ext/watch.rs index d5e1c7e..14f5650 100644 --- a/rpxy-lib/src/hyper_ext/watch.rs +++ b/rpxy-lib/src/hyper_ext/watch.rs @@ -7,8 +7,8 @@ use futures_util::task::AtomicWaker; use std::sync::{ - atomic::{AtomicUsize, Ordering}, Arc, + atomic::{AtomicUsize, Ordering}, }; use std::task; diff --git a/rpxy-lib/src/message_handler/canonical_address.rs b/rpxy-lib/src/message_handler/canonical_address.rs index 32dad78..d29177d 100644 --- a/rpxy-lib/src/message_handler/canonical_address.rs +++ b/rpxy-lib/src/message_handler/canonical_address.rs @@ -44,10 +44,7 @@ mod tests { } #[test] fn ipv6_to_canonical() { - let socket = SocketAddr::new( - IpAddr::V6(Ipv6Addr::new(0x2001, 0x0db8, 0, 0, 0, 0, 0xdead, 0xbeef)), - 8080, - ); + let socket = SocketAddr::new(IpAddr::V6(Ipv6Addr::new(0x2001, 0x0db8, 0, 0, 0, 0, 0xdead, 0xbeef)), 8080); assert_eq!(socket.to_canonical(), socket); } #[test] diff --git a/rpxy-lib/src/message_handler/synthetic_response.rs b/rpxy-lib/src/message_handler/synthetic_response.rs index a955a2d..41ee4c3 100644 --- a/rpxy-lib/src/message_handler/synthetic_response.rs +++ b/rpxy-lib/src/message_handler/synthetic_response.rs @@ -1,7 +1,7 @@ use super::http_result::{HttpError, HttpResult}; use crate::{ error::*, - hyper_ext::body::{empty, ResponseBody}, + hyper_ext::body::{ResponseBody, empty}, name_exp::ServerName, }; use http::{Request, Response, StatusCode, Uri}; diff --git a/rpxy-lib/src/message_handler/utils_headers.rs b/rpxy-lib/src/message_handler/utils_headers.rs index 1fa3c99..cfcadba 100644 --- a/rpxy-lib/src/message_handler/utils_headers.rs +++ b/rpxy-lib/src/message_handler/utils_headers.rs @@ -3,9 +3,9 @@ use crate::{ backend::{UpstreamCandidates, UpstreamOption}, log::*, }; -use anyhow::{anyhow, ensure, Result}; +use anyhow::{Result, anyhow, ensure}; use bytes::BufMut; -use http::{header, HeaderMap, HeaderName, HeaderValue, Uri}; +use http::{HeaderMap, HeaderName, HeaderValue, Uri, header}; use std::{borrow::Cow, net::SocketAddr}; #[cfg(feature = "sticky-cookie")] diff --git a/rpxy-lib/src/message_handler/utils_request.rs b/rpxy-lib/src/message_handler/utils_request.rs index 0a0a77c..98acdc0 100644 --- a/rpxy-lib/src/message_handler/utils_request.rs +++ b/rpxy-lib/src/message_handler/utils_request.rs @@ -2,8 +2,8 @@ use crate::{ backend::{Upstream, UpstreamCandidates, UpstreamOption}, log::*, }; -use anyhow::{anyhow, ensure, Result}; -use http::{header, uri::Scheme, Request, Version}; +use anyhow::{Result, anyhow, ensure}; +use http::{Request, Version, header, uri::Scheme}; /// Trait defining parser of hostname /// Inspect and extract hostname from either the request HOST header or request line diff --git a/rpxy-lib/src/proxy/proxy_main.rs b/rpxy-lib/src/proxy/proxy_main.rs index 5244ecf..cfc8b6e 100644 --- a/rpxy-lib/src/proxy/proxy_main.rs +++ b/rpxy-lib/src/proxy/proxy_main.rs @@ -11,7 +11,7 @@ use crate::{ message_handler::HttpMessageHandler, name_exp::ServerName, }; -use futures::{select, FutureExt}; +use futures::{FutureExt, select}; use http::{Request, Response}; use hyper::{ body::Incoming, From 57c1fd9e7e4df48983ebe97dd9ed4d198073940e Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Wed, 14 May 2025 13:28:28 +0900 Subject: [PATCH 116/142] deps --- submodules/s2n-quic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/s2n-quic b/submodules/s2n-quic index 6af2c33..30b2a32 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit 6af2c33b89f5dc6a314e2b2bb957225853ceb4d1 +Subproject commit 30b2a3229e0ddf66c7370687e63b1739fbebc542 From 47016b6d84cd062d53ba66375154bf7bfa8a645d Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Thu, 15 May 2025 10:16:28 +0900 Subject: [PATCH 117/142] deps --- submodules/s2n-quic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/s2n-quic b/submodules/s2n-quic index 30b2a32..a7880b8 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit 30b2a3229e0ddf66c7370687e63b1739fbebc542 +Subproject commit a7880b898663d35bbbf307f53b61fe9d691db2bc From 1da0d77309cad5606c4ef807c4f76c4064fd58e8 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Fri, 16 May 2025 16:31:58 +0900 Subject: [PATCH 118/142] refactor --- rpxy-lib/src/backend/backend_main.rs | 1 + rpxy-lib/src/proxy/proxy_h3.rs | 4 +- rpxy-lib/src/proxy/proxy_main.rs | 85 ++++++++++++++-------------- rpxy-lib/src/proxy/socket.rs | 17 +++--- 4 files changed, 56 insertions(+), 51 deletions(-) diff --git a/rpxy-lib/src/backend/backend_main.rs b/rpxy-lib/src/backend/backend_main.rs index af05704..5524956 100644 --- a/rpxy-lib/src/backend/backend_main.rs +++ b/rpxy-lib/src/backend/backend_main.rs @@ -26,6 +26,7 @@ pub struct BackendApp { pub https_redirection: Option, /// tls settings: mutual TLS is enabled #[builder(default)] + #[allow(unused)] pub mutual_tls: Option, } impl<'a> BackendAppBuilder { diff --git a/rpxy-lib/src/proxy/proxy_h3.rs b/rpxy-lib/src/proxy/proxy_h3.rs index acfe07d..1eed0c5 100644 --- a/rpxy-lib/src/proxy/proxy_h3.rs +++ b/rpxy-lib/src/proxy/proxy_h3.rs @@ -68,7 +68,7 @@ where h3_conn.shutdown(0).await?; break; } - debug!("Request incoming: current # {}", request_count.current()); + trace!("Request incoming: current # {}", request_count.current()); let self_inner = self.clone(); let tls_server_name_inner = tls_server_name.clone(); @@ -82,7 +82,7 @@ where warn!("HTTP/3 error on serve stream: {}", e); } request_count.decrement(); - debug!("Request processed: current # {}", request_count.current()); + trace!("Request processed: current # {}", request_count.current()); }); } } diff --git a/rpxy-lib/src/proxy/proxy_main.rs b/rpxy-lib/src/proxy/proxy_main.rs index cfc8b6e..b858072 100644 --- a/rpxy-lib/src/proxy/proxy_main.rs +++ b/rpxy-lib/src/proxy/proxy_main.rs @@ -80,7 +80,7 @@ where request_count.decrement(); return; } - debug!("Request incoming: current # {}", request_count.current()); + trace!("Request incoming: current # {}", request_count.current()); let server_clone = self.connection_builder.clone(); let message_handler_clone = self.message_handler.clone(); @@ -110,7 +110,7 @@ where } request_count.decrement(); - debug!("Request processed: current # {}", request_count.current()); + trace!("Request processed: current # {}", request_count.current()); }); } @@ -131,52 +131,55 @@ where /// Start with TLS (HTTPS) pub(super) async fn start_with_tls(&self, cancel_token: CancellationToken) -> RpxyResult<()> { + // By default, TLS listener is spawned + let join_handle_tls = self.globals.runtime_handle.spawn({ + let self_clone = self.clone(); + let cancel_token = cancel_token.clone(); + async move { + select! { + _ = self_clone.tls_listener_service().fuse() => { + error!("TCP proxy service for TLS exited"); + cancel_token.cancel(); + }, + _ = cancel_token.cancelled().fuse() => { + debug!("Cancel token is called for TLS listener"); + } + } + } + }); + #[cfg(not(any(feature = "http3-quinn", feature = "http3-s2n")))] { - self.tls_listener_service().await?; - error!("TCP proxy service for TLS exited"); + let _ = join_handle_tls.await; Ok(()) } + #[cfg(any(feature = "http3-quinn", feature = "http3-s2n"))] { - if self.globals.proxy_config.http3 { - let jh_tls = self.globals.runtime_handle.spawn({ - let self_clone = self.clone(); - let cancel_token = cancel_token.clone(); - async move { - select! { - _ = self_clone.tls_listener_service().fuse() => { - error!("TCP proxy service for TLS exited"); - cancel_token.cancel(); - }, - _ = cancel_token.cancelled().fuse() => { - debug!("Cancel token is called for TLS listener"); - } - } - } - }); - let jh_h3 = self.globals.runtime_handle.spawn({ - let self_clone = self.clone(); - async move { - select! { - _ = self_clone.h3_listener_service().fuse() => { - error!("UDP proxy service for QUIC exited"); - cancel_token.cancel(); - }, - _ = cancel_token.cancelled().fuse() => { - debug!("Cancel token is called for QUIC listener"); - } - } - } - }); - let _ = futures::future::join(jh_tls, jh_h3).await; - - Ok(()) - } else { - self.tls_listener_service().await?; - error!("TCP proxy service for TLS exited"); - Ok(()) + // If HTTP/3 is not enabled, wait for TLS listener to finish + if !self.globals.proxy_config.http3 { + let _ = join_handle_tls.await; + return Ok(()); } + + // If HTTP/3 is enabled, spawn a task to handle HTTP/3 connections + let join_handle_h3 = self.globals.runtime_handle.spawn({ + let self_clone = self.clone(); + async move { + select! { + _ = self_clone.h3_listener_service().fuse() => { + error!("UDP proxy service for QUIC exited"); + cancel_token.cancel(); + }, + _ = cancel_token.cancelled().fuse() => { + debug!("Cancel token is called for QUIC listener"); + } + } + } + }); + let _ = futures::future::join(join_handle_tls, join_handle_h3).await; + + Ok(()) } } diff --git a/rpxy-lib/src/proxy/socket.rs b/rpxy-lib/src/proxy/socket.rs index 322b42b..fbb810d 100644 --- a/rpxy-lib/src/proxy/socket.rs +++ b/rpxy-lib/src/proxy/socket.rs @@ -16,10 +16,12 @@ pub(super) fn bind_tcp_socket(listening_on: &SocketAddr) -> RpxyResult RpxyResult Date: Fri, 16 May 2025 16:33:12 +0900 Subject: [PATCH 119/142] chore: lock --- Cargo.lock | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index da1d618..459df62 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -360,9 +360,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" [[package]] name = "block-buffer" @@ -732,9 +732,9 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.11" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" +checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18" dependencies = [ "libc", "windows-sys 0.59.0", @@ -3334,9 +3334,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.61.0" +version = "0.61.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980" +checksum = "46ec44dc15085cea82cf9c78f85a9114c463a369786585ad2882d1ff0b0acf40" dependencies = [ "windows-implement", "windows-interface", @@ -3375,18 +3375,18 @@ checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" [[package]] name = "windows-result" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" +checksum = "4b895b5356fc36103d0f64dd1e94dfa7ac5633f1c9dd6e80fe9ec4adef69e09d" dependencies = [ "windows-link", ] [[package]] name = "windows-strings" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97" +checksum = "2a7ab927b2637c19b3dbe0965e75d8f2d30bdd697a1516191cad2ec4df8fb28a" dependencies = [ "windows-link", ] From a412eb08d6d6f653a938f4d07a99d2c95a3c6475 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Fri, 16 May 2025 17:31:06 +0900 Subject: [PATCH 120/142] chore: submodule --- submodules/s2n-quic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/s2n-quic b/submodules/s2n-quic index a7880b8..250347d 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit a7880b898663d35bbbf307f53b61fe9d691db2bc +Subproject commit 250347d34e8841a8958437f7c461513d157e1957 From 2705db6b91b69674c3ae5c514931deff8f37b5ac Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Fri, 16 May 2025 18:27:02 +0900 Subject: [PATCH 121/142] refactor handler_main --- rpxy-lib/src/lib.rs | 6 +-- rpxy-lib/src/message_handler/handler_main.rs | 54 ++++++++++---------- 2 files changed, 27 insertions(+), 33 deletions(-) diff --git a/rpxy-lib/src/lib.rs b/rpxy-lib/src/lib.rs index 72ddbd3..77c5b93 100644 --- a/rpxy-lib/src/lib.rs +++ b/rpxy-lib/src/lib.rs @@ -180,9 +180,5 @@ pub async fn entrypoint( } }); // returns the first error as the representative error - if let Some(e) = errs.next() { - return Err(e); - } - - Ok(()) + errs.next().map_or(Ok(()), |e| Err(e)) } diff --git a/rpxy-lib/src/message_handler/handler_main.rs b/rpxy-lib/src/message_handler/handler_main.rs index 9496e6a..920e55c 100644 --- a/rpxy-lib/src/message_handler/handler_main.rs +++ b/rpxy-lib/src/message_handler/handler_main.rs @@ -107,9 +107,11 @@ where let backend_app = match self.app_manager.apps.get(&server_name) { Some(backend_app) => backend_app, None => { - let Some(default_server_name) = &self.app_manager.default_server_name else { - return Err(HttpError::NoMatchingBackendApp); - }; + let default_server_name = self + .app_manager + .default_server_name + .as_ref() + .ok_or(HttpError::NoMatchingBackendApp)?; debug!("Serving by default app"); self.app_manager.apps.get(default_server_name).unwrap() } @@ -131,9 +133,7 @@ where // Find reverse proxy for given path and choose one of upstream host // Longest prefix match let path = req.uri().path(); - let Some(upstream_candidates) = backend_app.path_manager.get(path) else { - return Err(HttpError::NoUpstreamCandidates); - }; + let upstream_candidates = backend_app.path_manager.get(path).ok_or(HttpError::NoUpstreamCandidates)?; // Upgrade in request header let upgrade_in_request = extract_upgrade(req.headers()); @@ -147,19 +147,17 @@ where let req_on_upgrade = hyper::upgrade::on(&mut req); // Build request from destination information - let _context = match self.generate_request_forwarded( - &client_addr, - &listen_addr, - &mut req, - &upgrade_in_request, - upstream_candidates, - tls_enabled, - ) { - Err(e) => { - return Err(HttpError::FailedToGenerateUpstreamRequest(e.to_string())); - } - Ok(v) => v, - }; + let _context = self + .generate_request_forwarded( + &client_addr, + &listen_addr, + &mut req, + &upgrade_in_request, + upstream_candidates, + tls_enabled, + ) + .map_err(|e| HttpError::FailedToGenerateUpstreamRequest(e.to_string()))?; + debug!( "Request to be forwarded: [uri {}, method: {}, version {:?}, headers {:?}]", req.uri(), @@ -173,12 +171,12 @@ where ////////////// // Forward request to a chosen backend - let mut res_backend = match self.forwarder.request(req).await { - Ok(v) => v, - Err(e) => { - return Err(HttpError::FailedToGetResponseFromBackend(e.to_string())); - } - }; + let mut res_backend = self + .forwarder + .request(req) + .await + .map_err(|e| HttpError::FailedToGetResponseFromBackend(e.to_string()))?; + ////////////// // Process reverse proxy context generated during the forwarding request generation. #[cfg(feature = "sticky-cookie")] @@ -191,9 +189,9 @@ where if res_backend.status() != StatusCode::SWITCHING_PROTOCOLS { // Generate response to client - if let Err(e) = self.generate_response_forwarded(&mut res_backend, backend_app) { - return Err(HttpError::FailedToGenerateDownstreamResponse(e.to_string())); - } + self + .generate_response_forwarded(&mut res_backend, backend_app) + .map_err(|e| HttpError::FailedToGenerateDownstreamResponse(e.to_string()))?; return Ok(res_backend); } From e259e0b58897258d98fdb7504a1cbcbd7c5b37db Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Fri, 16 May 2025 19:30:51 +0900 Subject: [PATCH 122/142] refactor --- .../load_balance/load_balance_sticky.rs | 17 ++++---- rpxy-lib/src/backend/upstream.rs | 40 +++++++++---------- rpxy-lib/src/forwarder/cache/cache_main.rs | 16 ++++---- .../handler_manipulate_messages.rs | 24 +++++------ rpxy-lib/src/message_handler/utils_headers.rs | 15 +++---- 5 files changed, 52 insertions(+), 60 deletions(-) diff --git a/rpxy-lib/src/backend/load_balance/load_balance_sticky.rs b/rpxy-lib/src/backend/load_balance/load_balance_sticky.rs index 93fc2ba..4282312 100644 --- a/rpxy-lib/src/backend/load_balance/load_balance_sticky.rs +++ b/rpxy-lib/src/backend/load_balance/load_balance_sticky.rs @@ -112,13 +112,16 @@ impl LoadBalanceWithPointer for LoadBalanceSticky { } Some(context) => { let server_id = &context.sticky_cookie.value.value; - if let Some(server_index) = self.get_server_index_from_id(server_id) { - debug!("Valid sticky cookie: id={}, index={}", server_id, server_index); - server_index - } else { - debug!("Invalid sticky cookie: id={}", server_id); - self.simple_increment_ptr() - } + self.get_server_index_from_id(server_id).map_or_else( + || { + debug!("Invalid sticky cookie: id={}", server_id); + self.simple_increment_ptr() + }, + |server_index| { + debug!("Valid sticky cookie: id={}, index={}", server_id, server_index); + server_index + }, + ) } }; diff --git a/rpxy-lib/src/backend/upstream.rs b/rpxy-lib/src/backend/upstream.rs index 4699b5b..9760d58 100644 --- a/rpxy-lib/src/backend/upstream.rs +++ b/rpxy-lib/src/backend/upstream.rs @@ -72,27 +72,22 @@ impl PathManager { .inner .iter() .filter(|(route_bytes, _)| { - match path_name.starts_with(route_bytes) { - true => { - route_bytes.len() == 1 // route = '/', i.e., default - || match path_name.get(route_bytes.len()) { - None => true, // exact case - Some(p) => p == &b'/', // sub-path case - } - } - _ => false, + path_name.starts_with(route_bytes) && { + route_bytes.len() == 1 // route = '/', i.e., default + || path_name.get(route_bytes.len()).map_or( + true, // exact case + |p| p == &b'/' + ) // sub-path case } }) .max_by_key(|(route_bytes, _)| route_bytes.len()); - if let Some((path, u)) = matched_upstream { + matched_upstream.map(|(path, u)| { debug!( "Found upstream: {:?}", path.try_into().unwrap_or_else(|_| "".to_string()) ); - Some(u) - } else { - None - } + u + }) } } @@ -211,14 +206,15 @@ impl UpstreamCandidatesBuilder { } /// Set the activated upstream options defined in [[UpstreamOption]] pub fn options(&mut self, v: &Option>) -> &mut Self { - let opts = if let Some(opts) = v { - opts - .iter() - .filter_map(|str| UpstreamOption::try_from(str.as_str()).ok()) - .collect::>() - } else { - Default::default() - }; + let opts = v.as_ref().map_or_else( + || Default::default(), + |opts| { + opts + .iter() + .filter_map(|str| UpstreamOption::try_from(str.as_str()).ok()) + .collect::>() + }, + ); self.options = Some(opts); self } diff --git a/rpxy-lib/src/forwarder/cache/cache_main.rs b/rpxy-lib/src/forwarder/cache/cache_main.rs index 37e1fa9..784000f 100644 --- a/rpxy-lib/src/forwarder/cache/cache_main.rs +++ b/rpxy-lib/src/forwarder/cache/cache_main.rs @@ -185,9 +185,7 @@ impl RpxyCache { let cache_key = derive_cache_key_from_uri(req.uri()); // First check cache chance - let Ok(Some(cached_object)) = self.inner.get(&cache_key) else { - return None; - }; + let cached_object = self.inner.get(&cache_key).ok()??; // Secondly check the cache freshness as an HTTP message let now = SystemTime::now(); @@ -451,10 +449,10 @@ impl LruCacheManager { /// Push an entry fn push(&self, cache_key: &str, cache_object: &CacheObject) -> CacheResult> { - let Ok(mut lock) = self.inner.lock() else { + let mut lock = self.inner.lock().map_err(|_| { error!("Failed to acquire mutex lock for writing cache entry"); - return Err(CacheError::FailedToAcquiredMutexLockForCache); - }; + CacheError::FailedToAcquiredMutexLockForCache + })?; let res = Ok(lock.push(cache_key.to_string(), cache_object.clone())); // This may be inconsistent with the actual number of entries self.cnt.store(lock.len(), Ordering::Relaxed); @@ -463,10 +461,10 @@ impl LruCacheManager { /// Get an entry fn get(&self, cache_key: &str) -> CacheResult> { - let Ok(mut lock) = self.inner.lock() else { + let mut lock = self.inner.lock().map_err(|_| { error!("Mutex can't be locked for checking cache entry"); - return Err(CacheError::FailedToAcquiredMutexLockForCheck); - }; + CacheError::FailedToAcquiredMutexLockForCheck + })?; let Some(cached_object) = lock.get(cache_key) else { return Ok(None); }; diff --git a/rpxy-lib/src/message_handler/handler_manipulate_messages.rs b/rpxy-lib/src/message_handler/handler_manipulate_messages.rs index 680c6ee..dc58486 100644 --- a/rpxy-lib/src/message_handler/handler_manipulate_messages.rs +++ b/rpxy-lib/src/message_handler/handler_manipulate_messages.rs @@ -70,13 +70,15 @@ where // Add te: trailer if contained in original request let contains_te_trailers = { - if let Some(te) = req.headers().get(header::TE) { - te.as_bytes() - .split(|v| v == &b',' || v == &b' ') - .any(|x| x == "trailers".as_bytes()) - } else { - false - } + req + .headers() + .get(header::TE) + .map(|te| { + te.as_bytes() + .split(|v| v == &b',' || v == &b' ') + .any(|x| x == "trailers".as_bytes()) + }) + .unwrap_or(false) }; let original_uri = req.uri().to_string(); @@ -136,11 +138,7 @@ where let new_uri = Uri::builder() .scheme(upstream_chosen.uri.scheme().unwrap().as_str()) .authority(upstream_chosen.uri.authority().unwrap().as_str()); - let org_pq = match req.uri().path_and_query() { - Some(pq) => pq.to_string(), - None => "/".to_string(), - } - .into_bytes(); + let org_pq = req.uri().path_and_query().map(|pq| pq.as_str()).unwrap_or("/").as_bytes(); // replace some parts of path if opt_replace_path is enabled for chosen upstream let new_pq = match &upstream_candidates.replace_path { @@ -155,7 +153,7 @@ where new_pq.extend_from_slice(&org_pq[matched_path.len()..]); new_pq } - None => org_pq, + None => org_pq.to_vec(), }; *req.uri_mut() = new_uri.path_and_query(new_pq).build()?; diff --git a/rpxy-lib/src/message_handler/utils_headers.rs b/rpxy-lib/src/message_handler/utils_headers.rs index cfcadba..cab6e01 100644 --- a/rpxy-lib/src/message_handler/utils_headers.rs +++ b/rpxy-lib/src/message_handler/utils_headers.rs @@ -236,10 +236,9 @@ pub(super) fn add_forwarding_header( pub(super) fn remove_connection_header(headers: &mut HeaderMap) { if let Some(values) = headers.get(header::CONNECTION) { if let Ok(v) = values.clone().to_str() { - for m in v.split(',') { - if !m.is_empty() { - headers.remove(m.trim()); - } + let keys = v.split(',').map(|m| m.trim()).filter(|m| !m.is_empty()); + for m in keys { + headers.remove(m); } } } @@ -274,11 +273,9 @@ pub(super) fn extract_upgrade(headers: &HeaderMap) -> Option { .split(',') .any(|w| w.trim().eq_ignore_ascii_case(header::UPGRADE.as_str())) { - if let Some(u) = headers.get(header::UPGRADE) { - if let Ok(m) = u.to_str() { - debug!("Upgrade in request header: {}", m); - return Some(m.to_owned()); - } + if let Some(Ok(m)) = headers.get(header::UPGRADE).map(|u| u.to_str()) { + debug!("Upgrade in request header: {}", m); + return Some(m.to_owned()); } } } From 71f7ef2d77aee219072b6af063024f913da14416 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Sat, 17 May 2025 04:17:50 +0900 Subject: [PATCH 123/142] bench --- README.md | 2 +- bench/Caddyfile | 4 +++ bench/README.md | 71 +++++++++++++++++++--------------------- bench/docker-compose.yml | 6 ++-- bench/nginx.conf | 5 ++- submodules/s2n-quic | 2 +- 6 files changed, 46 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index e114859..70b3dba 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Supported features are summarized as follows: [^sanitization]: By default, `rpxy` provides the *TLS connection sanitization* by correctly binding a certificate used to establish a secure channel with the backend application. Specifically, it always keeps the consistency between the given SNI (server name indication) in `ClientHello` of the underlying TLS and the domain name given by the overlaid HTTP HOST header (or URL in Request line). We should note that NGINX doesn't guarantee such a consistency by default. To this end, you have to add `if` statement in the configuration file in NGINX. - This project is still *work-in-progress*. But it is already working in some production environments and serves a number of domain names. Furthermore it *significantly outperforms* NGINX and Caddy, e.g., *1.5x faster than NGINX*, in the setting of a very simple HTTP reverse-proxy scenario (See [`bench`](./bench/) directory). + This project is still *work-in-progress*. But it is already working in some production environments and serves a number of domain names. Furthermore it *significantly outperforms* NGINX and Caddy, e.g., *30% or more faster than NGINX*, in the setting of a very simple HTTP reverse-proxy scenario (See [`bench`](./bench/) directory). ## Installing/Building an Executable Binary of `rpxy` diff --git a/bench/Caddyfile b/bench/Caddyfile index 3ba1fa2..d12b122 100644 --- a/bench/Caddyfile +++ b/bench/Caddyfile @@ -2,9 +2,13 @@ auto_https off } + :80 { # Proxy everything else to Rocket reverse_proxy backend-nginx + log { + level ERROR + } } diff --git a/bench/README.md b/bench/README.md index 55ca4dd..f75b978 100644 --- a/bench/README.md +++ b/bench/README.md @@ -8,44 +8,41 @@ $ rewrk -c 512 -t 4 -d 15s -h http://localhost:8080 --pct ## Tests on `linux/arm64/v8` -Done at Jul. 15, 2023 +Done at May. 17, 2025 ### Environment -- `rpxy` commit id: `1da7e5bfb77d1ce4ee8d6cfc59b1c725556fc192` -- Docker Desktop 4.21.1 (114176) +- `rpxy` commit id: `e259e0b58897258d98fdb7504a1cbcbd7c5b37db` +- Docker Desktop 4.41.2 (191736) - ReWrk 0.3.2 -- Macbook Pro '14 (2021, M1 Max, 64GB RAM) +- MacBook Pro '14 (2021, M1 Max, 64GB RAM) The docker images of `nginx` and `caddy` for `linux/arm64/v8` are pulled from the official registry. ### Result for `rpxy`, `nginx` and `caddy` -``` ----------------------------- +```bash Benchmark on rpxy Beginning round 1... Benchmarking 512 connections @ http://localhost:8080 for 15 second(s) Latencies: Avg Stdev Min Max - 19.64ms 8.85ms 0.67ms 113.22ms + 10.62ms 4.47ms 0.47ms 73.01ms Requests: - Total: 390078 Req/Sec: 26011.25 + Total: 720148 Req/Sec: 48025.92 Transfer: - Total: 304.85 MB Transfer Rate: 20.33 MB/Sec + Total: 563.85 MB Transfer Rate: 37.60 MB/Sec + --------------- + --------------- + | Percentile | Avg Latency | + --------------- + --------------- + -| 99.9% | 79.24ms | -| 99% | 54.28ms | -| 95% | 42.50ms | -| 90% | 37.82ms | -| 75% | 31.54ms | -| 50% | 26.37ms | +| 99.9% | 54.78ms | +| 99% | 35.86ms | +| 95% | 23.09ms | +| 90% | 19.82ms | +| 75% | 16.14ms | +| 50% | 13.54ms | + --------------- + --------------- + -721 Errors: error shutting down connection: Socket is not connected (os error 57) - sleep 3 secs ---------------------------- Benchmark on nginx @@ -53,23 +50,23 @@ Beginning round 1... Benchmarking 512 connections @ http://localhost:8090 for 15 second(s) Latencies: Avg Stdev Min Max - 33.26ms 15.18ms 1.40ms 118.94ms + 14.55ms 13.05ms 0.57ms 255.24ms Requests: - Total: 230268 Req/Sec: 15356.08 + Total: 525866 Req/Sec: 35073.37 Transfer: - Total: 186.77 MB Transfer Rate: 12.46 MB/Sec + Total: 427.78 MB Transfer Rate: 28.53 MB/Sec + --------------- + --------------- + | Percentile | Avg Latency | + --------------- + --------------- + -| 99.9% | 99.91ms | -| 99% | 83.74ms | -| 95% | 70.67ms | -| 90% | 64.03ms | -| 75% | 54.32ms | -| 50% | 45.19ms | +| 99.9% | 235.17ms | +| 99% | 91.77ms | +| 95% | 48.86ms | +| 90% | 39.08ms | +| 75% | 28.78ms | +| 50% | 21.77ms | + --------------- + --------------- + -677 Errors: error shutting down connection: Socket is not connected (os error 57) +227 Errors: connection closed sleep 3 secs ---------------------------- @@ -78,23 +75,21 @@ Beginning round 1... Benchmarking 512 connections @ http://localhost:8100 for 15 second(s) Latencies: Avg Stdev Min Max - 48.51ms 50.74ms 0.34ms 554.58ms + 70.44ms 220.19ms 0.67ms 4140.08ms Requests: - Total: 157239 Req/Sec: 10485.98 + Total: 79980 Req/Sec: 5334.74 Transfer: - Total: 125.99 MB Transfer Rate: 8.40 MB/Sec + Total: 64.45 MB Transfer Rate: 4.30 MB/Sec + --------------- + --------------- + | Percentile | Avg Latency | + --------------- + --------------- + -| 99.9% | 473.82ms | -| 99% | 307.16ms | -| 95% | 212.28ms | -| 90% | 169.05ms | -| 75% | 115.92ms | -| 50% | 80.24ms | +| 99.9% | 3550.19ms | +| 99% | 1847.80ms | +| 95% | 672.82ms | +| 90% | 440.34ms | +| 75% | 224.81ms | +| 50% | 128.79ms | + --------------- + --------------- + - -708 Errors: error shutting down connection: Socket is not connected (os error 57) ``` ## Results on `linux/amd64` diff --git a/bench/docker-compose.yml b/bench/docker-compose.yml index 7b2b043..aaf800d 100644 --- a/bench/docker-compose.yml +++ b/bench/docker-compose.yml @@ -28,7 +28,7 @@ services: dockerfile: docker/Dockerfile restart: unless-stopped environment: - - LOG_LEVEL=info + - LOG_LEVEL=error # almost nolog - LOG_TO_FILE=false ports: - 127.0.0.1:8080:8080 @@ -47,7 +47,7 @@ services: tty: false privileged: true volumes: - - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro + - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro # set as almost nolog - /var/run/docker.sock:/tmp/docker.sock:ro logging: options: @@ -64,7 +64,7 @@ services: restart: unless-stopped tty: false volumes: - - ./Caddyfile:/etc/caddy/Caddyfile:ro + - ./Caddyfile:/etc/caddy/Caddyfile:ro # set as almost no log networks: bench-nw: diff --git a/bench/nginx.conf b/bench/nginx.conf index 0ef89e3..b05910a 100644 --- a/bench/nginx.conf +++ b/bench/nginx.conf @@ -31,11 +31,14 @@ # '"$request" $status $body_bytes_sent ' # '"$http_referer" "$http_user_agent" ' # '"$upstream_addr"'; -# access_log off; +access_log off; + # ssl_protocols TLSv1.2 TLSv1.3; # ssl_ciphers 'ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384'; # ssl_prefer_server_ciphers off; # error_log /dev/stderr; +error_log /dev/null crit; + # resolver 127.0.0.11; # # HTTP 1.1 support # proxy_http_version 1.1; diff --git a/submodules/s2n-quic b/submodules/s2n-quic index 250347d..f48dc68 160000 --- a/submodules/s2n-quic +++ b/submodules/s2n-quic @@ -1 +1 @@ -Subproject commit 250347d34e8841a8958437f7c461513d157e1957 +Subproject commit f48dc6846fc363ab668441ff5a471fc27199bb55 From a5ed7c9b92a45cec7d66d01d892c27d180a61915 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Sat, 17 May 2025 04:32:41 +0900 Subject: [PATCH 124/142] retest with m4 pro --- README.md | 2 +- bench/README.md | 58 ++++++++++++++++++++++++------------------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 70b3dba..92fdb9b 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Supported features are summarized as follows: [^sanitization]: By default, `rpxy` provides the *TLS connection sanitization* by correctly binding a certificate used to establish a secure channel with the backend application. Specifically, it always keeps the consistency between the given SNI (server name indication) in `ClientHello` of the underlying TLS and the domain name given by the overlaid HTTP HOST header (or URL in Request line). We should note that NGINX doesn't guarantee such a consistency by default. To this end, you have to add `if` statement in the configuration file in NGINX. - This project is still *work-in-progress*. But it is already working in some production environments and serves a number of domain names. Furthermore it *significantly outperforms* NGINX and Caddy, e.g., *30% or more faster than NGINX*, in the setting of a very simple HTTP reverse-proxy scenario (See [`bench`](./bench/) directory). + This project is still *work-in-progress*. But it is already working in some production environments and serves a number of domain names. Furthermore it *significantly outperforms* NGINX and Caddy, e.g., *30% ~ 60% or more faster than NGINX*, in the setting of a very simple HTTP reverse-proxy scenario (See [`bench`](./bench/) directory). ## Installing/Building an Executable Binary of `rpxy` diff --git a/bench/README.md b/bench/README.md index f75b978..a713931 100644 --- a/bench/README.md +++ b/bench/README.md @@ -15,7 +15,7 @@ Done at May. 17, 2025 - `rpxy` commit id: `e259e0b58897258d98fdb7504a1cbcbd7c5b37db` - Docker Desktop 4.41.2 (191736) - ReWrk 0.3.2 -- MacBook Pro '14 (2021, M1 Max, 64GB RAM) +- Mac mini (2024, M4 Pro, 64GB RAM) The docker images of `nginx` and `caddy` for `linux/arm64/v8` are pulled from the official registry. @@ -27,20 +27,20 @@ Beginning round 1... Benchmarking 512 connections @ http://localhost:8080 for 15 second(s) Latencies: Avg Stdev Min Max - 10.62ms 4.47ms 0.47ms 73.01ms + 6.90ms 3.42ms 0.78ms 80.26ms Requests: - Total: 720148 Req/Sec: 48025.92 + Total: 1107885 Req/Sec: 73866.03 Transfer: - Total: 563.85 MB Transfer Rate: 37.60 MB/Sec + Total: 867.44 MB Transfer Rate: 57.83 MB/Sec + --------------- + --------------- + | Percentile | Avg Latency | + --------------- + --------------- + -| 99.9% | 54.78ms | -| 99% | 35.86ms | -| 95% | 23.09ms | -| 90% | 19.82ms | -| 75% | 16.14ms | -| 50% | 13.54ms | +| 99.9% | 49.76ms | +| 99% | 29.57ms | +| 95% | 15.78ms | +| 90% | 13.05ms | +| 75% | 10.41ms | +| 50% | 8.72ms | + --------------- + --------------- + sleep 3 secs @@ -50,23 +50,23 @@ Beginning round 1... Benchmarking 512 connections @ http://localhost:8090 for 15 second(s) Latencies: Avg Stdev Min Max - 14.55ms 13.05ms 0.57ms 255.24ms + 11.65ms 14.04ms 0.40ms 205.93ms Requests: - Total: 525866 Req/Sec: 35073.37 + Total: 654978 Req/Sec: 43666.56 Transfer: - Total: 427.78 MB Transfer Rate: 28.53 MB/Sec + Total: 532.81 MB Transfer Rate: 35.52 MB/Sec + --------------- + --------------- + | Percentile | Avg Latency | + --------------- + --------------- + -| 99.9% | 235.17ms | -| 99% | 91.77ms | -| 95% | 48.86ms | -| 90% | 39.08ms | -| 75% | 28.78ms | -| 50% | 21.77ms | +| 99.9% | 151.00ms | +| 99% | 102.80ms | +| 95% | 62.44ms | +| 90% | 42.98ms | +| 75% | 26.44ms | +| 50% | 18.25ms | + --------------- + --------------- + -227 Errors: connection closed +512 Errors: connection closed sleep 3 secs ---------------------------- @@ -75,20 +75,20 @@ Beginning round 1... Benchmarking 512 connections @ http://localhost:8100 for 15 second(s) Latencies: Avg Stdev Min Max - 70.44ms 220.19ms 0.67ms 4140.08ms + 77.54ms 368.11ms 0.37ms 6770.73ms Requests: - Total: 79980 Req/Sec: 5334.74 + Total: 86963 Req/Sec: 5798.35 Transfer: - Total: 64.45 MB Transfer Rate: 4.30 MB/Sec + Total: 70.00 MB Transfer Rate: 4.67 MB/Sec + --------------- + --------------- + | Percentile | Avg Latency | + --------------- + --------------- + -| 99.9% | 3550.19ms | -| 99% | 1847.80ms | -| 95% | 672.82ms | -| 90% | 440.34ms | -| 75% | 224.81ms | -| 50% | 128.79ms | +| 99.9% | 5789.65ms | +| 99% | 3407.02ms | +| 95% | 1022.31ms | +| 90% | 608.17ms | +| 75% | 281.95ms | +| 50% | 149.29ms | + --------------- + --------------- + ``` From 4905d6a66298d9c60097642089e087c3f9a22d34 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Mon, 19 May 2025 15:21:07 +0900 Subject: [PATCH 125/142] refactor --- rpxy-bin/src/log.rs | 56 ++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 34 deletions(-) diff --git a/rpxy-bin/src/log.rs b/rpxy-bin/src/log.rs index 151c94b..d194eb4 100644 --- a/rpxy-bin/src/log.rs +++ b/rpxy-bin/src/log.rs @@ -1,7 +1,7 @@ use crate::constants::{ACCESS_LOG_FILE, SYSTEM_LOG_FILE}; use rpxy_lib::log_event_names; use std::str::FromStr; -use tracing_subscriber::{fmt, prelude::*}; +use tracing_subscriber::{filter::filter_fn, fmt, prelude::*}; #[allow(unused)] pub use tracing::{debug, error, info, warn}; @@ -12,20 +12,16 @@ pub fn init_logger(log_dir_path: Option<&str>) { let level = tracing::Level::from_str(level_string.as_str()).unwrap_or(tracing::Level::INFO); match log_dir_path { - None => { - // log to stdout - init_stdio_logger(level); - } - Some(log_dir_path) => { - // log to files - println!("Activate logging to files: {log_dir_path}"); - init_file_logger(level, log_dir_path); - } + // log to stdout + None => init_stdio_logger(level), + // log to files + Some(log_dir_path) => init_file_logger(level, log_dir_path), } } -/// file logging TODO: +/// file logging fn init_file_logger(level: tracing::Level, log_dir_path: &str) { + println!("Activate logging to files: {log_dir_path}"); let log_dir_path = std::path::PathBuf::from(log_dir_path); // create the directory if it does not exist if !log_dir_path.exists() { @@ -63,12 +59,8 @@ fn init_file_logger(level: tracing::Level, log_dir_path: &str) { let reg = reg.with( system_log_base .with_writer(system_log) - .with_filter(tracing_subscriber::filter::filter_fn(move |metadata| { - (metadata - .target() - .starts_with(env!("CARGO_PKG_NAME").replace('-', "_").as_str()) - && metadata.name() != log_event_names::ACCESS_LOG - && metadata.level() <= &level) + .with_filter(filter_fn(move |metadata| { + (is_cargo_pkg(metadata) && metadata.name() != log_event_names::ACCESS_LOG && metadata.level() <= &level) || metadata.level() <= &tracing::Level::WARN.min(level) })), ); @@ -85,12 +77,8 @@ fn init_stdio_logger(level: tracing::Level) { let stdio_layer = stdio_layer .with_target(false) .compact() - .with_filter(tracing_subscriber::filter::filter_fn(move |metadata| { - (metadata - .target() - .starts_with(env!("CARGO_PKG_NAME").replace('-', "_").as_str()) - && metadata.level() <= &level) - || metadata.level() <= &tracing::Level::WARN.min(level) + .with_filter(filter_fn(move |metadata| { + (is_cargo_pkg(metadata) && metadata.level() <= &level) || metadata.level() <= &tracing::Level::WARN.min(level) })); tracing_subscriber::registry().with(stdio_layer).init(); } else { @@ -101,12 +89,8 @@ fn init_stdio_logger(level: tracing::Level) { .with_thread_names(true) .with_target(true) .compact() - .with_filter(tracing_subscriber::filter::filter_fn(move |metadata| { - (metadata - .target() - .starts_with(env!("CARGO_PKG_NAME").replace('-', "_").as_str()) - && metadata.level() <= &level) - || metadata.level() <= &tracing::Level::INFO.min(level) + .with_filter(filter_fn(move |metadata| { + (is_cargo_pkg(metadata) && metadata.level() <= &level) || metadata.level() <= &tracing::Level::INFO.min(level) })); tracing_subscriber::registry().with(stdio_layer).init(); }; @@ -116,11 +100,7 @@ fn init_stdio_logger(level: tracing::Level) { struct AccessLogFilter; impl tracing_subscriber::layer::Filter for AccessLogFilter { fn enabled(&self, metadata: &tracing::Metadata<'_>, _: &tracing_subscriber::layer::Context<'_, S>) -> bool { - metadata - .target() - .starts_with(env!("CARGO_PKG_NAME").replace('-', "_").as_str()) - && metadata.name().contains(log_event_names::ACCESS_LOG) - && metadata.level() <= &tracing::Level::INFO + is_cargo_pkg(metadata) && metadata.name().contains(log_event_names::ACCESS_LOG) && metadata.level() <= &tracing::Level::INFO } } @@ -137,3 +117,11 @@ where .open(path) .expect("Failed to open the log file") } + +#[inline] +/// Mached with cargo package name with `_` instead of `-` +fn is_cargo_pkg(metadata: &tracing::Metadata<'_>) -> bool { + metadata + .target() + .starts_with(env!("CARGO_PKG_NAME").replace('-', "_").as_str()) +} From b3959233a5054c2f3b2931e53ac602d903295a5f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 May 2025 22:20:37 +0000 Subject: [PATCH 126/142] chore(deps): bump hyper-util from 0.1.11 to 0.1.12 Bumps [hyper-util](https://github.com/hyperium/hyper-util) from 0.1.11 to 0.1.12. - [Release notes](https://github.com/hyperium/hyper-util/releases) - [Changelog](https://github.com/hyperium/hyper-util/blob/master/CHANGELOG.md) - [Commits](https://github.com/hyperium/hyper-util/compare/v0.1.11...v0.1.12) --- updated-dependencies: - dependency-name: hyper-util dependency-version: 0.1.12 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- rpxy-lib/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 459df62..44ae3e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1211,9 +1211,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497bbc33a26fdd4af9ed9c70d63f61cf56a938375fbb32df34db9b1cd6d643f2" +checksum = "cf9f1e950e0d9d1d3c47184416723cf29c0d1f93bd8cccf37e4beb6b44f31710" dependencies = [ "bytes", "futures-channel", diff --git a/rpxy-lib/Cargo.toml b/rpxy-lib/Cargo.toml index 2457bfc..72b3541 100644 --- a/rpxy-lib/Cargo.toml +++ b/rpxy-lib/Cargo.toml @@ -61,7 +61,7 @@ thiserror = "2.0.12" http = "1.3.1" http-body-util = "0.1.3" hyper = { version = "1.6.0", default-features = false } -hyper-util = { version = "0.1.11", features = ["full"] } +hyper-util = { version = "0.1.12", features = ["full"] } futures-util = { version = "0.3.31", default-features = false } futures-channel = { version = "0.3.31", default-features = false } From 8b10a182fc00baef47395dae31d6b76fcca52e52 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Tue, 20 May 2025 12:00:30 +0900 Subject: [PATCH 127/142] lock --- Cargo.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 44ae3e4..3103f71 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -412,9 +412,9 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "cc" -version = "1.2.22" +version = "1.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32db95edf998450acc7881c932f94cd9b05c87b4b2599e8bab064753da4acfd1" +checksum = "5f4ac86a9e5bc1e2b3449ab9d7d3a6a405e3d1bb28d7b9be8614f55846ae3766" dependencies = [ "jobserver", "libc", @@ -1302,9 +1302,9 @@ checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" [[package]] name = "icu_properties" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2549ca8c7241c82f59c80ba2a6f415d931c5b58d24fb8412caa1a1f02c49139a" +checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" dependencies = [ "displaydoc", "icu_collections", @@ -1318,9 +1318,9 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8197e866e47b68f8f7d95249e172903bec06004b18b2937f1095d40a0c57de04" +checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" [[package]] name = "icu_provider" @@ -3334,9 +3334,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.61.1" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46ec44dc15085cea82cf9c78f85a9114c463a369786585ad2882d1ff0b0acf40" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ "windows-implement", "windows-interface", @@ -3375,18 +3375,18 @@ checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" [[package]] name = "windows-result" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b895b5356fc36103d0f64dd1e94dfa7ac5633f1c9dd6e80fe9ec4adef69e09d" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" dependencies = [ "windows-link", ] [[package]] name = "windows-strings" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a7ab927b2637c19b3dbe0965e75d8f2d30bdd697a1516191cad2ec4df8fb28a" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" dependencies = [ "windows-link", ] From f3e5c478f198f501f503fb03f942021fa3784189 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Tue, 20 May 2025 21:09:20 +0900 Subject: [PATCH 128/142] refactor --- rpxy-bin/src/config/parse.rs | 136 ++++++++++++++++------------------- rpxy-bin/src/config/toml.rs | 82 ++++++++++++++++++++- rpxy-bin/src/constants.rs | 5 +- rpxy-bin/src/log.rs | 105 ++++++++++++++------------- rpxy-bin/src/main.rs | 3 +- 5 files changed, 200 insertions(+), 131 deletions(-) diff --git a/rpxy-bin/src/config/parse.rs b/rpxy-bin/src/config/parse.rs index 219abb1..d139354 100644 --- a/rpxy-bin/src/config/parse.rs +++ b/rpxy-bin/src/config/parse.rs @@ -4,18 +4,26 @@ use ahash::HashMap; use clap::Arg; use hot_reload::{ReloaderReceiver, ReloaderService}; use rpxy_certs::{CryptoFileSourceBuilder, CryptoReloader, ServerCryptoBase, build_cert_reloader}; -use rpxy_lib::{AppConfig, AppConfigList, ProxyConfig}; +use rpxy_lib::{AppConfigList, ProxyConfig}; #[cfg(feature = "acme")] use rpxy_acme::{ACME_DIR_URL, ACME_REGISTRY_PATH, AcmeManager}; -/// Parsed options +/// Parsed options from CLI +/// Options for configuring the application. +/// +/// # Fields +/// - `config_file_path`: Path to the configuration file. +/// - `log_dir_path`: Optional path to the log directory. pub struct Opts { pub config_file_path: String, pub log_dir_path: Option, } -/// Parse arg values passed from cli +/// Parses command-line arguments into an [`Opts`](rpxy-bin/src/config/parse.rs:13) struct. +/// +/// Returns a populated [`Opts`](rpxy-bin/src/config/parse.rs:13) on success, or an error if parsing fails. +/// Expects a required `--config` argument and an optional `--log-dir` argument. pub fn parse_opts() -> Result { let _ = include_str!("../../Cargo.toml"); let options = clap::command!() @@ -36,7 +44,6 @@ pub fn parse_opts() -> Result { ); let matches = options.get_matches(); - /////////////////////////////////// let config_file_path = matches.get_one::("config_file").unwrap().to_owned(); let log_dir_path = matches.get_one::("log_dir").map(|v| v.to_owned()); @@ -46,63 +53,45 @@ pub fn parse_opts() -> Result { }) } -pub fn build_settings(config: &ConfigToml) -> std::result::Result<(ProxyConfig, AppConfigList), anyhow::Error> { - // build proxy config - let proxy_config: ProxyConfig = config.try_into()?; +use super::toml::ConfigTomlExt; - // backend_apps - let apps = config.apps.clone().ok_or(anyhow!("Missing application spec"))?; - - // assertions for all backend apps - ensure!(!apps.0.is_empty(), "Wrong application spec."); - // if only https_port is specified, tls must be configured for all apps - if proxy_config.http_port.is_none() { - ensure!( - apps.0.iter().all(|(_, app)| app.tls.is_some()), - "Some apps serves only plaintext HTTP" - ); - } - // https redirection port must be configured only when both http_port and https_port are configured. - if proxy_config.https_redirection_port.is_some() { - ensure!( - proxy_config.https_port.is_some() && proxy_config.http_port.is_some(), - "https_redirection_port can be specified only when both http_port and https_port are specified" - ); - } - // https redirection can be configured if both ports are active - if !(proxy_config.https_port.is_some() && proxy_config.http_port.is_some()) { - ensure!( - apps.0.iter().all(|(_, app)| { - if let Some(tls) = app.tls.as_ref() { - tls.https_redirection.is_none() - } else { - true - } - }), - "https_redirection can be specified only when both http_port and https_port are specified" - ); - } - - // build applications - let mut app_config_list_inner = Vec::::new(); - - for (app_name, app) in apps.0.iter() { - let _server_name_string = app.server_name.as_ref().ok_or(anyhow!("No server name"))?; - let registered_app_name = app_name.to_ascii_lowercase(); - let app_config = app.build_app_config(®istered_app_name)?; - app_config_list_inner.push(app_config); - } - - let app_config_list = AppConfigList { - inner: app_config_list_inner, - default_app: config.default_app.clone().map(|v| v.to_ascii_lowercase()), // default backend application for plaintext http requests - }; - - Ok((proxy_config, app_config_list)) +/// Build proxy and app settings from config using ConfigTomlExt +pub fn build_settings(config: &ConfigToml) -> Result<(ProxyConfig, AppConfigList), anyhow::Error> { + config.validate_and_build_settings() } /* ----------------------- */ + +/// Helper to build a CryptoFileSource for an app, handling ACME if enabled +#[cfg(feature = "acme")] +fn build_tls_for_app_acme( + tls: &mut super::toml::TlsOption, + acme_option: &Option, + server_name: &str, + acme_registry_path: &str, + acme_dir_url: &str, +) -> Result<(), anyhow::Error> { + if let Some(true) = tls.acme { + ensure!(acme_option.is_some() && tls.tls_cert_key_path.is_none() && tls.tls_cert_path.is_none()); + let subdir = format!("{}/{}", acme_registry_path, server_name.to_ascii_lowercase()); + let file_name = + rpxy_acme::DirCache::cached_cert_file_name(&[server_name.to_ascii_lowercase()], acme_dir_url.to_ascii_lowercase()); + let cert_path = format!("{}/{}", subdir, file_name); + tls.tls_cert_key_path = Some(cert_path.clone()); + tls.tls_cert_path = Some(cert_path); + } + Ok(()) +} + /// Build cert map +/// Builds the certificate manager for TLS applications. +/// +/// # Arguments +/// * `config` - Reference to the parsed configuration. +/// +/// # Returns +/// Returns an option containing a tuple of certificate reloader service and receiver, or `None` if TLS is not enabled. +/// Returns an error if configuration is invalid or required fields are missing. pub async fn build_cert_manager( config: &ConfigToml, ) -> Result< @@ -139,19 +128,9 @@ pub async fn build_cert_manager( ensure!(tls.tls_cert_key_path.is_some() && tls.tls_cert_path.is_some()); #[cfg(feature = "acme")] - let tls = { - let mut tls = tls.clone(); - if let Some(true) = tls.acme { - ensure!(acme_option.is_some() && tls.tls_cert_key_path.is_none() && tls.tls_cert_path.is_none()); - // Both of tls_cert_key_path and tls_cert_path must be the same for ACME since it's a single file - let subdir = format!("{}/{}", acme_registry_path, server_name.to_ascii_lowercase()); - let file_name = - rpxy_acme::DirCache::cached_cert_file_name(&[server_name.to_ascii_lowercase()], acme_dir_url.to_ascii_lowercase()); - tls.tls_cert_key_path = Some(format!("{}/{}", subdir, file_name)); - tls.tls_cert_path = Some(format!("{}/{}", subdir, file_name)); - } - tls - }; + let mut tls = tls.clone(); + #[cfg(feature = "acme")] + build_tls_for_app_acme(&mut tls, &acme_option, server_name, acme_registry_path, acme_dir_url)?; let crypto_file_source = CryptoFileSourceBuilder::default() .tls_cert_path(tls.tls_cert_path.as_ref().unwrap()) @@ -168,24 +147,31 @@ pub async fn build_cert_manager( /* ----------------------- */ #[cfg(feature = "acme")] /// Build acme manager +/// Builds the ACME manager for automatic certificate management (enabled with the `acme` feature). +/// +/// # Arguments +/// * `config` - Reference to the parsed configuration. +/// * `runtime_handle` - Tokio runtime handle for async operations. +/// +/// # Returns +/// Returns an option containing an [`AcmeManager`](rpxy-bin/src/config/parse.rs:153) if ACME is configured, or `None` otherwise. +/// Returns an error if configuration is invalid or required fields are missing. pub async fn build_acme_manager( config: &ConfigToml, runtime_handle: tokio::runtime::Handle, ) -> Result, anyhow::Error> { let acme_option = config.experimental.as_ref().and_then(|v| v.acme.clone()); - if acme_option.is_none() { + let Some(acme_option) = acme_option else { return Ok(None); - } - let acme_option = acme_option.unwrap(); + }; - let domains = config + let domains: Vec = config .apps .as_ref() .unwrap() .0 .values() .filter_map(|app| { - // if let Some(tls) = app.tls.as_ref() { if let Some(true) = tls.acme { return Some(app.server_name.as_ref().unwrap().to_owned()); @@ -193,7 +179,7 @@ pub async fn build_acme_manager( } None }) - .collect::>(); + .collect(); if domains.is_empty() { return Ok(None); diff --git a/rpxy-bin/src/config/toml.rs b/rpxy-bin/src/config/toml.rs index b65db91..09c4353 100644 --- a/rpxy-bin/src/config/toml.rs +++ b/rpxy-bin/src/config/toml.rs @@ -4,12 +4,25 @@ use crate::{ log::warn, }; use ahash::HashMap; -use rpxy_lib::{AppConfig, ProxyConfig, ReverseProxyConfig, TlsConfig, UpstreamUri, reexports::Uri}; +use rpxy_lib::{AppConfig, AppConfigList, ProxyConfig, ReverseProxyConfig, TlsConfig, UpstreamUri, reexports::Uri}; use serde::Deserialize; use std::{fs, net::SocketAddr}; use tokio::time::Duration; #[derive(Deserialize, Debug, Default, PartialEq, Eq, Clone)] +/// Main configuration structure parsed from the TOML file. +/// +/// # Fields +/// - `listen_port`: Optional TCP port for HTTP. +/// - `listen_port_tls`: Optional TCP port for HTTPS/TLS. +/// - `listen_ipv6`: Enable IPv6 listening. +/// - `https_redirection_port`: Optional port for HTTP to HTTPS redirection. +/// - `tcp_listen_backlog`: Optional TCP backlog size. +/// - `max_concurrent_streams`: Optional max concurrent streams. +/// - `max_clients`: Optional max client connections. +/// - `apps`: Optional application definitions. +/// - `default_app`: Optional default application name. +/// - `experimental`: Optional experimental features. pub struct ConfigToml { pub listen_port: Option, pub listen_port_tls: Option, @@ -23,8 +36,75 @@ pub struct ConfigToml { pub experimental: Option, } +/// Extension trait for config validation and building +pub trait ConfigTomlExt { + fn validate_and_build_settings(&self) -> Result<(ProxyConfig, AppConfigList), anyhow::Error>; +} + +impl ConfigTomlExt for ConfigToml { + fn validate_and_build_settings(&self) -> Result<(ProxyConfig, AppConfigList), anyhow::Error> { + let proxy_config: ProxyConfig = self.try_into()?; + let apps = self.apps.as_ref().ok_or(anyhow!("Missing application spec"))?; + + // Ensure at least one app is defined + ensure!(!apps.0.is_empty(), "Wrong application spec."); + + // Helper: all apps have TLS + let all_apps_have_tls = apps.0.values().all(|app| app.tls.is_some()); + + // Helper: all apps have https_redirection unset + let all_apps_no_https_redirection = apps.0.values().all(|app| { + if let Some(tls) = app.tls.as_ref() { + tls.https_redirection.is_none() + } else { + true + } + }); + + if proxy_config.http_port.is_none() { + ensure!(all_apps_have_tls, "Some apps serve only plaintext HTTP"); + } + if proxy_config.https_redirection_port.is_some() { + ensure!( + proxy_config.https_port.is_some() && proxy_config.http_port.is_some(), + "https_redirection_port can be specified only when both http_port and https_port are specified" + ); + } + if !(proxy_config.https_port.is_some() && proxy_config.http_port.is_some()) { + ensure!( + all_apps_no_https_redirection, + "https_redirection can be specified only when both http_port and https_port are specified" + ); + } + + // Build AppConfigList + let mut app_config_list_inner = Vec::::new(); + for (app_name, app) in apps.0.iter() { + let _server_name_string = app.server_name.as_ref().ok_or(anyhow!("No server name"))?; + let registered_app_name = app_name.to_ascii_lowercase(); + let app_config = app.build_app_config(®istered_app_name)?; + app_config_list_inner.push(app_config); + } + let app_config_list = AppConfigList { + inner: app_config_list_inner, + default_app: self.default_app.clone().map(|v| v.to_ascii_lowercase()), + }; + + Ok((proxy_config, app_config_list)) + } +} + #[cfg(any(feature = "http3-quinn", feature = "http3-s2n"))] #[derive(Deserialize, Debug, Default, PartialEq, Eq, Clone)] +/// HTTP/3 protocol options for server configuration. +/// +/// # Fields +/// - `alt_svc_max_age`: Optional max age for Alt-Svc header. +/// - `request_max_body_size`: Optional maximum request body size. +/// - `max_concurrent_connections`: Optional maximum concurrent connections. +/// - `max_concurrent_bidistream`: Optional maximum concurrent bidirectional streams. +/// - `max_concurrent_unistream`: Optional maximum concurrent unidirectional streams. +/// - `max_idle_timeout`: Optional maximum idle timeout in milliseconds. pub struct Http3Option { pub alt_svc_max_age: Option, pub request_max_body_size: Option, diff --git a/rpxy-bin/src/constants.rs b/rpxy-bin/src/constants.rs index 889f7d5..51d3f8d 100644 --- a/rpxy-bin/src/constants.rs +++ b/rpxy-bin/src/constants.rs @@ -1,9 +1,12 @@ +/// Default IPv4 listen addresses for the server. pub const LISTEN_ADDRESSES_V4: &[&str] = &["0.0.0.0"]; +/// Default IPv6 listen addresses for the server. pub const LISTEN_ADDRESSES_V6: &[&str] = &["[::]"]; +/// Delay in seconds before reloading the configuration after changes. pub const CONFIG_WATCH_DELAY_SECS: u32 = 15; #[cfg(feature = "cache")] -// Cache directory +/// Directory path for cache storage (enabled with "cache" feature). pub const CACHE_DIR: &str = "./cache"; pub(crate) const ACCESS_LOG_FILE: &str = "access.log"; diff --git a/rpxy-bin/src/log.rs b/rpxy-bin/src/log.rs index d194eb4..29e1993 100644 --- a/rpxy-bin/src/log.rs +++ b/rpxy-bin/src/log.rs @@ -8,92 +8,92 @@ pub use tracing::{debug, error, info, warn}; /// Initialize the logger with the RUST_LOG environment variable. pub fn init_logger(log_dir_path: Option<&str>) { - let level_string = std::env::var("RUST_LOG").unwrap_or_else(|_| "info".to_string()); - let level = tracing::Level::from_str(level_string.as_str()).unwrap_or(tracing::Level::INFO); + let level = std::env::var("RUST_LOG") + .ok() + .and_then(|s| tracing::Level::from_str(&s).ok()) + .unwrap_or(tracing::Level::INFO); match log_dir_path { - // log to stdout None => init_stdio_logger(level), - // log to files - Some(log_dir_path) => init_file_logger(level, log_dir_path), + Some(path) => init_file_logger(level, path), } } /// file logging fn init_file_logger(level: tracing::Level, log_dir_path: &str) { - println!("Activate logging to files: {log_dir_path}"); - let log_dir_path = std::path::PathBuf::from(log_dir_path); - // create the directory if it does not exist - if !log_dir_path.exists() { - println!("Directory does not exist, creating: {}", log_dir_path.display()); - std::fs::create_dir_all(&log_dir_path).expect("Failed to create log directory"); + println!("Activate logging to files: {}", log_dir_path); + let log_dir = std::path::Path::new(log_dir_path); + + if !log_dir.exists() { + println!("Directory does not exist, creating: {}", log_dir.display()); + std::fs::create_dir_all(log_dir).expect("Failed to create log directory"); } - let access_log_path = log_dir_path.join(ACCESS_LOG_FILE); - let system_log_path = log_dir_path.join(SYSTEM_LOG_FILE); + + let access_log_path = log_dir.join(ACCESS_LOG_FILE); + let system_log_path = log_dir.join(SYSTEM_LOG_FILE); + println!("Access log: {}", access_log_path.display()); println!("System and error log: {}", system_log_path.display()); let access_log = open_log_file(&access_log_path); let system_log = open_log_file(&system_log_path); - let reg = tracing_subscriber::registry(); - - let access_log_base = fmt::layer() + let access_layer = fmt::layer() .with_line_number(false) .with_thread_ids(false) .with_thread_names(false) .with_target(false) .with_level(false) .compact() - .with_ansi(false); - let reg = reg.with(access_log_base.with_writer(access_log).with_filter(AccessLogFilter)); + .with_ansi(false) + .with_writer(access_log) + .with_filter(AccessLogFilter); - let system_log_base = fmt::layer() + let system_layer = fmt::layer() .with_line_number(false) .with_thread_ids(false) .with_thread_names(false) .with_target(false) - .with_level(true) // with level for system log + .with_level(true) .compact() - .with_ansi(false); - let reg = reg.with( - system_log_base - .with_writer(system_log) - .with_filter(filter_fn(move |metadata| { - (is_cargo_pkg(metadata) && metadata.name() != log_event_names::ACCESS_LOG && metadata.level() <= &level) - || metadata.level() <= &tracing::Level::WARN.min(level) - })), - ); + .with_ansi(false) + .with_writer(system_log) + .with_filter(filter_fn(move |metadata| { + (is_cargo_pkg(metadata) && metadata.name() != log_event_names::ACCESS_LOG && metadata.level() <= &level) + || metadata.level() <= &tracing::Level::WARN.min(level) + })); - reg.init(); + tracing_subscriber::registry().with(access_layer).with(system_layer).init(); } /// stdio logging fn init_stdio_logger(level: tracing::Level) { - // This limits the logger to emits only this crate with any level above RUST_LOG, for included crates it will emit only ERROR (in prod)/INFO (in dev) or above level. - let stdio_layer = fmt::layer().with_level(true).with_thread_ids(false); - if level <= tracing::Level::INFO { - // in normal deployment environment - let stdio_layer = stdio_layer - .with_target(false) - .compact() - .with_filter(filter_fn(move |metadata| { - (is_cargo_pkg(metadata) && metadata.level() <= &level) || metadata.level() <= &tracing::Level::WARN.min(level) - })); - tracing_subscriber::registry().with(stdio_layer).init(); - } else { - // debugging - let stdio_layer = stdio_layer + // This limits the logger to emit only this crate with any level above RUST_LOG, + // for included crates it will emit only ERROR (in prod)/INFO (in dev) or above level. + let base_layer = fmt::layer().with_level(true).with_thread_ids(false); + + let debug = level > tracing::Level::INFO; + let filter = filter_fn(move |metadata| { + if debug { + (is_cargo_pkg(metadata) && metadata.level() <= &level) || metadata.level() <= &tracing::Level::INFO.min(level) + } else { + (is_cargo_pkg(metadata) && metadata.level() <= &level) || metadata.level() <= &tracing::Level::WARN.min(level) + } + }); + + let stdio_layer = if debug { + base_layer .with_line_number(true) .with_target(true) .with_thread_names(true) .with_target(true) .compact() - .with_filter(filter_fn(move |metadata| { - (is_cargo_pkg(metadata) && metadata.level() <= &level) || metadata.level() <= &tracing::Level::INFO.min(level) - })); - tracing_subscriber::registry().with(stdio_layer).init(); + .with_filter(filter) + } else { + base_layer.with_target(false).compact().with_filter(filter) }; + + tracing_subscriber::registry().with(stdio_layer).init(); } /// Access log filter @@ -110,7 +110,7 @@ fn open_log_file

(path: P) -> std::fs::File where P: AsRef, { - // crate a file if it does not exist + // create a file if it does not exist std::fs::OpenOptions::new() .create(true) .append(true) @@ -119,9 +119,8 @@ where } #[inline] -/// Mached with cargo package name with `_` instead of `-` +/// Matches cargo package name with `_` instead of `-` fn is_cargo_pkg(metadata: &tracing::Metadata<'_>) -> bool { - metadata - .target() - .starts_with(env!("CARGO_PKG_NAME").replace('-', "_").as_str()) + let pkg_name = env!("CARGO_PKG_NAME").replace('-', "_"); + metadata.target().starts_with(&pkg_name) } diff --git a/rpxy-bin/src/main.rs b/rpxy-bin/src/main.rs index 822037d..860a804 100644 --- a/rpxy-bin/src/main.rs +++ b/rpxy-bin/src/main.rs @@ -71,6 +71,7 @@ struct RpxyService { } impl RpxyService { + /// Create a new RpxyService from config and runtime handle. async fn new(config_toml: &ConfigToml, runtime_handle: tokio::runtime::Handle) -> Result { let (proxy_conf, app_conf) = build_settings(config_toml).map_err(|e| anyhow!("Invalid configuration: {e}"))?; @@ -80,7 +81,7 @@ impl RpxyService { .map(|(s, r)| (Some(Arc::new(s)), Some(r))) .unwrap_or((None, None)); - Ok(RpxyService { + Ok(Self { runtime_handle: runtime_handle.clone(), proxy_conf, app_conf, From e0ab2d85fb17ba4d6036fbae2a10374a02fd4f64 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Tue, 20 May 2025 22:04:03 +0900 Subject: [PATCH 129/142] nits: refactor --- rpxy-bin/src/config/parse.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rpxy-bin/src/config/parse.rs b/rpxy-bin/src/config/parse.rs index d139354..aa10795 100644 --- a/rpxy-bin/src/config/parse.rs +++ b/rpxy-bin/src/config/parse.rs @@ -1,4 +1,4 @@ -use super::toml::ConfigToml; +use super::toml::{ConfigToml, ConfigTomlExt}; use crate::error::{anyhow, ensure}; use ahash::HashMap; use clap::Arg; @@ -53,8 +53,6 @@ pub fn parse_opts() -> Result { }) } -use super::toml::ConfigTomlExt; - /// Build proxy and app settings from config using ConfigTomlExt pub fn build_settings(config: &ConfigToml) -> Result<(ProxyConfig, AppConfigList), anyhow::Error> { config.validate_and_build_settings() From 5f7772d95704c5733fe113f133b120300104e7c4 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Tue, 20 May 2025 22:33:06 +0900 Subject: [PATCH 130/142] bench: updated all bench --- bench/README.md | 123 +++++++++++++++------------------ bench/docker-compose.amd64.yml | 9 ++- bench/docker-compose.yml | 1 - bench/sozu-config.toml | 2 +- 4 files changed, 61 insertions(+), 74 deletions(-) diff --git a/bench/README.md b/bench/README.md index a713931..e14bec8 100644 --- a/bench/README.md +++ b/bench/README.md @@ -3,7 +3,7 @@ This test simply measures the performance of several reverse proxy through HTTP/1.1 by the following command using [`rewrk`](https://github.com/lnx-search/rewrk). ```sh: -$ rewrk -c 512 -t 4 -d 15s -h http://localhost:8080 --pct +rewrk -c 512 -t 4 -d 15s -h http://localhost:8080 --pct ``` ## Tests on `linux/arm64/v8` @@ -94,12 +94,12 @@ Benchmarking 512 connections @ http://localhost:8100 for 15 second(s) ## Results on `linux/amd64` -Done at Jul. 24, 2023 +Done at May 20, 2025 ### Environment - `rpxy` commit id: `7c0945a5124418aa9a1024568c1989bb77cf312f` -- Docker Desktop 4.21.1 (114176) +- Docker Desktop 4.41.2 (192736) - ReWrk 0.3.2 and Wrk 0.4.2 - iMac '27 (2020, 10-Core Intel Core i9, 128GB RAM) @@ -107,8 +107,8 @@ The docker images of `nginx` and `caddy` for `linux/amd64` were pulled from the Also, when `Sozu` is configured as an HTTP reverse proxy, it cannot handle HTTP request messages emit from `ReWrk` due to hostname parsing errors though it can correctly handle messages dispatched from `curl` and browsers. So, we additionally test using [`Wrk`](https://github.com/wg/wrk) to examine `Sozu` with the following command. -```sh: -$ wrk -c 512 -t 4 -d 15s http://localhost:8110 +```bash +wrk -c 512 -t 4 -d 15s http://localhost:8110 ```