diff --git a/Cargo.lock b/Cargo.lock index 8bae735..e0ab8a1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -997,9 +997,9 @@ dependencies = [ [[package]] name = "h3" -version = "0.0.7" +version = "0.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dfb059a4f28a66f186ed16ad912d142f490676acba59353831d7cb45a96b0d3" +checksum = "10872b55cfb02a821b69dc7cf8dc6a71d6af25eb9a79662bec4a9d016056b3be" dependencies = [ "bytes", "fastrand", @@ -1012,9 +1012,9 @@ 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", 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/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(); 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