From ea27408a3384a7f33b5d1cb49ec592cf76942be6 Mon Sep 17 00:00:00 2001 From: a Date: Tue, 1 Oct 2024 17:46:51 -0500 Subject: [PATCH] Increase prefetch buffer max size (#248) --- layer4/connection.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layer4/connection.go b/layer4/connection.go index cff1795..e5c793f 100644 --- a/layer4/connection.go +++ b/layer4/connection.go @@ -227,7 +227,8 @@ var ( listenerCtxKey caddy.CtxKey = "listener" ) -const prefetchChunkSize = 1024 +// the prefetch chunk size is a very large 2kb, in order to completely fetch the ~1.7kb X25519Kyber768Draft00 based TLS ClientHello. https://pq.cloudflareresearch.com/ +const prefetchChunkSize = 2048 // MaxMatchingBytes is the amount of bytes that are at most prefetched during matching. // This is probably most relevant for the http matcher since http requests do not have a size limit.