diff --git a/include/source.h b/include/source.h index d4ea900..05cca76 100644 --- a/include/source.h +++ b/include/source.h @@ -20,6 +20,10 @@ typedef struct SpeedMeasureInfo_t } SpeedMeasureInfo; +#define SKIP true +#define NotSkip false +#define ToFill NULL +#define NA NULL typedef struct MirrorSite_t { @@ -47,78 +51,78 @@ MirrorSite; MirrorSite MirrorZ = { "mirrorz", "MirrorZ", "MirrorZ 校园网镜像站", "https://mirrors.cernet.edu.cn/", - {true, "功能特殊无法测速,跳过", "SKIP because of its special function"} + {SKIP, "功能特殊无法测速,跳过", "SKIP because of its special function"} }, Tuna = { "tuna", "TUNA", "清华大学开源软件镜像站", "https://mirrors.tuna.tsinghua.edu.cn/", - {false, NULL, NULL, "https://mirrors.tuna.tsinghua.edu.cn/speedtest/1000mb.bin"} + {NotSkip, NA, NA, "https://mirrors.tuna.tsinghua.edu.cn/speedtest/1000mb.bin"} }, Sjtug_Zhiyuan = { "sjtu", "SJTUG-zhiyuan", "上海交通大学致远镜像站", "https://mirrors.sjtug.sjtu.edu.cn/", - {false, NULL, NULL, "https://mirrors.sjtug.sjtu.edu.cn/ctan" Big_File_ctan} + {NotSkip, NA, NA, "https://mirrors.sjtug.sjtu.edu.cn/ctan" Big_File_ctan} }, Zju = { "zju", "ZJU", "浙江大学开源软件镜像站", "https://mirrors.zju.edu.cn/", - {false, NULL, NULL, "https://mirrors.zju.edu.cn/ubuntu-releases" Big_File_ubuntu} + {NotSkip, NA, NA, "https://mirrors.zju.edu.cn/ubuntu-releases" Big_File_ubuntu} }, Lzuoss = { "lzu", "LZUOSS", "兰州大学开源社区镜像站", "https://mirror.lzu.edu.cn/", - {false, NULL, NULL, "https://mirror.lzu.edu.cn/CTAN" Big_File_ctan} + {NotSkip, NA, NA, "https://mirror.lzu.edu.cn/CTAN" Big_File_ctan} }, Jlu = { "jlu", "JLU", "吉林大学开源镜像站", "https://mirrors.jlu.edu.cn/", - {false, NULL, NULL, "https://mirrors.jlu.edu.cn/_static/speedtest.bin"} + {NotSkip, NA, NA, "https://mirrors.jlu.edu.cn/_static/speedtest.bin"} }, Bfsu = { "bfsu", "BFSU", "北京外国语大学开源软件镜像站", "https://mirrors.bfsu.edu.cn/", - {false, NULL, NULL, "https://mirrors.bfsu.edu.cn/speedtest/1000mb.bin"} + {NotSkip, NA, NA, "https://mirrors.bfsu.edu.cn/speedtest/1000mb.bin"} }, Pku = { "pku", "PKU", "北京大学开源镜像站", "https://mirrors.pku.edu.cn/", - {false, NULL, NULL, "https://mirrors.pku.edu.cn/ubuntu-releases" Big_File_ubuntu} + {NotSkip, NA, NA, "https://mirrors.pku.edu.cn/ubuntu-releases" Big_File_ubuntu} }, Bjtu = { "bjtu", "BJTU", "北京交通大学自由与开源软件镜像站", "https://mirror.bjtu.edu.cn/", - {false, NULL, NULL, "https://mirror.bjtu.edu.cn/archlinux" Big_File_archlinux} + {NotSkip, NA, NA, "https://mirror.bjtu.edu.cn/archlinux" Big_File_archlinux} }, Sustech = { "sustech", "SUSTech", "南方科技大学开源软件镜像站", "https://mirrors.sustech.edu.cn/", - {false, NULL, NULL, "https://mirrors.sustech.edu.cn/site/speedtest/1000mb.bin"} + {NotSkip, NA, NA, "https://mirrors.sustech.edu.cn/site/speedtest/1000mb.bin"} }, Ustc = { "ustc", "USTC", "中国科学技术大学开源镜像站", "https://mirrors.ustc.edu.cn/", - {false, NULL, NULL, "https://mirrors.ustc.edu.cn/ubuntu-releases" Big_File_ubuntu} + {NotSkip, NA, NA, "https://mirrors.ustc.edu.cn/ubuntu-releases" Big_File_ubuntu} }, Hust = { "hust", "HUST", "华中科技大学开源镜像站", "https://mirrors.hust.edu.cn/", - {false, NULL, NULL, "https://mirrors.hust.edu.cn/ubuntu-releases" Big_File_ubuntu} + {NotSkip, NA, NA, "https://mirrors.hust.edu.cn/ubuntu-releases" Big_File_ubuntu} }, // 速度暂时处于10位以后,但是目前可用的源 Iscas = { "iscas", "ISCAS", "中科院软件所智能软件研究中心开源镜像站", "https://mirror.iscas.ac.cn/", - {false, NULL, NULL, "https://mirror.iscas.ac.cn/ubuntu-releases" Big_File_ubuntu} + {NotSkip, NA, NA, "https://mirror.iscas.ac.cn/ubuntu-releases" Big_File_ubuntu} }, Scau = { "scau", "SCAU", "华南农业大学开源软件镜像站", "https://mirrors.scau.edu.cn/", - {false, NULL, NULL, "https://mirrors.scau.edu.cn/ubuntu-releases" Big_File_ubuntu} + {NotSkip, NA, NA, "https://mirrors.scau.edu.cn/ubuntu-releases" Big_File_ubuntu} }, Nju = { "nju", "NJU", "南京大学开源镜像站", "https://mirrors.nju.edu.cn/", - {false, NULL, NULL, "https://mirrors.nju.edu.cn/archlinux" Big_File_archlinux} + {NotSkip, NA, NA, "https://mirrors.nju.edu.cn/archlinux" Big_File_archlinux} }; /** @@ -126,7 +130,7 @@ Nju = { * * Cqu = { * "cqu", "CQU", "重庆大学开源软件镜像站", "https://mirrors.cqu.edu.cn/", - * {false, NULL, NULL, "https://mirrors.cqu.edu.cn/speedtest/1000mb.bin"} + * {NotSkip, NA, NA, "https://mirrors.cqu.edu.cn/speedtest/1000mb.bin"} * }; * */ @@ -139,41 +143,41 @@ Nju = { MirrorSite Ali = { "ali", "Ali OPSX Public", "阿里巴巴开源镜像站(公网)", "https://developer.aliyun.com/mirror/", - {false, NULL, NULL, "https://mirrors.aliyun.com/deepin-cd" Big_File_deepin} + {NotSkip, NA, NA, "https://mirrors.aliyun.com/deepin-cd" Big_File_deepin} }, /* // https://mirrors.cloud.aliyuncs.com/ Ali_ECS_VPC = { "ali-ECS-VPC", "Ali OPSX ECS VPC", "阿里巴巴开源镜像站(ECS VPC网络)", "https://developer.aliyun.com/mirror/", - {false, NULL, NULL, "https://mirrors.cloud.aliyuncs.com/deepin-cd" Big_File_deepin} + {NotSkip, NA, NA, "https://mirrors.cloud.aliyuncs.com/deepin-cd" Big_File_deepin} }, // https://mirrors.aliyuncs.com/ Ali_ECS_classic = { "ali-ECS", "Ali OPSX ECS", "阿里巴巴开源镜像站(ECS 经典网络)", "https://developer.aliyun.com/mirror/", - {false, NULL, NULL, "https://mirrors.aliyuncs.com/deepin-cd" Big_File_deepin} + {NotSkip, NA, NA, "https://mirrors.aliyuncs.com/deepin-cd" Big_File_deepin} }, */ Tencent = { "tencent", "Tencent Public", "腾讯软件源(公网)", "https://mirrors.tencent.com/", - {false, NULL, NULL, "https://mirrors.cloud.tencent.com/ubuntu-releases" Big_File_ubuntu} + {NotSkip, NA, NA, "https://mirrors.cloud.tencent.com/ubuntu-releases" Big_File_ubuntu} }, /* Tencent_Intra = { "tencent-intra", "Tencent Intranet", "腾讯软件源(内网)", "https://mirrors.tencent.com/", - {false, NULL, NULL, "https://mirrors.cloud.tencentyun.com/ubuntu-releases" Big_File_ubuntu} + {NotSkip, NA, NA, "https://mirrors.cloud.tencentyun.com/ubuntu-releases" Big_File_ubuntu} }, */ Huawei = { "huawei", "Huawei Cloud", "华为开源镜像站", "https://mirrors.huaweicloud.com/", - {false, NULL, NULL, "https://mirrors.huaweicloud.com/ubuntu-releases" Big_File_ubuntu} + {NotSkip, NA, NA, "https://mirrors.huaweicloud.com/ubuntu-releases" Big_File_ubuntu} }, Volcengine = { "volc", "Volcengine", "火山引擎开源软件镜像站(公网)", "https://developer.volcengine.com/mirror/", - {false, NULL, NULL, "https://mirrors.volces.com/ubuntu-releases" Big_File_ubuntu} + {NotSkip, NA, NA, "https://mirrors.volces.com/ubuntu-releases" Big_File_ubuntu} }, /* Volceengine_Intra = { @@ -184,25 +188,25 @@ Volceengine_Intra = { Netease = { "netease", "Netease", "网易开源镜像站", "https://mirrors.163.com/", - {false, NULL, NULL, "https://mirrors.163.com/deepin-cd" Big_File_deepin} + {NotSkip, NA, NA, "https://mirrors.163.com/deepin-cd" Big_File_deepin} }, Sohu = { "sohu", "SOHU", "搜狐开源镜像站", "https://mirrors.sohu.com/", - {false, NULL, NULL, "https://mirrors.sohu.com/deepin-cd" Big_File_deepin} + {NotSkip, NA, NA, "https://mirrors.sohu.com/deepin-cd" Big_File_deepin} }; MirrorSite Upstream = { "upstream", "Upstream", "上游默认源", NULL, - {true, "上游默认源不测速", "SKIP for upstream source", NULL} + {SKIP, "上游默认源不测速", "SKIP for upstream source", NULL} }; MirrorSite UserDefine = { "user", "用户自定义", "用户自定义", NULL, - {true, "用户自定义源不测速", "SKIP for user-defined source", NULL} + {SKIP, "用户自定义源不测速", "SKIP for user-defined source", NULL} }; diff --git a/src/recipe/lang/Go.c b/src/recipe/lang/Go.c index d0573ec..8a6cdb3 100644 --- a/src/recipe/lang/Go.c +++ b/src/recipe/lang/Go.c @@ -12,12 +12,12 @@ static MirrorSite GoProxyCN = { "goproxy.cn", "Goproxy.cn", "Goproxy.cn (七牛云)", "https://goproxy.cn/", - {false, NULL, NULL, "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"} // 30 MB }, GoProxyIO = { "goproxy.io", "GOPROXY.IO", "GOPROXY.IO", "https://goproxy.io/", - {false, NULL, NULL, "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"} // 30 MB }; diff --git a/src/recipe/lang/Lua.c b/src/recipe/lang/Lua.c index 97fa84d..1840b85 100644 --- a/src/recipe/lang/Lua.c +++ b/src/recipe/lang/Lua.c @@ -8,7 +8,10 @@ * ------------------------------------------------------------*/ static MirrorSite -Api7 = {"api7", "api7.ai", "深圳支流科技有限公司", "https://www.apiseven.com/", NULL}; +Api7 = { + "api7", "api7.ai", "深圳支流科技有限公司", "https://www.apiseven.com/", + {SKIP, ToFill, ToFill, NULL} +}; /** diff --git a/src/recipe/lang/Node.js/common.h b/src/recipe/lang/Node.js/common.h index 0b633ef..b004476 100644 --- a/src/recipe/lang/Node.js/common.h +++ b/src/recipe/lang/Node.js/common.h @@ -12,7 +12,7 @@ static MirrorSite NpmMirror = { "npmmirror", "npmmirror", "npmmirror (阿里云赞助)", "https://npmmirror.com/", // 注意,下面这个是跳转后的地址,不确定未来会不会改变 - {false, NULL, NULL, "https://cdn.npmmirror.com/packages/%40tensorflow/tfjs/4.10.0/tfjs-4.10.0.tgz"} // 29MB + {NotSkip, NA, NA, "https://cdn.npmmirror.com/packages/%40tensorflow/tfjs/4.10.0/tfjs-4.10.0.tgz"} // 29MB }; diff --git a/src/recipe/lang/NuGet.c b/src/recipe/lang/NuGet.c index e244498..c71092f 100644 --- a/src/recipe/lang/NuGet.c +++ b/src/recipe/lang/NuGet.c @@ -8,10 +8,12 @@ * ------------------------------------------------------------*/ static MirrorSite -NugetOrg = {"nuget.org", "NuGet Org", "Nuget Organization", "https://www.nuget.org/", NULL}; +NugetOrg = {"nuget.org", "NuGet Org", "Nuget Organization", "https://www.nuget.org/", + {SKIP, ToFill, ToFill, NULL} +}; /** - * @time 2024-04-18 更新 + * @update 2024-04-18 * @note { * 暂时未实现该换源功能,可参照 * https://mirrors.huaweicloud.com/mirrorDetail/5ebf85de07b41baf6d0882ab?mirrorName=nuget&catalog=language diff --git a/src/recipe/lang/OCaml.c b/src/recipe/lang/OCaml.c index 48345f5..c8e3c40 100644 --- a/src/recipe/lang/OCaml.c +++ b/src/recipe/lang/OCaml.c @@ -8,7 +8,7 @@ * ------------------------------------------------------------*/ /** - * @time 2023-09-15 更新 + * @update 2023-09-15 */ static SourceInfo pl_ocaml_sources[] = { diff --git a/src/recipe/lang/Perl.c b/src/recipe/lang/Perl.c index c724303..9f939ca 100644 --- a/src/recipe/lang/Perl.c +++ b/src/recipe/lang/Perl.c @@ -8,8 +8,7 @@ * ------------------------------------------------------------*/ /** - * @time 2024-05-24 更新 - * @ref https://help.mirrors.cernet.edu.cn/CPAN/ + * @update 2024-05-24 */ static SourceInfo pl_perl_sources[] = { @@ -41,8 +40,9 @@ pl_perl_getsrc (char *option) chsrc_run (cmd, RunOpt_Default); } + /** - * Perl换源,参考:https://help.mirrors.cernet.edu.cn/CPAN/ + * @consult https://help.mirrors.cernet.edu.cn/CPAN/ */ void pl_perl_setsrc (char *option) diff --git a/src/recipe/lang/R.c b/src/recipe/lang/R.c index 7075f86..5a22b79 100644 --- a/src/recipe/lang/R.c +++ b/src/recipe/lang/R.c @@ -8,7 +8,7 @@ * ------------------------------------------------------------*/ /** - * @time 2023-09-04 更新 + * @update 2023-09-04 * @note { * 以下注释的,是不含有bioconductor的镜像站, * 我们在换cran的同时,也直接帮助用户换bioconductor diff --git a/src/recipe/lang/Ruby.c b/src/recipe/lang/Ruby.c index ea08138..553d9c7 100644 --- a/src/recipe/lang/Ruby.c +++ b/src/recipe/lang/Ruby.c @@ -10,7 +10,7 @@ static MirrorSite RubyChina = { "rubychina", "RubyChina", "Ruby China 社区", "https://gems.ruby-china.com/", - {false, NULL, NULL, "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"} // 9.9 MB }; /** diff --git a/src/recipe/lang/Rust/common.h b/src/recipe/lang/Rust/common.h index 74c1f1c..0bf6636 100644 --- a/src/recipe/lang/Rust/common.h +++ b/src/recipe/lang/Rust/common.h @@ -4,8 +4,11 @@ * File Authors : Aoran Zeng * Contributors : Nil Null * Created On : <2024-10-02> - * Last Modified : <2024-10-02> + * Last Modified : <2024-11-21> * ------------------------------------------------------------*/ static MirrorSite -RsProxyCN = {"rsproxycn", "RsProxy.cn", "字节跳动基础架构Dev Infra", "https://rsproxy.cn/", NULL}; +RsProxyCN = { + "rsproxycn", "RsProxy.cn", "字节跳动基础架构Dev Infra", "https://rsproxy.cn/", + {SKIP, ToFill, ToFill, NULL} +}; diff --git a/src/recipe/ware/Docker-Hub.c b/src/recipe/ware/Docker-Hub.c index 21481ad..79d5421 100644 --- a/src/recipe/ware/Docker-Hub.c +++ b/src/recipe/ware/Docker-Hub.c @@ -6,25 +6,25 @@ * Contributors : Nil Null * | * Created On : <2024-06-08> - * Last Modified : <2024-10-28> + * Last Modified : <2024-11-21> * ------------------------------------------------------------*/ static MirrorSite DaoCloud = { "daocloud", "DaoCloud","上海道客网络科技有限公司", "https://www.daocloud.io/", // 没有找到 DaoCloud 合适的下载链接,先随便给一个,以规避 chsrc 自动测速时所有 dockerhub 镜像站都没有测速链接带来的 bug - {false, NULL, NULL, "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"} }, Fit2Cloud = { "fit2cloud", "FIT2CLOUD", "杭州飞致云信息科技有限公司", "https://www.fit2cloud.com/", - {true, NULL, NULL, NULL} + {SKIP, ToFill, ToFill, NULL} }, Huecker = { "huecker", "(Russia) Huecker", "俄罗斯 Huecker.io", "https://huecker.io/", // 同 DaoCloud,没有合适的下载链接,先随便给一个,以避免 bug - {false, NULL, NULL, "https://huecker.io/en/use.html"} + {NotSkip, NA, NA, "https://huecker.io/en/use.html"} }; /** diff --git a/src/recipe/ware/Emacs.c b/src/recipe/ware/Emacs.c index 60d51dc..60fb344 100644 --- a/src/recipe/ware/Emacs.c +++ b/src/recipe/ware/Emacs.c @@ -4,14 +4,17 @@ * File Authors : Aoran Zeng * Contributors : Nil Null * Created On : <2023-10-10> - * Last Modified : <2024-08-09> + * Last Modified : <2024-11-21> * ------------------------------------------------------------*/ static MirrorSite -EmacsChina = {"emacschina", "EmacsChina", "Emacs China 社区", "https://elpamirror.emacs-china.org/", NULL}; +EmacsChina = { + "emacschina", "EmacsChina", "Emacs China 社区", "https://elpamirror.emacs-china.org/", + {SKIP, ToFill, ToFill, NULL} +}; /** - * @time 2023-09-10 更新 + * @update 2023-09-10 * @note Emacs用户往往只需要一次性换源,只会极少次调用 chsrc,我们只给用户提供文档 */ SourceInfo diff --git a/src/recipe/ware/Flathub.c b/src/recipe/ware/Flathub.c index 22d620c..e3c856c 100644 --- a/src/recipe/ware/Flathub.c +++ b/src/recipe/ware/Flathub.c @@ -8,7 +8,7 @@ * ------------------------------------------------------------*/ /** - * @time 2023-09-11 更新 + * @update 2023-09-11 * @note 目前只有一个源 */ static SourceInfo diff --git a/src/recipe/ware/Guix.c b/src/recipe/ware/Guix.c index 3fd5a63..d42d202 100644 --- a/src/recipe/ware/Guix.c +++ b/src/recipe/ware/Guix.c @@ -8,7 +8,7 @@ * ------------------------------------------------------------*/ /** - * @time 2023-09-11 更新 + * @update 2023-09-11 * @note 目前只有一个源 */ static SourceInfo diff --git a/src/recipe/ware/Homebrew.c b/src/recipe/ware/Homebrew.c index 0d813c5..1ae82fd 100644 --- a/src/recipe/ware/Homebrew.c +++ b/src/recipe/ware/Homebrew.c @@ -1,15 +1,15 @@ /** ------------------------------------------------------------ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------- - * File Authors : Aoran Zeng - * Contributors : Nil Null - * Created On : <2023-09-10> - * Last Modified : <2024-08-28> - * Revision : 3 + * File Authors : Aoran Zeng + * Contributors : Nil Null + * Created On : <2023-09-10> + * Major Revision : 3 + * Last Modified : <2024-08-28> * ------------------------------------------------------------*/ /** - * @time 2023-09-10 更新 + * @update 2023-09-10 * @note { * 1. 这些链接将会在setsrc函数中补充完整 * 2. 不确定 Sustech 能否工作 diff --git a/src/recipe/ware/Nix.c b/src/recipe/ware/Nix.c index fcbc8c9..9e752b6 100644 --- a/src/recipe/ware/Nix.c +++ b/src/recipe/ware/Nix.c @@ -8,7 +8,7 @@ * ------------------------------------------------------------*/ /** - * @time 2023-09-22 更新 + * @update 2023-09-22 * @note { * 1. 目前只有一个源 * 2. 这些链接将会在setsrc函数中补充完整 diff --git a/src/recipe/ware/TeX-Live.c b/src/recipe/ware/TeX-Live.c index dcc1800..573c89e 100644 --- a/src/recipe/ware/TeX-Live.c +++ b/src/recipe/ware/TeX-Live.c @@ -8,7 +8,7 @@ * ------------------------------------------------------------*/ /** - * @time 2023-09-10 更新 + * @update 2023-09-10 */ static SourceInfo wr_tex_sources[] = { diff --git a/src/recipe/ware/WinGet.c b/src/recipe/ware/WinGet.c index 038693f..eebc21e 100644 --- a/src/recipe/ware/WinGet.c +++ b/src/recipe/ware/WinGet.c @@ -8,7 +8,7 @@ * ------------------------------------------------------------*/ /** - * @time 2024-06-07 更新 + * @update 2024-06-07 * @note 目前仅有一个源 */ static SourceInfo