From 8e3fa48510737914f9eccf6d119d6e97efae1de8 Mon Sep 17 00:00:00 2001 From: Vadim Vetrov Date: Thu, 8 Aug 2024 18:58:21 +0300 Subject: [PATCH] Fix fake sni strategy ttl --- mangle.c | 10 +++++----- youtubeUnblock.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mangle.c b/mangle.c index 524c777..cfd92f2 100644 --- a/mangle.c +++ b/mangle.c @@ -473,11 +473,11 @@ int gen_fake_sni(const struct iphdr *iph, const struct tcphdr *tcph, ntcph->th_dport = tcph->th_dport; ntcph->th_sport = tcph->th_sport; -#if FAKE_SNI_STRATEGY == FKSN_STRAT_TTL - ntcph->ack = tcph->ack; - ntcph->ack_seq = tcph->ack_seq; - niph->ttl = FAKE_SNI_TTL; -#endif + if (config.fake_sni_strategy == FKSN_STRAT_TTL) { + ntcph->seq = tcph->seq; + ntcph->ack_seq = tcph->ack_seq; + niph->ttl = config.fake_sni_ttl; + } #endif diff --git a/youtubeUnblock.c b/youtubeUnblock.c index 015608a..118553b 100644 --- a/youtubeUnblock.c +++ b/youtubeUnblock.c @@ -517,7 +517,7 @@ static int process_packet(const struct packet_data packet, struct queue_data qda if (dlen > 1480) { if (config.verbose) - fprintf(stderr, "WARNING! Google video packet is too big and may cause issues!\n"); + fprintf(stderr, "WARNING! Client Hello packet is too big and may cause issues!\n"); } uint8_t frag1[MNL_SOCKET_BUFFER_SIZE];