Template
1
0
mirror of https://github.com/bol-van/zapret2.git synced 2026-03-14 06:13:09 +00:00

zapret-antidpi: oob instance cutoff if called not from the very beginning of tcp

This commit is contained in:
bol-van
2026-01-17 19:44:36 +03:00
parent 68435f64ea
commit 5026199f24
4 changed files with 14 additions and 2 deletions

View File

@@ -1067,6 +1067,15 @@ function oob(ctx, desync)
instance_cutoff_shim(ctx, desync)
return
end
local key = desync.func_instance.."_syn"
if not desync.track.lua_state[key] then
if bitand(desync.dis.tcp.th_flags, TH_SYN+TH_ACK)~=TH_SYN then
DLOG("oob: must be applied since the very beginning of the tcp connection - SYN packet")
instance_cutoff_shim(ctx, desync)
return
end
desync.track.lua_state[key] = true
end
if desync.outgoing then
-- direct pos - outgoing
local pos = pos_get(desync, 's', false)