From 991c87d10d603816fb1912d6289f4cc1047343be Mon Sep 17 00:00:00 2001 From: Oniicyan <130678414+Oniicyan@users.noreply.github.com> Date: Sat, 17 Aug 2024 03:29:36 +0800 Subject: [PATCH] Update stun_bt_lucky.sh --- stun_bt_lucky.sh | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/stun_bt_lucky.sh b/stun_bt_lucky.sh index 5f5c60d..11ed05f 100644 --- a/stun_bt_lucky.sh +++ b/stun_bt_lucky.sh @@ -188,18 +188,11 @@ SETDNAT() { nft insert rule ip STUN DNAT $IIFNAME $L4PROTO dport $LANPORT counter redirect to :$APPPORT comment "$OWNNAME" ) -case $DNAT in - 1) - 2) - 3) - 4) -esac - case $DNAT in 1) METHOD='nft dnat' ;; - 2) METHOD='nft redirect' ;; - 3) METHOD='UPnP dnat' ;; - 4) METHOD='UPnP redirect' ;; + 2) METHOD='nft redirect' ;; + 3) METHOD='UPnP dnat' ;; + 4) METHOD='UPnP redirect' ;; esac echo -n nftables OK. $METHOD to $APPADDR:$APPPORT$([ -n "$IFNAME" ] && echo @$IFNAME)