From 4923ac7bc536d938e9778482f50c021916aac929 Mon Sep 17 00:00:00 2001 From: bol-van Date: Thu, 27 Nov 2025 21:33:03 +0300 Subject: [PATCH] replace ip6_hopbyhop_x2 to ip6_hopbyhop2 --- lua/zapret-antidpi.lua | 3 ++- lua/zapret-lib.lua | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lua/zapret-antidpi.lua b/lua/zapret-antidpi.lua index 38fa0a8..c7dfc63 100644 --- a/lua/zapret-antidpi.lua +++ b/lua/zapret-antidpi.lua @@ -25,8 +25,9 @@ standard fooling : * ip6_autottl=delta,min-max - set ip.ip_ttl to auto discovered ttl * ip6_hopbyhop[=hex] - add hopbyhop ipv6 header with optional data. data size must be 6+N*8. all zero by default. -* ip6_hopbyhop2[=hex] - add 2 hopbyhop ipv6 headers with optional data. data size must be 6+N*8. all zero by default. +* ip6_hopbyhop2[=hex] - add second hopbyhop ipv6 header with optional data. data size must be 6+N*8. all zero by default. * ip6_destopt[=hex] - add destopt ipv6 header with optional data. data size must be 6+N*8. all zero by default. +* ip6_destopt2[=hex] - add second destopt ipv6 header with optional data. data size must be 6+N*8. all zero by default. * ip6_routing[=hex] - add routing ipv6 header with optional data. data size must be 6+N*8. all zero by default. * ip6_ah[=hex] - add authentication ipv6 header with optional data. data size must be 6+N*4. 0000 + 4 random bytes by default. diff --git a/lua/zapret-lib.lua b/lua/zapret-lib.lua index 6c74541..84c429e 100644 --- a/lua/zapret-lib.lua +++ b/lua/zapret-lib.lua @@ -448,7 +448,7 @@ end -- ip6_autottl=delta,min-max - set ip.ip_ttl to auto discovered ttl -- ip6_hopbyhop[=hex] - add hopbyhop ipv6 header with optional data. data size must be 6+N*8. all zero by default. --- ip6_hopbyhop2 - add 2 hopbyhop ipv6 headers with optional data. data size must be 6+N*8. all zero by default. +-- ip6_hopbyhop2[=hex] - add second hopbyhop ipv6 header with optional data. data size must be 6+N*8. all zero by default. -- ip6_destopt[=hex] - add destopt ipv6 header with optional data. data size must be 6+N*8. all zero by default. -- ip6_routing[=hex] - add routing ipv6 header with optional data. data size must be 6+N*8. all zero by default. -- ip6_ah[=hex] - add authentication ipv6 header with optional data. data size must be 6+N*4. 0000 + 4 random bytes by default. @@ -541,14 +541,14 @@ function apply_fooling(desync, dis, fooling_options) end if dis.ip6 then local bin - if fooling_options.ip6_hopbyhop_x2 then - bin = prepare_bin(fooling_options.ip6_hopbyhop2_x2,"\x00\x00\x00\x00\x00\x00") - insert_ip6_exthdr(dis.ip6,nil,IPPROTO_HOPOPTS,bin) - insert_ip6_exthdr(dis.ip6,nil,IPPROTO_HOPOPTS,bin) - elseif fooling_options.ip6_hopbyhop then + if fooling_options.ip6_hopbyhop then bin = prepare_bin(fooling_options.ip6_hopbyhop,"\x00\x00\x00\x00\x00\x00") insert_ip6_exthdr(dis.ip6,nil,IPPROTO_HOPOPTS,bin) end + if fooling_options.ip6_hopbyhop2 then + bin = prepare_bin(fooling_options.ip6_hopbyhop2,"\x00\x00\x00\x00\x00\x00") + insert_ip6_exthdr(dis.ip6,nil,IPPROTO_HOPOPTS,bin) + end -- for possible unfragmentable part if fooling_options.ip6_destopt then bin = prepare_bin(fooling_options.ip6_destopt,"\x00\x00\x00\x00\x00\x00")