2024-10-12 12:33:06 +03:00
|
|
|
# this custom script runs desync to all QUIC initial packets, without ipset/hostlist filtering
|
2022-03-20 20:46:39 +03:00
|
|
|
# need to add to config : NFQWS_OPT_DESYNC_QUIC="--dpi-desync=fake"
|
2022-03-04 19:41:34 +03:00
|
|
|
# NOTE : do not use TTL fooling. chromium QUIC engine breaks sessions if TTL expired in transit received
|
|
|
|
|
2024-10-12 12:33:06 +03:00
|
|
|
DNUM=102
|
|
|
|
QNUM2=$(($DNUM * 5))
|
2022-03-04 19:41:34 +03:00
|
|
|
|
|
|
|
zapret_custom_daemons()
|
|
|
|
{
|
|
|
|
# $1 - 1 - run, 0 - stop
|
|
|
|
|
2024-10-12 12:33:06 +03:00
|
|
|
local opt="--qnum=$QNUM2 $NFQWS_OPT_BASE $NFQWS_OPT_DESYNC_QUIC"
|
|
|
|
run_daemon $DNUM $NFQWS "$opt"
|
2022-03-04 19:41:34 +03:00
|
|
|
}
|
|
|
|
zapret_custom_firewall()
|
|
|
|
{
|
|
|
|
# $1 - 1 - run, 0 - stop
|
|
|
|
|
|
|
|
local f
|
2024-03-02 17:53:37 +03:00
|
|
|
local first_packets_only="$ipt_connbytes 1:3"
|
2022-03-04 19:41:34 +03:00
|
|
|
local desync="-m mark ! --mark $DESYNC_MARK/$DESYNC_MARK"
|
|
|
|
|
2023-12-13 17:10:56 +03:00
|
|
|
f="-p udp -m multiport --dports $QUIC_PORTS_IPT"
|
2022-03-04 19:41:34 +03:00
|
|
|
fw_nfqws_post $1 "$f $desync $first_packets_only" "$f $desync $first_packets_only" $QNUM2
|
|
|
|
|
|
|
|
}
|
|
|
|
zapret_custom_firewall_nft()
|
|
|
|
{
|
|
|
|
# stop logic is not required
|
|
|
|
|
|
|
|
local f
|
2024-03-02 17:53:37 +03:00
|
|
|
local first_packets_only="$nft_connbytes 1-3"
|
2022-03-04 19:41:34 +03:00
|
|
|
local desync="mark and $DESYNC_MARK == 0"
|
|
|
|
|
2023-12-13 17:10:56 +03:00
|
|
|
f="udp dport {$QUIC_PORTS}"
|
2022-06-03 10:35:11 +03:00
|
|
|
nft_fw_nfqws_post "$f $desync $first_packets_only" "$f $desync $first_packets_only" $QNUM2
|
2022-03-04 19:41:34 +03:00
|
|
|
}
|