Limit HTTP request header size in HTTP and mixed inbounds

This commit is contained in:
世界
2026-11-27 21:18:25 +08:00
parent 593b9b2e6b
commit 5c03f548d5
4 changed files with 6 additions and 8 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
package http
import (
std_bufio "bufio"
"context"
"net"
@@ -95,7 +94,7 @@ func (h *Inbound) NewConnection(ctx context.Context, conn net.Conn, metadata ada
}
conn = tlsConn
}
err := http.HandleConnectionEx(ctx, conn, std_bufio.NewReader(conn), h.authenticator, adapter.NewUpstreamHandler(metadata, h.newUserConnection, h.streamUserPacketConnection), metadata.Source, onClose)
err := http.HandleConnectionEx(ctx, conn, http.NewReader(conn), h.authenticator, adapter.NewUpstreamHandler(metadata, h.newUserConnection, h.streamUserPacketConnection), metadata.Source, onClose)
if err != nil {
conn.Close()
if onClose != nil {