mirror of
https://github.com/bol-van/zapret.git
synced 2025-05-24 22:32:58 +03:00
major config re-think and re-write
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# this custom script in addition to MODE=nfqws runs desync of some udp packets to discord subnets
|
||||
# this custom script runs desync of some udp packets to discord subnets
|
||||
# idea taken from community. not tested and not optimized by author.
|
||||
|
||||
# can override in config :
|
||||
@@ -24,7 +24,6 @@ zapret_custom_firewall()
|
||||
|
||||
local f
|
||||
local first_packets_only="$ipt_connbytes 1:3"
|
||||
local desync="-m mark ! --mark $DESYNC_MARK/$DESYNC_MARK"
|
||||
local DISCORD_PORTS_IPT=$(replace_char - : $DISCORD_PORTS)
|
||||
local dest_set="-m set --match-set $DISCORD_SET_NAME dst"
|
||||
local subnet
|
||||
@@ -40,7 +39,7 @@ zapret_custom_firewall()
|
||||
}
|
||||
|
||||
f="-p udp -m multiport --dports $DISCORD_PORTS_IPT"
|
||||
fw_nfqws_post $1 "$f $desync $first_packets_only $dest_set" "" $QNUM_DISCORD
|
||||
fw_nfqws_post $1 "$f $first_packets_only $dest_set" "" $QNUM_DISCORD
|
||||
|
||||
[ "$1" = 1 ] || {
|
||||
ipset destroy $DISCORD_SET_NAME 2>/dev/null
|
||||
@@ -53,7 +52,6 @@ zapret_custom_firewall_nft()
|
||||
|
||||
local f
|
||||
local first_packets_only="$nft_connbytes 1-3"
|
||||
local desync="mark and $DESYNC_MARK == 0"
|
||||
local dest_set="ip daddr @$DISCORD_SET_NAME"
|
||||
local subnets
|
||||
|
||||
@@ -65,7 +63,7 @@ zapret_custom_firewall_nft()
|
||||
nft_add_set_element $DISCORD_SET_NAME "$subnets"
|
||||
|
||||
f="udp dport {$DISCORD_PORTS}"
|
||||
nft_fw_nfqws_post "$f $desync $first_packets_only $dest_set" "" $QNUM_DISCORD
|
||||
nft_fw_nfqws_post "$f $first_packets_only $dest_set" "" $QNUM_DISCORD
|
||||
}
|
||||
|
||||
zapret_custom_firewall_nft_flush()
|
||||
|
Reference in New Issue
Block a user