From bb604f111c2b83244fe5121a92c9fb38da1615dd Mon Sep 17 00:00:00 2001 From: bol-van Date: Tue, 9 Dec 2025 11:22:09 +0300 Subject: [PATCH] zapret-auto: add comments --- lua/zapret-auto.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/zapret-auto.lua b/lua/zapret-auto.lua index 0ea49bb..6586ed7 100644 --- a/lua/zapret-auto.lua +++ b/lua/zapret-auto.lua @@ -280,6 +280,7 @@ end -- for example, this can be used by custom protocol detectors -- arg: iff - condition function. takes desync as arg and returns bool. (cant use 'if' because of reserved word) -- arg: neg - invert condition function result +-- test case : nfqws2 --qnum 200 --debug --lua-init=@zapret-lib.lua --lua-init=@zapret-auto.lua --lua-desync=condition:iff=cond_random --lua-desync=argdebug:testarg=1 --lua-desync=argdebug:testarg=2:morearg=xyz function condition(ctx, desync) require_iff(desync, "condition") orchestrate(ctx, desync) @@ -295,6 +296,7 @@ end -- can be used with other orchestrators to stop execution conditionally -- arg: iff - condition function. takes desync as arg and returns bool. (cant use 'if' because of reserved word) -- arg: neg - invert condition function result +-- test case : nfqws2 --qnum 200 --debug --lua-init=@zapret-lib.lua --lua-init=@zapret-auto.lua --in-range=-s1 --lua-desync=circular --lua-desync=stopif:iff=cond_random:strategy=1 --lua-desync=argdebug:strategy=1 --lua-desync=argdebug:strategy=2 function stopif(ctx, desync) require_iff(desync, "stopif") orchestrate(ctx, desync)