dhtp custom script fixes

This commit is contained in:
bol-van 2023-09-06 13:50:41 +03:00
parent 115ce193ed
commit fb8eb1befd
2 changed files with 12 additions and 9 deletions

View File

@ -1,5 +1,5 @@
# this custom script in addition to MODE=nfqws runs desync to DHT packets with udp payload length 101..399 , without ipset/hostlist filtering # this custom script in addition to MODE=nfqws runs desync to DHT packets with udp payload length 101..399 , without ipset/hostlist filtering
# need to add to config : "NFQWS_OPT_DESYNC_DHT="--dpi-desync=fake --dpi-desync-any-protocol --dpi-desync-cutoff=d2 --dpi-desync-ttl=5" # need to add to config : NFQWS_OPT_DESYNC_DHT="--dpi-desync=fake --dpi-desync-any-protocol --dpi-desync-cutoff=d2 --dpi-desync-ttl=5"
QNUM2=$(($QNUM+20)) QNUM2=$(($QNUM+20))
@ -20,15 +20,16 @@ zapret_custom_firewall()
# $1 - 1 - run, 0 - stop # $1 - 1 - run, 0 - stop
local MODE_OVERRIDE=nfqws local MODE_OVERRIDE=nfqws
local f local f uf4 uf6
local first_packet_only="-m connbytes --connbytes-dir=original --connbytes-mode=packets --connbytes 1:1" local first_packet_only="-m connbytes --connbytes-dir=original --connbytes-mode=packets --connbytes 1:1"
local desync="-m mark ! --mark $DESYNC_MARK/$DESYNC_MARK" local desync="-m mark ! --mark $DESYNC_MARK/$DESYNC_MARK"
zapret_do_firewall_rules_ipt $1 zapret_do_firewall_rules_ipt $1
f="-p udp -m length --length 109:407" f='-p udp -m length --length 109:407 -m u32 --u32'
fw_nfqws_post $1 "$f $desync $first_packets_only" "$f $desync $first_packets_only" $QNUM2 uf4='0>>22&0x3C@8>>16=0x6431'
uf6='48>>16=0x6431'
fw_nfqws_post $1 "$f $uf4 $desync $first_packet_only" "$f $uf6 $desync $first_packet_only" $QNUM2
} }
zapret_custom_firewall_nft() zapret_custom_firewall_nft()
{ {

View File

@ -1,5 +1,5 @@
# this custom script in addition to MODE=nfqws runs desync to DHT packets with udp payload length 101..399 , without ipset/hostlist filtering # this custom script in addition to MODE=nfqws runs desync to DHT packets with udp payload length 101..399 , without ipset/hostlist filtering
# need to add to config : "NFQWS_OPT_DESYNC_DHT="--dpi-desync=fake --dpi-desync-any-protocol --dpi-desync-cutoff=d2 --dpi-desync-ttl=5" # need to add to config : NFQWS_OPT_DESYNC_DHT="--dpi-desync=fake --dpi-desync-any-protocol --dpi-desync-cutoff=d2 --dpi-desync-ttl=5"
QNUM2=$(($QNUM+20)) QNUM2=$(($QNUM+20))
@ -20,14 +20,16 @@ zapret_custom_firewall()
# $1 - 1 - run, 0 - stop # $1 - 1 - run, 0 - stop
local MODE_OVERRIDE=nfqws local MODE_OVERRIDE=nfqws
local f local f uf4 uf6
local first_packet_only="-m connbytes --connbytes-dir=original --connbytes-mode=packets --connbytes 1:1" local first_packet_only="-m connbytes --connbytes-dir=original --connbytes-mode=packets --connbytes 1:1"
local desync="-m mark ! --mark $DESYNC_MARK/$DESYNC_MARK" local desync="-m mark ! --mark $DESYNC_MARK/$DESYNC_MARK"
zapret_do_firewall_rules_ipt $1 zapret_do_firewall_rules_ipt $1
f="-p udp -m length --length 109:407" f='-p udp -m length --length 109:407 -m u32 --u32'
fw_nfqws_post $1 "$f $desync $first_packets_only" "$f $desync $first_packets_only" $QNUM2 uf4='0>>22&0x3C@8>>16=0x6431'
uf6='48>>16=0x6431'
fw_nfqws_post $1 "$f $uf4 $desync $first_packet_only" "$f $uf6 $desync $first_packet_only" $QNUM2
} }
zapret_custom_firewall_nft() zapret_custom_firewall_nft()