diff --git a/src/framework/core.c b/src/framework/core.c index e5c7230..af5cf7e 100644 --- a/src/framework/core.c +++ b/src/framework/core.c @@ -154,6 +154,7 @@ ProgStatus = #define chsrc_debug(str) xy_warn(App_Name "(DEBUG)",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 blue(str) xy_str_to_blue(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]; 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) // 这种情况应当被视为bug,但是我们目前还是软处理 @@ -664,8 +665,8 @@ measure_speed_for_every_source (Source_t sources[], int size, double speed_recor speed = -1024*1024*1024; if (!src.url) { - smi.skip_reason_CN = "上游默认源URL未知,请帮助补充"; - smi.skip_reason_EN = "The default upstream source URL is unknown, please help to add"; + psmi.skip_reason_CN = "上游默认源URL未知,请帮助补充"; + psmi.skip_reason_EN = "The default upstream source URL is unknown, please help to add"; } } 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; 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) { 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; + bool is_accurate = provider->psmi.accurate; + char *accurate_msg = CHINESE ? (is_accurate ? "[精准测速]" : faint("[模糊测速]")) + : (is_accurate ? "[accurate]" : faint("[rough]")); + 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 { - measure_msgs[i] = xy_strjoin (3, " - ", msg, " ... "); + measure_msgs[i] = xy_strjoin (5, " - ", msg, " ", accurate_msg, " ... "); } print (measure_msgs[i]); diff --git a/src/framework/mirror.c b/src/framework/mirror.c index 0599357..74573dd 100644 --- a/src/framework/mirror.c +++ b/src/framework/mirror.c @@ -9,7 +9,7 @@ * | Mikachu2333 * | * Created On : <2023-08-29> - * Last Modified : <2025-06-20> + * Last Modified : <2025-07-11> * * 通用镜像站 * ------------------------------------------------------------*/ @@ -29,13 +29,13 @@ MirrorSite_t MirrorZ = { "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", "清华大学开源软件镜像站", "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 = { "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 = { "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", "浙江大学开源软件镜像站", "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 = { "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", "吉林大学开源镜像站", "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", "北京外国语大学开源软件镜像站", "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", "北京大学开源镜像站", "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", "北京交通大学自由与开源软件镜像站", "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", "南方科技大学开源软件镜像站", "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", "中国科学技术大学开源镜像站", "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", "华中科技大学开源镜像站", "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位以后或者无测速报告,但是目前可用的源 @@ -114,43 +114,43 @@ Hust = Iscas = { "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", "华南农业大学开源软件镜像站", "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", "南京工业大学开源软件镜像站", "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", "南阳理工学院开源软件镜像站", "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", "山东大学镜像站", "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", "重庆邮电大学开源镜像站", "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", "南京大学开源镜像站", "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", "重庆大学开源软件镜像站", "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 = { "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/ Ali_ECS_VPC = { "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/ Ali_ECS_classic = { "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 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 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 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 = { "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 = { "volc-intra", "Volcengine Intranet", "火山引擎开源软件镜像站(内网)", "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", "网易开源镜像站", "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", "搜狐开源镜像站", "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} }; diff --git a/src/framework/struct.h b/src/framework/struct.h index 6904839..d8921b0 100644 --- a/src/framework/struct.h +++ b/src/framework/struct.h @@ -7,32 +7,36 @@ * Contributors : Shengwei Chen <414685209@qq.com> * | * Created On : <2023-08-29> - * Last Modified : <2024-12-18> + * Last Modified : <2025-07-11> * * chsrc struct * ------------------------------------------------------------*/ -typedef struct SpeedMeasureInfo_t +typedef struct ProviderSpeedMeasureInfo_t { bool skip; /* 是否默认跳过 */ char *skip_reason_CN; /* 跳过的原因(中文)*/ char *skip_reason_EN; /* 跳过的原因(英文)*/ char *url; /* 测速链接 */ + bool accurate; /* 是否为精准测速,上游源和专用镜像站为true,通用镜像站为false*/ } -SpeedMeasureInfo_t; +ProviderSpeedMeasureInfo_t; #define SKIP true #define NotSkip false #define ToFill NULL #define NA NULL +#define ACCURATE true +#define ROUGH false + typedef struct SourceProvider_t { const char *code; /* 用于用户指定某一 Provider */ const char *abbr; /* 需要使用 Provider 的英文名时,用这个代替,因为大部分 Provider 没有提供正式的英文名 */ const char *name; /* Provider 中文名 */ const char *site; /* Provider 首页 */ - SpeedMeasureInfo_t smi; + ProviderSpeedMeasureInfo_t psmi; } SourceProvider_t; @@ -43,16 +47,16 @@ SourceProvider_t UpstreamProvider = /* 引入新的上游默认源时,请使下面第一行的前三个字段保持不变,只添加第四个字段,可使用 def_upstream 宏 */ "upstream", "Upstream", "上游默认源", NULL, /* 引入新的上游默认源时,请完全修改下面这个结构体,可使用 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_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 = { "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; MirrorSite_t *mirror; }; + /* 用于换源的 URL */ char *url; + + /* 精准测速 URL*/ + char *accurate_speed_measure_url; } Source_t; diff --git a/src/recipe/lang/Dart/common.h b/src/recipe/lang/Dart/common.h index 6358240..a58683f 100644 --- a/src/recipe/lang/Dart/common.h +++ b/src/recipe/lang/Dart/common.h @@ -6,11 +6,11 @@ * | * Created On : <2025-04-15> * Major Revision : 1 - * Last Modified : <2025-04-15> + * Last Modified : <2025-07-11> * ------------------------------------------------------------*/ static MirrorSite_t FlutterCN = { "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 }; diff --git a/src/recipe/lang/Go.c b/src/recipe/lang/Go.c index 79e05a6..4c837af 100644 --- a/src/recipe/lang/Go.c +++ b/src/recipe/lang/Go.c @@ -6,7 +6,7 @@ * | * Created On : <2023-08-30> * Major Revision : 1 - * Last Modified : <2024-12-18> + * Last Modified : <2025-07-11> * ------------------------------------------------------------*/ static SourceProvider_t pl_go_upstream = @@ -18,13 +18,13 @@ static SourceProvider_t pl_go_upstream = static MirrorSite_t GoProxyCN = { "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 = { "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 }; diff --git a/src/recipe/lang/Lua.c b/src/recipe/lang/Lua.c index 6ae7cf9..5f8ec1a 100644 --- a/src/recipe/lang/Lua.c +++ b/src/recipe/lang/Lua.c @@ -10,7 +10,7 @@ static MirrorSite_t Api7 = { "api7", "api7.ai", "深圳支流科技有限公司", "https://www.apiseven.com/", - {SKIP, ToFill, ToFill, NULL} + {SKIP, ToFill, ToFill, NULL, ROUGH} }; diff --git a/src/recipe/lang/Node.js/common.h b/src/recipe/lang/Node.js/common.h index 89ab597..486c4b5 100644 --- a/src/recipe/lang/Node.js/common.h +++ b/src/recipe/lang/Node.js/common.h @@ -12,14 +12,14 @@ static SourceProvider_t pl_nodejs_npm_upstream = { 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 = { "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 }; /** diff --git a/src/recipe/lang/NuGet.c b/src/recipe/lang/NuGet.c index bc31c49..8713683 100644 --- a/src/recipe/lang/NuGet.c +++ b/src/recipe/lang/NuGet.c @@ -10,7 +10,7 @@ static MirrorSite_t NugetOrg = { "nuget.org", "NuGet Org", "Nuget Organization", "https://www.nuget.org/", - {SKIP, ToFill, ToFill, NULL} + {SKIP, ToFill, ToFill, NULL, ROUGH} }; /** diff --git a/src/recipe/lang/Ruby.c b/src/recipe/lang/Ruby.c index cba3f2c..4c27543 100644 --- a/src/recipe/lang/Ruby.c +++ b/src/recipe/lang/Ruby.c @@ -5,19 +5,19 @@ * Contributors : Nil Null * | * Created On : <2023-08-29> - * Last Modified : <2024-12-18> + * Last Modified : <2025-07-11> * ------------------------------------------------------------*/ static SourceProvider_t pl_ruby_upstream = { 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 = { "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 }; /** diff --git a/src/recipe/lang/Rust/common.h b/src/recipe/lang/Rust/common.h index 484b480..16114e9 100644 --- a/src/recipe/lang/Rust/common.h +++ b/src/recipe/lang/Rust/common.h @@ -4,11 +4,11 @@ * File Authors : Aoran Zeng * Contributors : Nil Null * Created On : <2024-10-02> - * Last Modified : <2024-11-21> + * Last Modified : <2025-07-11> * ------------------------------------------------------------*/ static MirrorSite_t RsProxyCN = { "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} }; diff --git a/src/recipe/recipe-template.c b/src/recipe/recipe-template.c index bdcf34c..9c98f37 100644 --- a/src/recipe/recipe-template.c +++ b/src/recipe/recipe-template.c @@ -42,12 +42,14 @@ * 定义专服务于该target的镜像站,该例数据为虚拟填充 */ static MirrorSite_t -RubyMetric = {"rbmt", // chsrc set rbmt +RubyMetric = {"rbmt", // 该镜像站的 code, 可以这么使用: chsrc set rbmt "RubyMetric", // 该镜像站的缩写 "RubyMetric.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 diff --git a/src/recipe/ware/Docker-Hub.c b/src/recipe/ware/Docker-Hub.c index 855f8c7..3abb386 100644 --- a/src/recipe/ware/Docker-Hub.c +++ b/src/recipe/ware/Docker-Hub.c @@ -13,20 +13,20 @@ static MirrorSite_t DaoCloud = { "daocloud", "DaoCloud","上海道客网络科技有限公司", "https://www.daocloud.io/", // 没有找到 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", "杭州飞致云信息科技有限公司", "https://www.fit2cloud.com/", - {SKIP, ToFill, ToFill, NULL} + {SKIP, ToFill, ToFill, NULL, ROUGH} }, Huecker = { "huecker", "(Russia) Huecker", "俄罗斯 Huecker.io", "https://huecker.io/", // 同 DaoCloud,没有合适的下载链接,先随便给一个,以避免 bug - {NotSkip, NA, NA, "https://huecker.io/en/use.html"} + {NotSkip, NA, NA, "https://huecker.io/en/use.html", ROUGH} }; /** diff --git a/src/recipe/ware/Emacs.c b/src/recipe/ware/Emacs.c index 883b6f5..ae2e3cc 100644 --- a/src/recipe/ware/Emacs.c +++ b/src/recipe/ware/Emacs.c @@ -10,7 +10,7 @@ static MirrorSite_t EmacsChina = { "emacschina", "EmacsChina", "Emacs China 社区", "https://elpamirror.emacs-china.org/", - {SKIP, ToFill, ToFill, NULL} + {SKIP, ToFill, ToFill, NULL, ROUGH} }; /**