mirror of
https://github.com/SunBK201/UA3F.git
synced 2025-12-18 09:46:58 +00:00
fix: ensure nft backend is only set when available in detect_backend
This commit is contained in:
parent
e995349609
commit
db4888cd0c
@ -136,16 +136,20 @@ detect_backend() {
|
|||||||
if opkg_available; then
|
if opkg_available; then
|
||||||
if [ "$SERVER_MODE" = "TPROXY" ]; then
|
if [ "$SERVER_MODE" = "TPROXY" ]; then
|
||||||
if opkg list-installed kmod-nft-tproxy | grep -q 'kmod-nft-tproxy'; then
|
if opkg list-installed kmod-nft-tproxy | grep -q 'kmod-nft-tproxy'; then
|
||||||
|
if nft_available; then
|
||||||
FW_BACKEND="nft"
|
FW_BACKEND="nft"
|
||||||
return 0
|
return 0
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
FW_BACKEND="ipt"
|
FW_BACKEND="ipt"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
elif [ "$SERVER_MODE" = "NFQUEUE" ]; then
|
elif [ "$SERVER_MODE" = "NFQUEUE" ]; then
|
||||||
if opkg list-installed kmod-nft-queue | grep -q 'kmod-nft-queue'; then
|
if opkg list-installed kmod-nft-queue | grep -q 'kmod-nft-queue'; then
|
||||||
|
if nft_available; then
|
||||||
FW_BACKEND="nft"
|
FW_BACKEND="nft"
|
||||||
return 0
|
return 0
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
FW_BACKEND="ipt"
|
FW_BACKEND="ipt"
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user