major config re-think and re-write

This commit is contained in:
bol-van
2024-10-25 14:29:47 +03:00
parent d86aa42f48
commit 906e67af55
39 changed files with 963 additions and 1340 deletions

View File

@@ -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()