core: 修复纯 ipv6 下无法检测地区

This commit is contained in:
bin456789
2025-03-27 12:02:44 +08:00
parent 12a3ccb2ea
commit 4e48ee7964
2 changed files with 5 additions and 5 deletions

View File

@@ -149,13 +149,13 @@ is_in_china() {
if [ -z "$_loc" ]; then
# www.cloudflare.com/dash.cloudflare.com 国内访问的是美国服务器,而且部分地区被墙
# 备用 www.bose.cn
# 备用 www.qualcomm.cn
# 没有ipv6 www.visa.cn
# 没有ipv6 www.bose.cn
# 没有ipv6 www.garmin.com.cn
# 备用 www.prologis.cn
# 备用 www.garmin.com.cn
# 备用 www.autodesk.com.cn
# 备用 www.keysight.com.cn
if ! _loc=$(curl -L http://www.visa.cn/cdn-cgi/trace | grep '^loc=' | cut -d= -f2 | grep .); then
if ! _loc=$(curl -L http://www.qualcomm.cn/cdn-cgi/trace | grep '^loc=' | cut -d= -f2 | grep .); then
error_and_exit "Can not get location."
fi
echo "Location: $_loc" >&2