fix: remove kmod-nft-tproxy dependency

This commit is contained in:
SunBK201 2025-10-30 22:48:45 +08:00
parent 38780a8d21
commit 22efbbc6b8
4 changed files with 15 additions and 5 deletions

View File

@ -1,11 +1,11 @@
Package: ua3f Package: ua3f
Version: 1.0.0-1 Version: 1.0.0-1
Depends: luci-compat, ipset, iptables, kmod-nft-tproxy, iptables-mod-tproxy, iptables-mod-extra, iptables-mod-nat-extra, kmod-ipt-conntrack Depends: luci-compat, ipset, iptables, iptables-mod-tproxy, iptables-mod-extra, iptables-mod-nat-extra, kmod-ipt-conntrack
Source: /feed/openwrt Source: /feed/openwrt
SourceName: UA3F SourceName: UA3F
License: GPL-3.0-only License: GPL-3.0-only
Section: net Section: net
SourceDateEpoch: 1711267200 SourceDateEpoch: 1711267200
Architecture: all Architecture: all
Installed-Size: 3573760 Installed-Size: 4362240
Description: Advanced HTTP User-Agent Rewriting Tool. Description: Advanced HTTP User-Agent Rewriting Tool.

View File

@ -1,11 +1,11 @@
Package: ua3f Package: ua3f
Version: 1.0.0-1 Version: 1.0.0-1
Depends: luci-compat, ipset, iptables, kmod-nft-tproxy, iptables-mod-tproxy, iptables-mod-extra, iptables-mod-nat-extra, kmod-ipt-conntrack Depends: luci-compat, ipset, iptables, iptables-mod-tproxy, iptables-mod-extra, iptables-mod-nat-extra, kmod-ipt-conntrack
Source: /feed/openwrt Source: /feed/openwrt
SourceName: UA3F SourceName: UA3F
License: GPL-3.0-only License: GPL-3.0-only
Section: net Section: net
SourceDateEpoch: 1711267200 SourceDateEpoch: 1711267200
Architecture: all Architecture: all
Installed-Size: 3706880 Installed-Size: 4362240
Description: Advanced HTTP User-Agent Rewriting Tool. Description: Advanced HTTP User-Agent Rewriting Tool.

View File

@ -28,7 +28,7 @@ define Package/ua3f
SUBMENU:=Web Servers/Proxies SUBMENU:=Web Servers/Proxies
TITLE:=A SOCKS5 Server for User-Agent Rewriting TITLE:=A SOCKS5 Server for User-Agent Rewriting
URL:=https://github.com/SunBK201/UA3F URL:=https://github.com/SunBK201/UA3F
DEPENDS:=$(GO_ARCH_DEPENDS) +luci-compat +ipset +iptables +kmod-nft-tproxy +iptables-mod-tproxy +iptables-mod-extra +iptables-mod-nat-extra +kmod-ipt-conntrack DEPENDS:=$(GO_ARCH_DEPENDS) +luci-compat +ipset +iptables +iptables-mod-tproxy +iptables-mod-extra +iptables-mod-nat-extra +kmod-ipt-conntrack
endef endef
define Package/ua3f/description define Package/ua3f/description

View File

@ -30,7 +30,17 @@ try_modprobe() { command -v modprobe >/dev/null 2>&1 && modprobe "$1" 2>/dev/nul
nft_available() { command -v nft >/dev/null 2>&1; } nft_available() { command -v nft >/dev/null 2>&1; }
ipt_available() { command -v iptables >/dev/null 2>&1; } ipt_available() { command -v iptables >/dev/null 2>&1; }
opkg_available() { command -v opkg >/dev/null 2>&1; }
detect_backend() { detect_backend() {
if opkg_available; then
if opkg list-installed kmod-nft-tproxy | grep -q 'kmod-nft-tproxy'; then
FW_BACKEND="nft"
return 0
else
FW_BACKEND="ipt"
return 0
fi
fi
if nft_available; then if nft_available; then
FW_BACKEND="nft" FW_BACKEND="nft"
return 0 return 0