mirror of
https://github.com/SunBK201/UA3F.git
synced 2025-12-16 16:57:08 +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 [ "$SERVER_MODE" = "TPROXY" ]; then
|
||||
if opkg list-installed kmod-nft-tproxy | grep -q 'kmod-nft-tproxy'; then
|
||||
if nft_available; then
|
||||
FW_BACKEND="nft"
|
||||
return 0
|
||||
fi
|
||||
else
|
||||
FW_BACKEND="ipt"
|
||||
return 0
|
||||
fi
|
||||
elif [ "$SERVER_MODE" = "NFQUEUE" ]; then
|
||||
if opkg list-installed kmod-nft-queue | grep -q 'kmod-nft-queue'; then
|
||||
if nft_available; then
|
||||
FW_BACKEND="nft"
|
||||
return 0
|
||||
fi
|
||||
else
|
||||
FW_BACKEND="ipt"
|
||||
return 0
|
||||
|
||||
Loading…
Reference in New Issue
Block a user