mirror of
https://github.com/bol-van/zapret.git
synced 2025-08-10 01:02:03 +03:00
shellcheck
linting and formatting shell scripts
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
# 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-ttl=5"
|
||||
|
||||
QNUM2=$(($QNUM+20))
|
||||
QNUM2=$(($QNUM + 20))
|
||||
|
||||
zapret_custom_daemons()
|
||||
{
|
||||
zapret_custom_daemons() {
|
||||
# stop logic is managed by procd
|
||||
|
||||
local MODE_OVERRIDE=nfqws
|
||||
@@ -13,10 +12,9 @@ zapret_custom_daemons()
|
||||
start_daemons_procd
|
||||
|
||||
opt="--qnum=$QNUM2 $NFQWS_OPT_BASE $NFQWS_OPT_DESYNC_DHT"
|
||||
run_daemon 100 $NFQWS "$opt"
|
||||
run_daemon 100 "$NFQWS" "$opt"
|
||||
}
|
||||
zapret_custom_firewall()
|
||||
{
|
||||
zapret_custom_firewall() {
|
||||
# $1 - 1 - run, 0 - stop
|
||||
|
||||
local MODE_OVERRIDE=nfqws
|
||||
@@ -24,15 +22,14 @@ zapret_custom_firewall()
|
||||
local first_packet_only="$ipt_connbytes 1:1"
|
||||
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 -m u32 --u32'
|
||||
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
|
||||
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() {
|
||||
# stop logic is not required
|
||||
|
||||
local MODE_OVERRIDE=nfqws
|
||||
|
Reference in New Issue
Block a user