diff --git a/changelog.md b/changelog.md index c2615af..382978c 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # Changelog +## 2026-03-20 - 25.17.9 - fix(rustproxy-http) +correct HTTP/3 host extraction and avoid protocol filtering during UDP route lookup + +- Use the URI host or strip the port from the Host header so HTTP/3 requests match routes consistently with TCP/HTTP handling. +- Remove protocol filtering from HTTP/3 route lookup because QUIC transport already constrains routing to UDP and protocol validation happens earlier. + ## 2026-03-20 - 25.17.8 - fix(rustproxy) use SNI-based certificate resolution for QUIC TLS connections diff --git a/rust/crates/rustproxy-http/src/h3_service.rs b/rust/crates/rustproxy-http/src/h3_service.rs index a73fb79..1c1d054 100644 --- a/rust/crates/rustproxy-http/src/h3_service.rs +++ b/rust/crates/rustproxy-http/src/h3_service.rs @@ -143,10 +143,11 @@ async fn handle_h3_request( let uri = request.uri().clone(); let path = uri.path().to_string(); - // Extract host from :authority or Host header - let host = request.uri().authority() - .map(|a| a.as_str().to_string()) - .or_else(|| request.headers().get("host").and_then(|v| v.to_str().ok()).map(|s| s.to_string())) + // Extract host from :authority or Host header (strip port to match TCP/HTTP path) + let host = request.uri().host() + .map(|h| h.to_string()) + .or_else(|| request.headers().get("host").and_then(|v| v.to_str().ok()) + .map(|h| h.split(':').next().unwrap_or(h).to_string())) .unwrap_or_default(); debug!("HTTP/3 {} {} (host: {}, client: {})", method, path, host, client_ip); @@ -160,7 +161,8 @@ async fn handle_h3_request( tls_version: Some("TLSv1.3"), headers: None, is_tls: true, - protocol: Some("http"), + protocol: None, // Don't filter on protocol — transport: Udp already excludes TCP routes, + // and the route was already protocol-validated at the QUIC accept level. transport: Some(TransportProtocol::Udp), }; diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index c2fe19a..353fc52 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@push.rocks/smartproxy', - version: '25.17.8', + version: '25.17.9', description: 'A powerful proxy package with unified route-based configuration for high traffic management. Features include SSL/TLS support, flexible routing patterns, WebSocket handling, advanced security options, and automatic ACME certificate management.' }