mirror of
https://github.com/bin456789/reinstall.git
synced 2026-02-04 09:04:18 +08:00
windows: 国内使用 daocloud 加速下载 win7 的 frpc
This commit is contained in:
@ -60,6 +60,7 @@ get_frpc_url() {
|
|||||||
mirror=$(
|
mirror=$(
|
||||||
# nju 没有 win7 用的旧版
|
# nju 没有 win7 用的旧版
|
||||||
# github 不支持 ipv6
|
# github 不支持 ipv6
|
||||||
|
# daocloud 加速不支持 ipv6
|
||||||
# jsdelivr 不支持 github releases 文件
|
# jsdelivr 不支持 github releases 文件
|
||||||
if is_ipv6_only; then
|
if is_ipv6_only; then
|
||||||
if is_need_old_version; then
|
if is_need_old_version; then
|
||||||
@ -71,7 +72,7 @@ get_frpc_url() {
|
|||||||
else
|
else
|
||||||
if is_in_china; then
|
if is_in_china; then
|
||||||
if is_need_old_version; then
|
if is_need_old_version; then
|
||||||
echo https://github.com/fatedier/frp/releases/download
|
echo https://files.m.daocloud.io/github.com/fatedier/frp/releases/download
|
||||||
else
|
else
|
||||||
echo https://mirrors.nju.edu.cn/github-release/fatedier/frp
|
echo https://mirrors.nju.edu.cn/github-release/fatedier/frp
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -131,6 +131,13 @@ call :check_cygwin_installed || (
|
|||||||
set dir=/sourceware/cygwin
|
set dir=/sourceware/cygwin
|
||||||
)
|
)
|
||||||
|
|
||||||
|
rem daocloud 加速有 90 天缓存,且不支持 IPv6
|
||||||
|
rem https://github.com/DaoCloud/public-binary-files-mirror
|
||||||
|
rem 无法用查询字符串强制刷新缓存
|
||||||
|
rem https://files.m.daocloud.io/www.cloudflare.com/cdn-cgi/trace?a=1
|
||||||
|
rem https://files.m.daocloud.io/www.cloudflare.com/cdn-cgi/trace?b=2
|
||||||
|
rem 也就无法用 https://www.cygwin.com/setup-x86_64.exe?xxx=20250101 强制每天刷新缓存
|
||||||
|
|
||||||
rem 下载 Cygwin
|
rem 下载 Cygwin
|
||||||
if not exist setup-!CygwinArch!.exe (
|
if not exist setup-!CygwinArch!.exe (
|
||||||
call :download http://www.cygwin.com/setup-!CygwinArch!.exe %~dp0setup-!CygwinArch!.exe || goto :download_failed
|
call :download http://www.cygwin.com/setup-!CygwinArch!.exe %~dp0setup-!CygwinArch!.exe || goto :download_failed
|
||||||
@ -195,7 +202,7 @@ rem bitsadmin /transfer "%~3" /priority foreground %~1 %~2
|
|||||||
:download
|
:download
|
||||||
rem certutil 会被 windows Defender 报毒
|
rem certutil 会被 windows Defender 报毒
|
||||||
rem windows server 2019 要用第二条 certutil 命令
|
rem windows server 2019 要用第二条 certutil 命令
|
||||||
echo Download: %~1 %~2
|
echo Downloading: %~1 %~2
|
||||||
del /q "%~2" 2>nul
|
del /q "%~2" 2>nul
|
||||||
if exist "%~2" (echo Cannot delete %~2 & exit /b 1)
|
if exist "%~2" (echo Cannot delete %~2 & exit /b 1)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user