From 2d0860603fd3e18350c64ea451de992011536c18 Mon Sep 17 00:00:00 2001 From: Oniicyan <130678414+Oniicyan@users.noreply.github.com> Date: Sun, 10 Nov 2024 14:11:26 +0800 Subject: [PATCH] Update stun_bt_natmap.sh --- stun_bt_natmap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stun_bt_natmap.sh b/stun_bt_natmap.sh index 2b8e812..9d6d4e7 100644 --- a/stun_bt_natmap.sh +++ b/stun_bt_natmap.sh @@ -102,7 +102,7 @@ nft insert rule ip STUN BTTR_UDP $OIFNAME ip saddr $APPADDR @ih,64,32 1 @ih,768, # Tracker 流量需绕过软件加速 # 仅检测 OpenWrt fw4 的软件加速,其他加速请自行解决 if uci show firewall 2>&1 | grep "flow_offloading='1'" >/dev/null; then - CTMARK=$RANDOM$RANDOM + CTMARK=$(echo $APPADDR | awk -F . '{print$NF}')$APPPORT nft add chain ip STUN BTTR_NOFT { type filter hook forward priority filter - 5 \; } nft delete rule ip STUN BTTR_NOFT handle $(nft -a list chain ip STUN BTTR_NOFT 2>/dev/null | grep \"$OWNNAME\" | grep '@BTTR_HTTP' | awk '{print$NF}') 2>/dev/null nft delete rule ip STUN BTTR_NOFT handle $(nft -a list chain ip STUN BTTR_NOFT 2>/dev/null | grep \"$OWNNAME\" | grep '@BTTR_UDP' | awk '{print$NF}') 2>/dev/null