From d1a6fd786e8beebf15bd2783a97a81312bd2040d Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Wed, 5 Jun 2024 15:47:15 +0800 Subject: [PATCH] Bypass upstream --- include/chsrc.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/include/chsrc.h b/include/chsrc.h index 1ff0344..b3a06f0 100644 --- a/include/chsrc.h +++ b/include/chsrc.h @@ -236,8 +236,15 @@ auto_select_ (SourceInfo *sources, size_t size, const char *target) const char* url = src.mirror->__bigfile_url; if (NULL==url) { - chsrc_warn (xy_strjoin (3, "开发者未提供 ", src.mirror->code, " 镜像站测速链接,跳过该站点")); - speed = 0; + if (xy_streql ("upstream", src.mirror->code)) + { + continue; // 上游默认源不测速 + } + else + { + chsrc_warn (xy_strjoin (3, "开发者未提供 ", src.mirror->code, " 镜像站测速链接,跳过该站点")); + speed = 0; + } } else {