From 8b23ab762da9039e22456c77cb8a6198fcec1f15 Mon Sep 17 00:00:00 2001 From: Vadim Vetrov Date: Thu, 29 Aug 2024 15:55:05 +0300 Subject: [PATCH] Fix issue with synfake and two youtubeUnblock instances one after another --- mangle.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mangle.c b/mangle.c index 26f4d61..931e00c 100644 --- a/mangle.c +++ b/mangle.c @@ -89,7 +89,7 @@ int process_tcp_packet(const uint8_t *raw_payload, uint32_t raw_payload_len) { goto accept; } - if (tcph->syn && config.synfake) { + if (tcph->syn) { lgtrace_addp("TCP syn alter"); uint8_t payload[MAX_PACKET_SIZE]; memcpy(payload, ipxh, iph_len); @@ -127,6 +127,8 @@ int process_tcp_packet(const uint8_t *raw_payload, uint32_t raw_payload_len) { goto drop; } + if (tcph->syn) goto accept; + struct tls_verdict vrd = analyze_tls_data(data, dlen); if (vrd.target_sni) {