Bypass upstream

This commit is contained in:
Aoran Zeng 2024-06-05 15:47:15 +08:00
parent 16ac9d7193
commit d1a6fd786e

View File

@ -235,10 +235,17 @@ auto_select_ (SourceInfo *sources, size_t size, const char *target)
SourceInfo src = sources[i];
const char* url = src.mirror->__bigfile_url;
if (NULL==url)
{
if (xy_streql ("upstream", src.mirror->code))
{
continue; // 上游默认源不测速
}
else
{
chsrc_warn (xy_strjoin (3, "开发者未提供 ", src.mirror->code, " 镜像站测速链接,跳过该站点"));
speed = 0;
}
}
else
{
printf ("%s", xy_strjoin (3, "测速 ", src.mirror->site , " ... "));