feat(firewall/set_cust_host_ipv4): 允许使用自定义网段覆盖默认透明路由网段

This commit is contained in:
delichik
2024-07-05 15:45:41 +08:00
committed by GitHub
parent 58bc356628
commit f1f8fa4395
2 changed files with 21 additions and 6 deletions

View File

@@ -194,7 +194,11 @@ getlanip() { #获取局域网host地址
sleep 1 && i=$((i + 1))
done
#添加自定义ipv4局域网网段
host_ipv4="$host_ipv4$cust_host_ipv4"
if [ "$replace_default_host_ipv4" == "未禁用" ]; then
host_ipv4="$cust_host_ipv4"
else
host_ipv4="$host_ipv4$cust_host_ipv4"
fi
#缺省配置
[ -z "$host_ipv4" ] && host_ipv4='192.168.0.0/16 10.0.0.0/12 172.16.0.0/12'
host_ipv6="fe80::/10 fd00::/8 $host_ipv6"