From f47ff238de927050f7e1d86f05af5edfacb52b6c Mon Sep 17 00:00:00 2001 From: Zhang Jingqiang Date: Fri, 11 Oct 2024 17:39:21 +0800 Subject: [PATCH] g3proxy: fix detect of h2 extended connect protocol extension --- g3proxy/src/inspect/http/v2/stream.rs | 2 +- lib/g3-http/src/server/transparent.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/g3proxy/src/inspect/http/v2/stream.rs b/g3proxy/src/inspect/http/v2/stream.rs index 4f3c71b75..8e7ff2a3f 100644 --- a/g3proxy/src/inspect/http/v2/stream.rs +++ b/g3proxy/src/inspect/http/v2/stream.rs @@ -18,11 +18,11 @@ use std::str::FromStr; use bytes::Bytes; use h2::client::SendRequest; +use h2::ext::Protocol; use h2::server::SendResponse; use h2::RecvStream; use http::{Method, Request}; -use g3_dpi::Protocol; use g3_types::net::HttpUpgradeToken; use super::{H2ConnectTask, H2ExtendedConnectTask, H2ForwardTask}; diff --git a/lib/g3-http/src/server/transparent.rs b/lib/g3-http/src/server/transparent.rs index 882731230..6c1fe35d4 100644 --- a/lib/g3-http/src/server/transparent.rs +++ b/lib/g3-http/src/server/transparent.rs @@ -263,7 +263,7 @@ impl HttpTransparentRequest { } "upgrade" => { self.connection_upgrade = true; - self.extra_connection_headers.push(http::header::UPGRADE); + self.extra_connection_headers.push(header::UPGRADE); } s => { if let Ok(h) = HeaderName::from_str(s) {