Skip to content

Commit

Permalink
v4.6.4
Browse files Browse the repository at this point in the history
1.新增 CIDR 网段地址数据校验及错误自动修正机制。
2.完善「在线检测新版本」代码逻辑,适配相关站点网络访
  问许可的变更。
3.优化代码,改善兼容性。
4.更新运营商 IP 地址数据文件。
  • Loading branch information
larsonzh authored Oct 27, 2024
1 parent 52b538e commit 82ea4e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source_codes/lz/func/lz_rule_func.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4340,7 +4340,7 @@ lz_get_wan_pub_ip() {
local_wan_dev="$( ip route show table "${1}" | awk '/default/ {print $5; exit;}' )"
fi
if [ -n "${local_wan_dev}" ]; then
local_wan_ip="$( curl -s --connect-timeout 20 --interface "${local_wan_dev}" "whatismyip.akamai.com" | grep -Eo '^([0-9]{1,3}[\.]){3}[0-9]{1,3}$' )"
local_wan_ip="$( curl -s --connect-timeout 20 --interface "${local_wan_dev}" "whatismyip.akamai.com" | grep -Eo '^([0-9]{1,3}[\.]){3}[0-9]{1,3}' )"
[ -n "${local_wan_ip}" ] && local_public_ip_enable="1"
local_local_wan_ip="$( ip -o -4 address list | awk '$2 == "'"${local_wan_dev}"'" {print $4; exit;}' | grep -Eo '^([0-9]{1,3}[\.]){3}[0-9]{1,3}' )"
[ "${local_wan_ip}" != "${local_local_wan_ip}" ] && local_public_ip_enable="0"
Expand Down

0 comments on commit 82ea4e1

Please sign in to comment.