fix: raise max_headers in ws handshake to 128 (#2366)

This commit is contained in:
Luna Yao
2026-06-21 15:54:07 +02:00
committed by GitHub
parent 5efbc8587f
commit 5ea6766238
3 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ rustls = { version = "0.23.0", features = [
rcgen = { version = "0.12.1", optional = true }
# for websocket
tokio-websockets = { version = "0.13.2", optional = true, features = [
tokio-websockets = { version = "0.13.2", git = "https://github.com/EasyTier/tokio-websockets", optional = true, features = [
"rustls-webpki-roots",
"client",
"server",
+3 -1
View File
@@ -118,6 +118,7 @@ impl WsTunnelListener {
let (request, stream) = ServerBuilder::new()
.limits(Limits::unlimited())
.max_headers(128)
.accept(stream)
.await?;
@@ -252,7 +253,8 @@ impl WsTunnelConnector {
),
};
let c = ClientBuilder::from_uri(http::Uri::try_from(addr.to_string()).unwrap());
let c = ClientBuilder::from_uri(http::Uri::try_from(addr.to_string()).unwrap())
.max_headers(128);
let stream: MaybeTlsStream<TcpStream> = if is_wss {
init_crypto_provider();
let tls_conn =