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

nfqws2: change retransmission detection scheme

This commit is contained in:
bol-van
2025-12-08 16:46:04 +03:00
parent 146ab847df
commit 2017889207
11 changed files with 74 additions and 53 deletions

View File

@@ -88,15 +88,11 @@ function standard_failure_detector(desync, crec, options)
local trigger = false
if desync.outgoing then
if #desync.dis.payload>0 and options.retrans and (crec.retrans or 0)<options.retrans then
if not crec.uppos then crec.uppos=0 end
if desync.track.tcp.pos_orig<=crec.uppos then
if is_retransmission(desync) then
crec.retrans = crec.retrans and (crec.retrans+1) or 1
DLOG("standard_failure_detector: retransmission "..crec.retrans.."/"..options.retrans)
trigger = crec.retrans>=options.retrans
end
if desync.track.tcp.pos_orig>crec.uppos then
crec.uppos=desync.track.tcp.pos_orig
end
end
else
if options.seq_rst and bitand(desync.dis.tcp.th_flags, TH_RST)~=0 then
@@ -171,7 +167,6 @@ function circular(ctx, desync)
if not desync.dis.tcp then
DLOG_ERR("circular: this orchestrator is tcp only. use filters to avoid udp traffic.")
instance_cutoff(ctx)
return
end
if not desync.track then