Skip to content

Commit 562d3b5

Browse files
committed
windows: 国内使用 daocloud 加速下载 win7 的 frpc
1 parent 0c5fac6 commit 562d3b5

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

get-frpc-url.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ get_frpc_url() {
6060
mirror=$(
6161
# nju 没有 win7 用的旧版
6262
# github 不支持 ipv6
63+
# daocloud 加速不支持 ipv6
6364
# jsdelivr 不支持 github releases 文件
6465
if is_ipv6_only; then
6566
if is_need_old_version; then
@@ -71,7 +72,7 @@ get_frpc_url() {
7172
else
7273
if is_in_china; then
7374
if is_need_old_version; then
74-
echo https://github.com/fatedier/frp/releases/download
75+
echo https://files.m.daocloud.io/github.com/fatedier/frp/releases/download
7576
else
7677
echo https://mirrors.nju.edu.cn/github-release/fatedier/frp
7778
fi

reinstall.bat

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,12 @@ call :check_cygwin_installed || (
131131
set dir=/sourceware/cygwin
132132
)
133133

134-
rem 下载 Cygwin
134+
rem daocloud 加速有 90 天缓存,且不支持 IPv6
135+
rem https://github.com/DaoCloud/public-binary-files-mirror
136+
rem 无法用查询字符串强制刷新缓存
137+
rem https://files.m.daocloud.io/www.cloudflare.com/cdn-cgi/trace?a=1
138+
rem https://files.m.daocloud.io/www.cloudflare.com/cdn-cgi/trace?b=2
139+
rem 也就无法用 https://www.cygwin.com/setup-x86_64.exe?xxx=20250101 强制每天刷新缓存
135140
if not exist setup-!CygwinArch!.exe (
136141
call :download http://www.cygwin.com/setup-!CygwinArch!.exe %~dp0setup-!CygwinArch!.exe || goto :download_failed
137142
)
@@ -195,7 +200,7 @@ rem bitsadmin /transfer "%~3" /priority foreground %~1 %~2
195200
:download
196201
rem certutil 会被 windows Defender 报毒
197202
rem windows server 2019 要用第二条 certutil 命令
198-
echo Download: %~1 %~2
203+
echo Downloading: %~1 %~2
199204
del /q "%~2" 2>nul
200205
if exist "%~2" (echo Cannot delete %~2 & exit /b 1)
201206

0 commit comments

Comments
 (0)