Skip to content

Commit 60dd3cb

Browse files
committed
Make ClientHello ignore --max-payload limits
Receive TLS ClientHello despite max-payload limit set, to get all the benefits of the option (decreased CPU consumption) but still handle all TLS connections, including Kyber.
1 parent d031ae6 commit 60dd3cb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/goodbyedpi.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,10 @@ static void add_ip_id_str(int id) {
221221
static void add_maxpayloadsize_str(unsigned short maxpayload) {
222222
char *newstr;
223223
/* 0x47455420 is "GET ", 0x504F5354 is "POST", big endian. */
224-
const char *maxpayloadsize_str = "and (tcp.PayloadLength ? tcp.PayloadLength < %hu or tcp.Payload32[0] == 0x47455420 or tcp.Payload32[0] == 0x504F5354 : true)";
224+
const char *maxpayloadsize_str =
225+
"and (tcp.PayloadLength ? tcp.PayloadLength < %hu " \
226+
"or tcp.Payload32[0] == 0x47455420 or tcp.Payload32[0] == 0x504F5354 " \
227+
"or (tcp.Payload[0] == 0x16 and tcp.Payload[1] == 0x03 and tcp.Payload[2] <= 0x03): true)";
225228
char *addfilter = malloc(strlen(maxpayloadsize_str) + 16);
226229

227230
sprintf(addfilter, maxpayloadsize_str, maxpayload);

0 commit comments

Comments
 (0)