mirror of
https://github.com/bin456789/reinstall.git
synced 2025-06-08 13:29:58 +00:00
parent
739c75c2d1
commit
c63889f32d
@ -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 (
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user