Skip to content

Commit 6821093

Browse files
author
bol-van
committed
50-quic4all
1 parent 0dea2d6 commit 6821093

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

docs/changes.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,3 +559,5 @@ blockcheck: curl test simulation : SIMULATE=1
559559
v72.1
560560

561561
nfqws: --ip-id=seq|seqgroup|rnd|zero
562+
blockcheck: MIN_AUTOTTL_DELTA,MAX_AUTOTTL_DELTA
563+
init.d: 50-quic4all custom
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# this custom script runs desync to all IETF QUIC initials
2+
# NOTE: @ih requires nft 1.0.1+ and updated kernel version. it's confirmed to work on 5.15 (openwrt 23) and not work on 5.10 (openwrt 22)
3+
4+
# can override in config :
5+
NFQWS_OPT_DESYNC_QUIC="${NFQWS_OPT_DESYNC_QUIC:---dpi-desync=fake --dpi-desync-repeats=2}"
6+
7+
alloc_dnum DNUM_QUIC4ALL
8+
alloc_qnum QNUM_QUIC4ALL
9+
10+
zapret_custom_daemons()
11+
{
12+
# $1 - 1 - add, 0 - stop
13+
14+
local opt="--qnum=$QNUM_QUIC4ALL $NFQWS_OPT_DESYNC_QUIC"
15+
do_nfqws $1 $DNUM_QUIC4ALL "$opt"
16+
}
17+
# size = 156 (8 udp header + 148 payload) && payload starts with 0x01000000
18+
zapret_custom_firewall()
19+
{
20+
# $1 - 1 - run, 0 - stop
21+
22+
local f='-p udp -m u32 --u32'
23+
fw_nfqws_post $1 "$f 0>>22&0x3C@4>>16=264:65535&&0>>22&0x3C@8>>28=0xC&&0>>22&0x3C@9=0x00000001" "$f 44>>16=264:65535&&48>>28=0xC&&49=0x00000001" $QNUM_QUIC4ALL
24+
}
25+
zapret_custom_firewall_nft()
26+
{
27+
# stop logic is not required
28+
29+
local f="udp length >= 264 @ih,0,4 0xC @ih,8,32 0x00000001"
30+
nft_fw_nfqws_post "$f" "$f" $QNUM_QUIC4ALL
31+
}

0 commit comments

Comments
 (0)