core: 更改地区检测网站

fixes #247
This commit is contained in:
bin456789 2025-02-21 00:30:36 +08:00
parent 739c75c2d1
commit c63889f32d
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B
2 changed files with 4 additions and 4 deletions

View File

@ -36,8 +36,8 @@ if not exist %tmp% (
rem 检查是否国内
if not exist geoip (
rem 部分地区 www.cloudflare.com 被墙
call :download http://dash.cloudflare.com/cdn-cgi/trace %~dp0geoip || goto :download_failed
rem www.cloudflare.com/dash.cloudflare.com 国内访问的是美国服务器,而且部分地区被墙
call :download http://www.visa.cn/cdn-cgi/trace %~dp0geoip || goto :download_failed
)
findstr /c:"loc=CN" geoip >nul
if not errorlevel 1 (

View File

@ -129,8 +129,8 @@ is_in_china() {
[ "$force_cn" = 1 ] && return 0
if [ -z "$_loc" ]; then
# 部分地区 www.cloudflare.com 被墙
_loc=$(curl -L http://dash.cloudflare.com/cdn-cgi/trace | grep '^loc=' | cut -d= -f2)
# www.cloudflare.com/dash.cloudflare.com 国内访问的是美国服务器,而且部分地区被墙
_loc=$(curl -L http://www.visa.cn/cdn-cgi/trace | grep '^loc=' | cut -d= -f2)
if [ -z "$_loc" ]; then
error_and_exit "Can not get location."
fi