Accurate and rough measure for mirror site

This commit is contained in:
Aoran Zeng 2025-07-11 15:08:57 +08:00
parent 4fed086f7d
commit f6731adf81
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
13 changed files with 84 additions and 69 deletions

View File

@ -154,6 +154,7 @@ ProgStatus =
#define chsrc_debug(str) xy_warn(App_Name "(DEBUG)",str) #define chsrc_debug(str) xy_warn(App_Name "(DEBUG)",str)
#define chsrc_verbose(str) xy_info(App_Name "(VERBOSE)",str) #define chsrc_verbose(str) xy_info(App_Name "(VERBOSE)",str)
#define faint(str) xy_str_to_faint(str)
#define red(str) xy_str_to_red(str) #define red(str) xy_str_to_red(str)
#define blue(str) xy_str_to_blue(str) #define blue(str) xy_str_to_blue(str)
#define green(str) xy_str_to_green(str) #define green(str) xy_str_to_green(str)
@ -637,11 +638,11 @@ measure_speed_for_every_source (Source_t sources[], int size, double speed_recor
Source_t src = sources[i]; Source_t src = sources[i];
SourceProvider_t *provider = src.provider; SourceProvider_t *provider = src.provider;
SpeedMeasureInfo_t smi = provider->smi; ProviderSpeedMeasureInfo_t psmi = provider->psmi;
bool skip = smi.skip; bool skip = psmi.skip;
const char *url = smi.url; const char *url = psmi.url;
if (!skip && NULL==url) if (!skip && NULL==url)
// 这种情况应当被视为bug但是我们目前还是软处理 // 这种情况应当被视为bug但是我们目前还是软处理
@ -664,8 +665,8 @@ measure_speed_for_every_source (Source_t sources[], int size, double speed_recor
speed = -1024*1024*1024; speed = -1024*1024*1024;
if (!src.url) if (!src.url)
{ {
smi.skip_reason_CN = "上游默认源URL未知请帮助补充"; psmi.skip_reason_CN = "上游默认源URL未知请帮助补充";
smi.skip_reason_EN = "The default upstream source URL is unknown, please help to add"; psmi.skip_reason_EN = "The default upstream source URL is unknown, please help to add";
} }
} }
else if (xy_streql ("user", provider->code)) else if (xy_streql ("user", provider->code))
@ -682,7 +683,7 @@ measure_speed_for_every_source (Source_t sources[], int size, double speed_recor
speed_records[i] = speed; speed_records[i] = speed;
const char *msg = ENGLISH ? provider->abbr : provider->name; const char *msg = ENGLISH ? provider->abbr : provider->name;
const char *skip_reason = ENGLISH ? smi.skip_reason_EN : smi.skip_reason_CN; const char *skip_reason = ENGLISH ? psmi.skip_reason_EN : psmi.skip_reason_CN;
if (NULL==skip_reason) if (NULL==skip_reason)
{ {
skip_reason = ENGLISH ? "SKIP for no reason" : "无理由跳过"; skip_reason = ENGLISH ? "SKIP for no reason" : "无理由跳过";
@ -694,13 +695,17 @@ measure_speed_for_every_source (Source_t sources[], int size, double speed_recor
{ {
const char *msg = ENGLISH ? provider->abbr : provider->name; const char *msg = ENGLISH ? provider->abbr : provider->name;
bool is_accurate = provider->psmi.accurate;
char *accurate_msg = CHINESE ? (is_accurate ? "[精准测速]" : faint("[模糊测速]"))
: (is_accurate ? "[accurate]" : faint("[rough]"));
if (xy_streql ("upstream", provider->code)) if (xy_streql ("upstream", provider->code))
{ {
measure_msgs[i] = xy_strjoin (5, " ^ ", msg, " (", src.url, ") ... "); measure_msgs[i] = xy_strjoin (7, " ^ ", msg, " (", src.url, ") ", accurate_msg, " ... ");
} }
else else
{ {
measure_msgs[i] = xy_strjoin (3, " - ", msg, " ... "); measure_msgs[i] = xy_strjoin (5, " - ", msg, " ", accurate_msg, " ... ");
} }
print (measure_msgs[i]); print (measure_msgs[i]);

View File

@ -9,7 +9,7 @@
* | Mikachu2333 <mikachu.23333@zohomail.com> * | Mikachu2333 <mikachu.23333@zohomail.com>
* | * |
* Created On : <2023-08-29> * Created On : <2023-08-29>
* Last Modified : <2025-06-20> * Last Modified : <2025-07-11>
* *
* *
* ------------------------------------------------------------*/ * ------------------------------------------------------------*/
@ -29,13 +29,13 @@
MirrorSite_t MirrorZ = MirrorSite_t MirrorZ =
{ {
"mirrorz", "MirrorZ", "MirrorZ 校园网镜像站", "https://mirrors.cernet.edu.cn/", "mirrorz", "MirrorZ", "MirrorZ 校园网镜像站", "https://mirrors.cernet.edu.cn/",
{SKIP, "功能特殊无法测速,跳过", "SKIP because of its special function"} {SKIP, "功能特殊无法测速,跳过", "SKIP because of its special function", NULL, ROUGH}
}, },
Tuna = Tuna =
{ {
"tuna", "TUNA", "清华大学开源软件镜像站", "https://mirrors.tuna.tsinghua.edu.cn/", "tuna", "TUNA", "清华大学开源软件镜像站", "https://mirrors.tuna.tsinghua.edu.cn/",
{NotSkip, NA, NA, "https://mirrors.tuna.tsinghua.edu.cn/speedtest/1000mb.bin"} {NotSkip, NA, NA, "https://mirrors.tuna.tsinghua.edu.cn/speedtest/1000mb.bin", ROUGH}
}, },
/** /**
@ -46,67 +46,67 @@ Tuna =
Sjtug_Zhiyuan = Sjtug_Zhiyuan =
{ {
"sjtu-zy", "SJTUG-zhiyuan", "上海交通大学致远镜像站", "https://mirrors.sjtug.sjtu.edu.cn/", "sjtu-zy", "SJTUG-zhiyuan", "上海交通大学致远镜像站", "https://mirrors.sjtug.sjtu.edu.cn/",
{NotSkip, NA, NA, "https://mirrors.sjtug.sjtu.edu.cn/ctan" Big_File_ctan} {NotSkip, NA, NA, "https://mirrors.sjtug.sjtu.edu.cn/ctan" Big_File_ctan, ROUGH}
}, },
Sjtug_Siyuan = Sjtug_Siyuan =
{ {
"sjtu-sy", "SJTUG-siyuan", "上海交通大学思源镜像站", "https://mirror.sjtu.edu.cn/", "sjtu-sy", "SJTUG-siyuan", "上海交通大学思源镜像站", "https://mirror.sjtu.edu.cn/",
{NotSkip, NA, NA, "https://mirror.sjtu.edu.cn/ctan" Big_File_ctan} {NotSkip, NA, NA, "https://mirror.sjtu.edu.cn/ctan" Big_File_ctan, ROUGH}
}, },
Zju = Zju =
{ {
"zju", "ZJU", "浙江大学开源软件镜像站", "https://mirrors.zju.edu.cn/", "zju", "ZJU", "浙江大学开源软件镜像站", "https://mirrors.zju.edu.cn/",
{NotSkip, NA, NA, "https://mirrors.zju.edu.cn/ubuntu-releases" Big_File_ubuntu} {NotSkip, NA, NA, "https://mirrors.zju.edu.cn/ubuntu-releases" Big_File_ubuntu, ROUGH}
}, },
Lzuoss = Lzuoss =
{ {
"lzu", "LZUOSS", "兰州大学开源社区镜像站", "https://mirror.lzu.edu.cn/", "lzu", "LZUOSS", "兰州大学开源社区镜像站", "https://mirror.lzu.edu.cn/",
{NotSkip, NA, NA, "https://mirror.lzu.edu.cn/CTAN" Big_File_ctan} {NotSkip, NA, NA, "https://mirror.lzu.edu.cn/CTAN" Big_File_ctan, ROUGH}
}, },
Jlu = Jlu =
{ {
"jlu", "JLU", "吉林大学开源镜像站", "https://mirrors.jlu.edu.cn/", "jlu", "JLU", "吉林大学开源镜像站", "https://mirrors.jlu.edu.cn/",
{NotSkip, NA, NA, "https://mirrors.jlu.edu.cn/_static/speedtest.bin"} {NotSkip, NA, NA, "https://mirrors.jlu.edu.cn/_static/speedtest.bin", ROUGH}
}, },
Bfsu = Bfsu =
{ {
"bfsu", "BFSU", "北京外国语大学开源软件镜像站", "https://mirrors.bfsu.edu.cn/", "bfsu", "BFSU", "北京外国语大学开源软件镜像站", "https://mirrors.bfsu.edu.cn/",
{NotSkip, NA, NA, "https://mirrors.bfsu.edu.cn/speedtest/1000mb.bin"} {NotSkip, NA, NA, "https://mirrors.bfsu.edu.cn/speedtest/1000mb.bin", ROUGH}
}, },
Pku = Pku =
{ {
"pku", "PKU", "北京大学开源镜像站", "https://mirrors.pku.edu.cn/", "pku", "PKU", "北京大学开源镜像站", "https://mirrors.pku.edu.cn/",
{NotSkip, NA, NA, "https://mirrors.pku.edu.cn/ubuntu-releases" Big_File_ubuntu} {NotSkip, NA, NA, "https://mirrors.pku.edu.cn/ubuntu-releases" Big_File_ubuntu, ROUGH}
}, },
Bjtu = Bjtu =
{ {
"bjtu", "BJTU", "北京交通大学自由与开源软件镜像站", "https://mirror.bjtu.edu.cn/", "bjtu", "BJTU", "北京交通大学自由与开源软件镜像站", "https://mirror.bjtu.edu.cn/",
{NotSkip, NA, NA, "https://mirror.bjtu.edu.cn/archlinux" Big_File_archlinux} {NotSkip, NA, NA, "https://mirror.bjtu.edu.cn/archlinux" Big_File_archlinux, ROUGH}
}, },
Sustech = Sustech =
{ {
"sustech", "SUSTech", "南方科技大学开源软件镜像站", "https://mirrors.sustech.edu.cn/", "sustech", "SUSTech", "南方科技大学开源软件镜像站", "https://mirrors.sustech.edu.cn/",
{NotSkip, NA, NA, "https://mirrors.sustech.edu.cn/site/speedtest/1000mb.bin"} {NotSkip, NA, NA, "https://mirrors.sustech.edu.cn/site/speedtest/1000mb.bin", ROUGH}
}, },
Ustc = Ustc =
{ {
"ustc", "USTC", "中国科学技术大学开源镜像站", "https://mirrors.ustc.edu.cn/", "ustc", "USTC", "中国科学技术大学开源镜像站", "https://mirrors.ustc.edu.cn/",
{NotSkip, NA, NA, "https://mirrors.ustc.edu.cn/ubuntu-releases" Big_File_ubuntu} {NotSkip, NA, NA, "https://mirrors.ustc.edu.cn/ubuntu-releases" Big_File_ubuntu, ROUGH}
}, },
Hust = Hust =
{ {
"hust", "HUST", "华中科技大学开源镜像站", "https://mirrors.hust.edu.cn/", "hust", "HUST", "华中科技大学开源镜像站", "https://mirrors.hust.edu.cn/",
{NotSkip, NA, NA, "https://mirrors.hust.edu.cn/ubuntu-releases" Big_File_ubuntu} {NotSkip, NA, NA, "https://mirrors.hust.edu.cn/ubuntu-releases" Big_File_ubuntu, ROUGH}
}, },
// 速度暂时处于10位以后或者无测速报告但是目前可用的源 // 速度暂时处于10位以后或者无测速报告但是目前可用的源
@ -114,43 +114,43 @@ Hust =
Iscas = Iscas =
{ {
"iscas", "ISCAS", "中科院软件所智能软件研究中心开源镜像站", "https://mirror.iscas.ac.cn/", "iscas", "ISCAS", "中科院软件所智能软件研究中心开源镜像站", "https://mirror.iscas.ac.cn/",
{NotSkip, NA, NA, "https://mirror.iscas.ac.cn/ubuntu-releases" Big_File_ubuntu} {NotSkip, NA, NA, "https://mirror.iscas.ac.cn/ubuntu-releases" Big_File_ubuntu, ROUGH}
}, },
Scau = Scau =
{ {
"scau", "SCAU", "华南农业大学开源软件镜像站", "https://mirrors.scau.edu.cn/", "scau", "SCAU", "华南农业大学开源软件镜像站", "https://mirrors.scau.edu.cn/",
{NotSkip, NA, NA, "https://mirrors.scau.edu.cn/ubuntu-releases" Big_File_ubuntu} {NotSkip, NA, NA, "https://mirrors.scau.edu.cn/ubuntu-releases" Big_File_ubuntu, ROUGH}
}, },
NJTech = NJTech =
{ {
"njtech", "NJTech", "南京工业大学开源软件镜像站", "https://mirrors.njtech.edu.cn/", "njtech", "NJTech", "南京工业大学开源软件镜像站", "https://mirrors.njtech.edu.cn/",
{NotSkip, NA, NA, "https://mirrors.njtech.edu.cn/ubuntu-releases" Big_File_ubuntu} {NotSkip, NA, NA, "https://mirrors.njtech.edu.cn/ubuntu-releases" Big_File_ubuntu, ROUGH}
}, },
Nyist = Nyist =
{ {
"nyist", "NYIST", "南阳理工学院开源软件镜像站", "https://mirror.nyist.edu.cn/", "nyist", "NYIST", "南阳理工学院开源软件镜像站", "https://mirror.nyist.edu.cn/",
{NotSkip, NA, NA, "https://mirror.nyist.edu.cn/ubuntu-releases" Big_File_ubuntu} {NotSkip, NA, NA, "https://mirror.nyist.edu.cn/ubuntu-releases" Big_File_ubuntu, ROUGH}
}, },
Sdu = Sdu =
{ {
"sdu", "SDU", "山东大学镜像站", "https://mirrors.sdu.edu.cn/", "sdu", "SDU", "山东大学镜像站", "https://mirrors.sdu.edu.cn/",
{NotSkip, NA, NA, "https://mirrors.sdu.edu.cn/ubuntu-releases" Big_File_ubuntu} {NotSkip, NA, NA, "https://mirrors.sdu.edu.cn/ubuntu-releases" Big_File_ubuntu, ROUGH}
}, },
Cqupt = Cqupt =
{ {
"cqupt", "CQUPT", "重庆邮电大学开源镜像站", "https://mirrors.cqupt.edu.cn/", "cqupt", "CQUPT", "重庆邮电大学开源镜像站", "https://mirrors.cqupt.edu.cn/",
{NotSkip, NA, NA, "https://mirrors.cqupt.edu.cn/ubuntu-releases" Big_File_ubuntu} {NotSkip, NA, NA, "https://mirrors.cqupt.edu.cn/ubuntu-releases" Big_File_ubuntu, ROUGH}
}, },
Nju = Nju =
{ {
"nju", "NJU", "南京大学开源镜像站", "https://mirrors.nju.edu.cn/", "nju", "NJU", "南京大学开源镜像站", "https://mirrors.nju.edu.cn/",
{NotSkip, NA, NA, "https://mirrors.nju.edu.cn/archlinux" Big_File_archlinux} {NotSkip, NA, NA, "https://mirrors.nju.edu.cn/archlinux" Big_File_archlinux, ROUGH}
}, },
/** /**
@ -159,7 +159,7 @@ Nju =
Cqu = Cqu =
{ {
"cqu", "CQU", "重庆大学开源软件镜像站", "https://mirrors.cqu.edu.cn/", "cqu", "CQU", "重庆大学开源软件镜像站", "https://mirrors.cqu.edu.cn/",
{NotSkip, NA, NA, "https://mirrors.cqu.edu.cn/ubuntu-releases" Big_File_ubuntu} {NotSkip, NA, NA, "https://mirrors.cqu.edu.cn/ubuntu-releases" Big_File_ubuntu, ROUGH}
}; };
/** /**
@ -168,71 +168,71 @@ Cqu =
MirrorSite_t Ali = MirrorSite_t Ali =
{ {
"ali", "Ali OPSX Public", "阿里巴巴开源镜像站(公网)", "https://developer.aliyun.com/mirror/", "ali", "Ali OPSX Public", "阿里巴巴开源镜像站(公网)", "https://developer.aliyun.com/mirror/",
{NotSkip, NA, NA, "https://mirrors.aliyun.com/ubuntu/ls-lR.gz"} // 31MB左右 {NotSkip, NA, NA, "https://mirrors.aliyun.com/ubuntu/ls-lR.gz", ROUGH} // 31MB左右
}, },
/* /*
// https://mirrors.cloud.aliyuncs.com/ // https://mirrors.cloud.aliyuncs.com/
Ali_ECS_VPC = Ali_ECS_VPC =
{ {
"ali-ECS-VPC", "Ali OPSX ECS VPC", "阿里巴巴开源镜像站(ECS VPC网络)", "https://developer.aliyun.com/mirror/", "ali-ECS-VPC", "Ali OPSX ECS VPC", "阿里巴巴开源镜像站(ECS VPC网络)", "https://developer.aliyun.com/mirror/",
{NotSkip, NA, NA, "https://mirrors.cloud.aliyuncs.com/deepin-cd" Big_File_deepin} {NotSkip, NA, NA, "https://mirrors.cloud.aliyuncs.com/deepin-cd" Big_File_deepin, ROUGH}
}, },
// https://mirrors.aliyuncs.com/ // https://mirrors.aliyuncs.com/
Ali_ECS_classic = Ali_ECS_classic =
{ {
"ali-ECS", "Ali OPSX ECS", "阿里巴巴开源镜像站(ECS 经典网络)", "https://developer.aliyun.com/mirror/", "ali-ECS", "Ali OPSX ECS", "阿里巴巴开源镜像站(ECS 经典网络)", "https://developer.aliyun.com/mirror/",
{NotSkip, NA, NA, "https://mirrors.aliyuncs.com/deepin-cd" Big_File_deepin} {NotSkip, NA, NA, "https://mirrors.aliyuncs.com/deepin-cd" Big_File_deepin, ROUGH}
}, },
*/ */
Tencent = Tencent =
{ {
"tencent", "Tencent Public", "腾讯软件源(公网)", "https://mirrors.tencent.com/", "tencent", "Tencent Public", "腾讯软件源(公网)", "https://mirrors.tencent.com/",
{NotSkip, NA, NA, "https://mirrors.cloud.tencent.com/mariadb/mariadb-12.1.0/winx64-packages/mariadb-12.1.0-winx64-debugsymbols.zip"} // 110MB左右 {NotSkip, NA, NA, "https://mirrors.cloud.tencent.com/mariadb/mariadb-12.1.0/winx64-packages/mariadb-12.1.0-winx64-debugsymbols.zip", ROUGH} // 110MB左右
}, },
/* /*
Tencent_Intra = Tencent_Intra =
{ {
"tencent-intra", "Tencent Intranet", "腾讯软件源(内网)", "https://mirrors.tencent.com/", "tencent-intra", "Tencent Intranet", "腾讯软件源(内网)", "https://mirrors.tencent.com/",
{NotSkip, NA, NA, "https://mirrors.cloud.tencentyun.com/ubuntu-releases" Big_File_ubuntu} {NotSkip, NA, NA, "https://mirrors.cloud.tencentyun.com/ubuntu-releases" Big_File_ubuntu, ROUGH}
}, },
*/ */
Huawei = Huawei =
{ {
"huawei", "Huawei Cloud", "华为开源镜像站", "https://mirrors.huaweicloud.com/", "huawei", "Huawei Cloud", "华为开源镜像站", "https://mirrors.huaweicloud.com/",
{NotSkip, NA, NA, "https://mirrors.huaweicloud.com/ubuntu-releases" Big_File_ubuntu} {NotSkip, NA, NA, "https://mirrors.huaweicloud.com/ubuntu-releases" Big_File_ubuntu, ROUGH}
}, },
Volcengine = Volcengine =
{ {
"volc", "Volcengine", "火山引擎开源软件镜像站(公网)", "https://developer.volcengine.com/mirror/", "volc", "Volcengine", "火山引擎开源软件镜像站(公网)", "https://developer.volcengine.com/mirror/",
{NotSkip, NA, NA, "https://mirrors.volces.com/ubuntu-releases" Big_File_ubuntu} {NotSkip, NA, NA, "https://mirrors.volces.com/ubuntu-releases" Big_File_ubuntu, ROUGH}
}, },
/* /*
Volceengine_Intra = Volceengine_Intra =
{ {
"volc-intra", "Volcengine Intranet", "火山引擎开源软件镜像站(内网)", "volc-intra", "Volcengine Intranet", "火山引擎开源软件镜像站(内网)",
"https://developer.volcengine.com/mirror/", "https://developer.volcengine.com/mirror/",
"https://mirrors.ivolces.com/ubuntu-releases" Big_File_ubuntu }, "https://mirrors.ivolces.com/ubuntu-releases" Big_File_ubuntu, ROUGH},
*/ */
/** /**
* @note 2026-06-20 使 * @note 2025-06-20 使
*/ */
Netease = Netease =
{ {
"netease", "Netease", "网易开源镜像站", "https://mirrors.163.com/", "netease", "Netease", "网易开源镜像站", "https://mirrors.163.com/",
{NotSkip, NA, NA, "https://mirrors.163.com/deepin-cd" Big_File_deepin} {NotSkip, NA, NA, "https://mirrors.163.com/deepin-cd" Big_File_deepin, ROUGH}
}, },
/** /**
* @note 2026-06-20 使 * @note 2025-06-20 使
*/ */
Sohu = Sohu =
{ {
"sohu", "SOHU", "搜狐开源镜像站", "https://mirrors.sohu.com/", "sohu", "SOHU", "搜狐开源镜像站", "https://mirrors.sohu.com/",
{NotSkip, NA, NA, "https://mirrors.sohu.com/deepin-cd" Big_File_deepin} {NotSkip, NA, NA, "https://mirrors.sohu.com/deepin-cd" Big_File_deepin, ROUGH}
}; };

View File

@ -7,32 +7,36 @@
* Contributors : Shengwei Chen <414685209@qq.com> * Contributors : Shengwei Chen <414685209@qq.com>
* | * |
* Created On : <2023-08-29> * Created On : <2023-08-29>
* Last Modified : <2024-12-18> * Last Modified : <2025-07-11>
* *
* chsrc struct * chsrc struct
* ------------------------------------------------------------*/ * ------------------------------------------------------------*/
typedef struct SpeedMeasureInfo_t typedef struct ProviderSpeedMeasureInfo_t
{ {
bool skip; /* 是否默认跳过 */ bool skip; /* 是否默认跳过 */
char *skip_reason_CN; /* 跳过的原因(中文)*/ char *skip_reason_CN; /* 跳过的原因(中文)*/
char *skip_reason_EN; /* 跳过的原因(英文)*/ char *skip_reason_EN; /* 跳过的原因(英文)*/
char *url; /* 测速链接 */ char *url; /* 测速链接 */
bool accurate; /* 是否为精准测速上游源和专用镜像站为true通用镜像站为false*/
} }
SpeedMeasureInfo_t; ProviderSpeedMeasureInfo_t;
#define SKIP true #define SKIP true
#define NotSkip false #define NotSkip false
#define ToFill NULL #define ToFill NULL
#define NA NULL #define NA NULL
#define ACCURATE true
#define ROUGH false
typedef struct SourceProvider_t typedef struct SourceProvider_t
{ {
const char *code; /* 用于用户指定某一 Provider */ const char *code; /* 用于用户指定某一 Provider */
const char *abbr; /* 需要使用 Provider 的英文名时,用这个代替,因为大部分 Provider 没有提供正式的英文名 */ const char *abbr; /* 需要使用 Provider 的英文名时,用这个代替,因为大部分 Provider 没有提供正式的英文名 */
const char *name; /* Provider 中文名 */ const char *name; /* Provider 中文名 */
const char *site; /* Provider 首页 */ const char *site; /* Provider 首页 */
SpeedMeasureInfo_t smi; ProviderSpeedMeasureInfo_t psmi;
} }
SourceProvider_t; SourceProvider_t;
@ -43,16 +47,16 @@ SourceProvider_t UpstreamProvider =
/* 引入新的上游默认源时,请使下面第一行的前三个字段保持不变,只添加第四个字段,可使用 def_upstream 宏 */ /* 引入新的上游默认源时,请使下面第一行的前三个字段保持不变,只添加第四个字段,可使用 def_upstream 宏 */
"upstream", "Upstream", "上游默认源", NULL, "upstream", "Upstream", "上游默认源", NULL,
/* 引入新的上游默认源时,请完全修改下面这个结构体,可使用 def_need_measure_info 宏 */ /* 引入新的上游默认源时,请完全修改下面这个结构体,可使用 def_need_measure_info 宏 */
{SKIP, "URL未知邀您参与贡献!", "URL unknown, welcome to contribute!", NULL} {SKIP, "URL未知邀您参与贡献!", "URL unknown, welcome to contribute!", NULL, ACCURATE}
}; };
#define def_upstream "upstream", "Upstream", "上游默认源" #define def_upstream "upstream", "Upstream", "上游默认源"
#define def_need_measure_info {SKIP, "缺乏较大的测速对象,邀您参与贡献!", "Lack of large object URL, welcome to contribute!", NULL} #define def_need_measure_info {SKIP, "缺乏较大的测速对象,邀您参与贡献!", "Lack of large object URL, welcome to contribute!", NULL, ACCURATE}
SourceProvider_t UserDefinedProvider = SourceProvider_t UserDefinedProvider =
{ {
"user", "用户自定义", "用户自定义", NULL, "user", "用户自定义", "用户自定义", NULL,
{SKIP, "用户自定义源不测速", "SKIP for user-defined source", NULL} {SKIP, "用户自定义源不测速", "SKIP for user-defined source", NULL, ACCURATE}
}; };
@ -62,7 +66,11 @@ typedef struct Source_t
SourceProvider_t *provider; SourceProvider_t *provider;
MirrorSite_t *mirror; MirrorSite_t *mirror;
}; };
/* 用于换源的 URL */
char *url; char *url;
/* 精准测速 URL*/
char *accurate_speed_measure_url;
} }
Source_t; Source_t;

View File

@ -6,11 +6,11 @@
* | * |
* Created On : <2025-04-15> * Created On : <2025-04-15>
* Major Revision : 1 * Major Revision : 1
* Last Modified : <2025-04-15> * Last Modified : <2025-07-11>
* ------------------------------------------------------------*/ * ------------------------------------------------------------*/
static MirrorSite_t FlutterCN = static MirrorSite_t FlutterCN =
{ {
"cfug", "CFUG", "Flutter 社区", "https://flutter.cn/", "cfug", "CFUG", "Flutter 社区", "https://flutter.cn/",
{NotSkip, NA, NA, "https://storage.flutter-io.cn/flutter_infra_release/releases/stable/linux/flutter_linux_v1.0.0-stable.tar.xz"} // 231 MB {NotSkip, NA, NA, "https://storage.flutter-io.cn/flutter_infra_release/releases/stable/linux/flutter_linux_v1.0.0-stable.tar.xz", ACCURATE} // 231 MB
}; };

View File

@ -6,7 +6,7 @@
* | * |
* Created On : <2023-08-30> * Created On : <2023-08-30>
* Major Revision : 1 * Major Revision : 1
* Last Modified : <2024-12-18> * Last Modified : <2025-07-11>
* ------------------------------------------------------------*/ * ------------------------------------------------------------*/
static SourceProvider_t pl_go_upstream = static SourceProvider_t pl_go_upstream =
@ -18,13 +18,13 @@ static SourceProvider_t pl_go_upstream =
static MirrorSite_t GoProxyCN = static MirrorSite_t GoProxyCN =
{ {
"goproxy.cn", "Goproxy.cn", "Goproxy.cn (七牛云)", "https://goproxy.cn/", "goproxy.cn", "Goproxy.cn", "Goproxy.cn (七牛云)", "https://goproxy.cn/",
{NotSkip, NA, NA, "https://goproxy.cn/github.com/aws/aws-sdk-go/@v/v1.45.2.zip"} // 30 MB {NotSkip, NA, NA, "https://goproxy.cn/github.com/aws/aws-sdk-go/@v/v1.45.2.zip", ACCURATE} // 30 MB
}, },
GoProxyIO = GoProxyIO =
{ {
"goproxy.io", "GOPROXY.IO", "GOPROXY.IO", "https://goproxy.io/", "goproxy.io", "GOPROXY.IO", "GOPROXY.IO", "https://goproxy.io/",
{NotSkip, NA, NA, "https://goproxy.io/github.com/aws/aws-sdk-go/@v/v1.45.2.zip"} // 30 MB {NotSkip, NA, NA, "https://goproxy.io/github.com/aws/aws-sdk-go/@v/v1.45.2.zip", ACCURATE} // 30 MB
}; };

View File

@ -10,7 +10,7 @@
static MirrorSite_t Api7 = static MirrorSite_t Api7 =
{ {
"api7", "api7.ai", "深圳支流科技有限公司", "https://www.apiseven.com/", "api7", "api7.ai", "深圳支流科技有限公司", "https://www.apiseven.com/",
{SKIP, ToFill, ToFill, NULL} {SKIP, ToFill, ToFill, NULL, ROUGH}
}; };

View File

@ -12,14 +12,14 @@
static SourceProvider_t pl_nodejs_npm_upstream = static SourceProvider_t pl_nodejs_npm_upstream =
{ {
def_upstream, "https://www.npmjs.com/", def_upstream, "https://www.npmjs.com/",
{NotSkip, NA, NA, "https://registry.npmjs.org/@tensorflow/tfjs/-/tfjs-4.22.0.tgz"} {NotSkip, NA, NA, "https://registry.npmjs.org/@tensorflow/tfjs/-/tfjs-4.22.0.tgz", ACCURATE}
}; };
static MirrorSite_t NpmMirror = static MirrorSite_t NpmMirror =
{ {
"npmmirror", "npmmirror", "npmmirror (阿里云赞助)", "https://npmmirror.com/", "npmmirror", "npmmirror", "npmmirror (阿里云赞助)", "https://npmmirror.com/",
// 注意,下面这个是跳转后的地址,不确定未来会不会改变 // 注意,下面这个是跳转后的地址,不确定未来会不会改变
{NotSkip, NA, NA, "https://cdn.npmmirror.com/packages/%40tensorflow/tfjs/4.22.0/tfjs-4.22.0.tgz"} // 29MB {NotSkip, NA, NA, "https://cdn.npmmirror.com/packages/%40tensorflow/tfjs/4.22.0/tfjs-4.22.0.tgz", ACCURATE} // 29MB
}; };
/** /**

View File

@ -10,7 +10,7 @@
static MirrorSite_t NugetOrg = static MirrorSite_t NugetOrg =
{ {
"nuget.org", "NuGet Org", "Nuget Organization", "https://www.nuget.org/", "nuget.org", "NuGet Org", "Nuget Organization", "https://www.nuget.org/",
{SKIP, ToFill, ToFill, NULL} {SKIP, ToFill, ToFill, NULL, ROUGH}
}; };
/** /**

View File

@ -5,19 +5,19 @@
* Contributors : Nil Null <nil@null.org> * Contributors : Nil Null <nil@null.org>
* | * |
* Created On : <2023-08-29> * Created On : <2023-08-29>
* Last Modified : <2024-12-18> * Last Modified : <2025-07-11>
* ------------------------------------------------------------*/ * ------------------------------------------------------------*/
static SourceProvider_t pl_ruby_upstream = static SourceProvider_t pl_ruby_upstream =
{ {
def_upstream, "https://rubygems.org", def_upstream, "https://rubygems.org",
{NotSkip, NA, NA, "https://rubygems.org/gems/nokogiri-1.15.0-java.gem"} {NotSkip, NA, NA, "https://rubygems.org/gems/nokogiri-1.15.0-java.gem", ACCURATE}
}; };
static MirrorSite_t RubyChina = static MirrorSite_t RubyChina =
{ {
"rubychina", "RubyChina", "Ruby China 社区", "https://gems.ruby-china.com/", "rubychina", "RubyChina", "Ruby China 社区", "https://gems.ruby-china.com/",
{NotSkip, NA, NA, "https://gems.ruby-china.com/rubygems/gems/nokogiri-1.15.0-java.gem"} // 9.9 MB {NotSkip, NA, NA, "https://gems.ruby-china.com/rubygems/gems/nokogiri-1.15.0-java.gem", ACCURATE} // 9.9 MB
}; };
/** /**

View File

@ -4,11 +4,11 @@
* File Authors : Aoran Zeng <ccmywish@qq.com> * File Authors : Aoran Zeng <ccmywish@qq.com>
* Contributors : Nil Null <nil@null.org> * Contributors : Nil Null <nil@null.org>
* Created On : <2024-10-02> * Created On : <2024-10-02>
* Last Modified : <2024-11-21> * Last Modified : <2025-07-11>
* ------------------------------------------------------------*/ * ------------------------------------------------------------*/
static MirrorSite_t RsProxyCN = static MirrorSite_t RsProxyCN =
{ {
"rsproxycn", "RsProxy.cn", "字节跳动基础架构Dev Infra", "https://rsproxy.cn/", "rsproxycn", "RsProxy.cn", "字节跳动基础架构Dev Infra", "https://rsproxy.cn/",
{NotSkip, NA, NA, "https://rsproxy.cn/api/v1/crates/windows/0.58.0/download"} {NotSkip, NA, NA, "https://rsproxy.cn/api/v1/crates/windows/0.58.0/download", ACCURATE}
}; };

View File

@ -42,12 +42,14 @@
* target的镜像站 * target的镜像站
*/ */
static MirrorSite_t static MirrorSite_t
RubyMetric = {"rbmt", // chsrc set <target> rbmt RubyMetric = {"rbmt", // 该镜像站的 code, 可以这么使用: chsrc set <target> rbmt
"RubyMetric", // 该镜像站的缩写 "RubyMetric", // 该镜像站的缩写
"RubyMetric.com", // 该镜像站的全名 "RubyMetric.com", // 该镜像站的全名
"https://rubymetirc.com", // 镜像站首页 "https://rubymetirc.com", // 镜像站首页
// 镜像站某个较大的可下载物的下载链接,用于测速 // 镜像站某个较大的可下载物的下载链接,用于测速
"https://rubymetirc.com/target/aws/aws-sdk-go/@v/v1.45.2.zip"}; "https://rubymetirc.com/target/aws/aws-sdk-go/@v/v1.45.2.zip",
ACCURATE}; // 是否为精准测速若使用间接URL来测速则填ROUGH
/** /**
* @update 2025-12-31 * @update 2025-12-31

View File

@ -13,20 +13,20 @@ static MirrorSite_t DaoCloud =
{ {
"daocloud", "DaoCloud","上海道客网络科技有限公司", "https://www.daocloud.io/", "daocloud", "DaoCloud","上海道客网络科技有限公司", "https://www.daocloud.io/",
// 没有找到 DaoCloud 合适的下载链接,先随便给一个,以规避 chsrc 自动测速时所有 dockerhub 镜像站都没有测速链接带来的 bug // 没有找到 DaoCloud 合适的下载链接,先随便给一个,以规避 chsrc 自动测速时所有 dockerhub 镜像站都没有测速链接带来的 bug
{NotSkip, NA, NA, "https://qiniu-download-public.daocloud.io/DaoCloud_Enterprise/dce5/offline-community-v0.18.0-amd64.tar"} {NotSkip, NA, NA, "https://qiniu-download-public.daocloud.io/DaoCloud_Enterprise/dce5/offline-community-v0.18.0-amd64.tar", ACCURATE}
}, },
Fit2Cloud = Fit2Cloud =
{ {
"fit2cloud", "FIT2CLOUD", "杭州飞致云信息科技有限公司", "https://www.fit2cloud.com/", "fit2cloud", "FIT2CLOUD", "杭州飞致云信息科技有限公司", "https://www.fit2cloud.com/",
{SKIP, ToFill, ToFill, NULL} {SKIP, ToFill, ToFill, NULL, ROUGH}
}, },
Huecker = Huecker =
{ {
"huecker", "(Russia) Huecker", "俄罗斯 Huecker.io", "https://huecker.io/", "huecker", "(Russia) Huecker", "俄罗斯 Huecker.io", "https://huecker.io/",
// 同 DaoCloud没有合适的下载链接先随便给一个以避免 bug // 同 DaoCloud没有合适的下载链接先随便给一个以避免 bug
{NotSkip, NA, NA, "https://huecker.io/en/use.html"} {NotSkip, NA, NA, "https://huecker.io/en/use.html", ROUGH}
}; };
/** /**

View File

@ -10,7 +10,7 @@
static MirrorSite_t EmacsChina = static MirrorSite_t EmacsChina =
{ {
"emacschina", "EmacsChina", "Emacs China 社区", "https://elpamirror.emacs-china.org/", "emacschina", "EmacsChina", "Emacs China 社区", "https://elpamirror.emacs-china.org/",
{SKIP, ToFill, ToFill, NULL} {SKIP, ToFill, ToFill, NULL, ROUGH}
}; };
/** /**