diff --git a/docs/changes.txt b/docs/changes.txt index 41d0f50..4de7699 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -208,6 +208,6 @@ v0.8.1 * nfqws2: VERDICT_PRESERVE_NEXT * nfqws2: keepsum reconstruct option * nfqws2: more helpers -* zapret-obfs: ippxor, udp2icmp +* zapret-obfs: ippxor, udp2icmp, synhide * nfqws2: LUA_COMPAT_VER=5 * winws2: --wf-raw-filter diff --git a/lua/zapret-obfs.lua b/lua/zapret-obfs.lua index 424aadc..b059321 100644 --- a/lua/zapret-obfs.lua +++ b/lua/zapret-obfs.lua @@ -158,12 +158,12 @@ end -- test case: -- endpoint1: -- --in-range=a --lua-desync=udp2icmp --- nft add rule inet ztest2 post meta mark and 0x40000000 == 0 udp dport 12345 queue num 200 bypass --- nft add rule inet ztest2 pre meta mark and 0x40000000 == 0 meta l4proto "{icmp,icmpv6}" queue num 200 bypass +-- nft add rule inet ztest post meta mark and 0x40000000 == 0 udp dport 12345 queue num 200 bypass +-- nft add rule inet ztest pre meta mark and 0x40000000 == 0 meta l4proto "{icmp,icmpv6}" queue num 200 bypass -- endpoint2: -- --in-range=a --lua-desync=udp2icmp --server --- nft add rule inet ztest2 post meta mark and 0x40000000 == 0 udp sport 12345 queue num 200 bypass --- nft add rule inet ztest2 pre meta mark and 0x40000000 == 0 meta l4proto "{icmp,icmpv6}" queue num 200 bypass +-- nft add rule inet ztest post meta mark and 0x40000000 == 0 udp sport 12345 queue num 200 bypass +-- nft add rule inet ztest pre meta mark and 0x40000000 == 0 meta l4proto "{icmp,icmpv6}" queue num 200 bypass -- packs udp datagram to icmp message without changing packet size -- function keeps icmp identifier as (sport xor dport) to help traverse NAT (it won't help if NAT changes id) -- one end must be in server mode, another - in client mode @@ -256,3 +256,98 @@ function udp2icmp(ctx, desync) return VERDICT_MODIFY end end + +-- test case : +-- client: +-- --in-range="