增加独立IP依赖nftables安装

This commit is contained in:
勿忘心安
2025-12-16 12:09:39 +08:00
committed by GitHub
parent 28b8754168
commit 91f3a9de47
2 changed files with 8 additions and 0 deletions

View File

@@ -138,6 +138,7 @@ install_base_packages() {
install_package sudo
install_package unzip
install_package iptables-persistent
install_package nftables
install_package nginx
if dpkg -l lxcfs 2>/dev/null | grep -q "^ii"; then

View File

@@ -32,6 +32,13 @@ check_environment() {
err "未检测到配置文件: $CONFIG_FILE"
fi
if ! command -v nft &>/dev/null; then
info "安装 nftables..."
apt-get update >/dev/null 2>&1
apt-get install -y nftables >/dev/null 2>&1
ok "nftables 已安装"
fi
ok "环境检测通过"
}