Introduce provider

This commit is contained in:
Aoran Zeng 2024-11-22 06:23:23 +08:00
parent f2d8997909
commit b8f847a9ce
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
60 changed files with 80 additions and 79 deletions

View File

@ -775,7 +775,7 @@ source_has_empty_url (SourceInfo *source)
} \ } \
else if (is_url (option)) \ else if (is_url (option)) \
{ \ { \
SourceInfo __tmp = { &UserDefine, option }; \ SourceInfo __tmp = { &UserDefinedProvider, option }; \
source = __tmp; \ source = __tmp; \
} \ } \
else \ else \

View File

@ -171,16 +171,3 @@ 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}
}; };
MirrorSite
Upstream = {
"upstream", "Upstream", "上游默认源", NULL,
{SKIP, "上游默认源不测速", "SKIP for upstream source", NULL}
};
MirrorSite
UserDefine = {
"user", "用户自定义", "用户自定义", NULL,
{SKIP, "用户自定义源不测速", "SKIP for user-defined source", NULL}
};

View File

@ -26,15 +26,29 @@ SpeedMeasureInfo;
#define ToFill NULL #define ToFill NULL
#define NA NULL #define NA NULL
typedef struct MirrorSite_t typedef struct SourceProvider_t
{ {
const char *code; /* 用于用户指定镜像站 */ const char *code; /* 用于用户指定某一 Provider */
const char *abbr; /* 需要使用镜像站的英文名时,用这个代替,因为大部分镜像站没有提供正式的英文名 */ const char *abbr; /* 需要使用 Provider 的英文名时,用这个代替,因为大部分 Provider 没有提供正式的英文名 */
const char *name; /* 镜像站中文名 */ const char *name; /* Provider 中文名 */
const char *site; /* 镜像站首页 */ const char *site; /* Provider 首页 */
SpeedMeasureInfo smi; SpeedMeasureInfo smi;
} }
MirrorSite; SourceProvider;
typedef SourceProvider MirrorSite;
SourceProvider
UpstreamProvider = {
"upstream", "Upstream", "上游默认源", NULL,
{SKIP, "上游默认源不测速", "SKIP for upstream source", NULL}
};
SourceProvider
UserDefinedProvider = {
"user", "用户自定义", "用户自定义", NULL,
{SKIP, "用户自定义源不测速", "SKIP for user-defined source", NULL}
};
typedef struct SourceInfo_t typedef struct SourceInfo_t

View File

@ -13,7 +13,7 @@
*/ */
static SourceInfo static SourceInfo
pl_clojure_sources[] = { pl_clojure_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/help/clojars/"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/help/clojars/"},
{&Ustc, "https://mirrors.ustc.edu.cn/help/clojars.html"} {&Ustc, "https://mirrors.ustc.edu.cn/help/clojars.html"}
}; };

View File

@ -17,7 +17,7 @@
*/ */
static SourceInfo static SourceInfo
pl_dart_flutter_sources[] = { pl_dart_flutter_sources[] = {
{&Upstream, "https://storage.googleapis.com"}, {&UpstreamProvider, "https://storage.googleapis.com"},
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn"}, // 没有后缀,怀疑是否存在问题 {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn"}, // 没有后缀,怀疑是否存在问题
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/git/flutter"}, // URL 带 git {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/git/flutter"}, // URL 带 git
{&Nju, "https://mirror.nju.edu.cn/flutter"} {&Nju, "https://mirror.nju.edu.cn/flutter"}

View File

@ -16,7 +16,7 @@
*/ */
static SourceInfo static SourceInfo
pl_dart_sources[] = { pl_dart_sources[] = {
{&Upstream, "https://pub.dev"}, {&UpstreamProvider, "https://pub.dev"},
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/dart-pub"}, {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/dart-pub"},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"},
{&Nju, "https://mirror.nju.edu.cn/dart-pub"} {&Nju, "https://mirror.nju.edu.cn/dart-pub"}

View File

@ -27,7 +27,7 @@ GoProxyIO = {
*/ */
static SourceInfo static SourceInfo
pl_go_sources[] = { pl_go_sources[] = {
{&Upstream, "https://proxy.golang.org"}, {&UpstreamProvider, "https://proxy.golang.org"},
{&GoProxyCN, "https://goproxy.cn"}, {&GoProxyCN, "https://goproxy.cn"},
{&Ali, "https://mirrors.aliyun.com/goproxy/"}, {&Ali, "https://mirrors.aliyun.com/goproxy/"},
{&Huawei, "https://mirrors.huaweicloud.com/goproxy/"}, {&Huawei, "https://mirrors.huaweicloud.com/goproxy/"},

View File

@ -12,7 +12,7 @@
*/ */
static SourceInfo static SourceInfo
pl_haskell_sources[] = { pl_haskell_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/hackage"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/hackage"},
{&Bfsu, "https://mirrors.bfsu.edu.cn/hackage"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/hackage"},
{&Nju, "https://mirror.nju.edu.cn/hackage"}, {&Nju, "https://mirror.nju.edu.cn/hackage"},

View File

@ -13,7 +13,7 @@
*/ */
static SourceInfo static SourceInfo
pl_java_sources[] = { pl_java_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&Ali, "https://maven.aliyun.com/repository/public/"}, {&Ali, "https://maven.aliyun.com/repository/public/"},
{&Huawei, "https://mirrors.huaweicloud.com/repository/maven/"}, {&Huawei, "https://mirrors.huaweicloud.com/repository/maven/"},
{&Netease, "http://mirrors.163.com/maven/repository/maven-public/"} // 网易的24小时更新一次 {&Netease, "http://mirrors.163.com/maven/repository/maven-public/"} // 网易的24小时更新一次

View File

@ -13,7 +13,7 @@
*/ */
static SourceInfo static SourceInfo
pl_julia_sources[] = { pl_julia_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/julia"}, {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/julia"},
{&Pku, "https://mirrors.pku.edu.cn/julia"}, {&Pku, "https://mirrors.pku.edu.cn/julia"},
{&Nju, "https://mirror.nju.edu.cn/julia"} {&Nju, "https://mirror.nju.edu.cn/julia"}

View File

@ -20,7 +20,7 @@ Api7 = {
*/ */
static SourceInfo static SourceInfo
pl_lua_sources[] = { pl_lua_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&Api7, "https://luarocks.cn"}, {&Api7, "https://luarocks.cn"},
}; };
def_sources_n(pl_lua); def_sources_n(pl_lua);

View File

@ -28,7 +28,7 @@ NpmMirror = {
*/ */
static SourceInfo static SourceInfo
pl_nodejs_sources[] = { pl_nodejs_sources[] = {
{&Upstream, "https://registry.npmjs.org/"}, // @note 根据 pnpm 官网,有最后的斜线 {&UpstreamProvider, "https://registry.npmjs.org/"}, // @note 根据 pnpm 官网,有最后的斜线
{&NpmMirror, "https://registry.npmmirror.com"}, {&NpmMirror, "https://registry.npmmirror.com"},
{&Huawei, "https://mirrors.huaweicloud.com/repository/npm/"}, {&Huawei, "https://mirrors.huaweicloud.com/repository/npm/"},
{&Tencent, "https://mirrors.cloud.tencent.com/npm/"}, {&Tencent, "https://mirrors.cloud.tencent.com/npm/"},
@ -45,7 +45,7 @@ def_sources_n(pl_nodejs);
*/ */
static SourceInfo static SourceInfo
pl_nodejs_binary_release_sources[] = { pl_nodejs_binary_release_sources[] = {
{&Upstream, "https://nodejs.org/dist/"}, {&UpstreamProvider, "https://nodejs.org/dist/"},
{&NpmMirror, "https://npmmirror.com/mirrors"}, {&NpmMirror, "https://npmmirror.com/mirrors"},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/nodejs-release/"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/nodejs-release/"},
{&Bfsu, "https://mirrors.bfsu.edu.cn/nodejs-release/"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/nodejs-release/"},

View File

@ -21,7 +21,7 @@ NugetOrg = {"nuget.org", "NuGet Org", "Nuget Organization", "https://www.nuget.o
*/ */
static SourceInfo static SourceInfo
pl_nuget_sources[] = { pl_nuget_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&NugetOrg, "https://www.nuget.org/api/v2/"}, {&NugetOrg, "https://www.nuget.org/api/v2/"},
{&Huawei, "https://mirrors.huaweicloud.com/repository/nuget/v3"} {&Huawei, "https://mirrors.huaweicloud.com/repository/nuget/v3"}
}; };

View File

@ -12,7 +12,7 @@
*/ */
static SourceInfo static SourceInfo
pl_ocaml_sources[] = { pl_ocaml_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/git/opam-repository.git"} {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/git/opam-repository.git"}
}; };
def_sources_n(pl_ocaml); def_sources_n(pl_ocaml);

View File

@ -13,7 +13,7 @@
*/ */
static SourceInfo static SourceInfo
pl_php_sources[] = { pl_php_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&Ali, "https://mirrors.aliyun.com/composer/"}, {&Ali, "https://mirrors.aliyun.com/composer/"},
{&Tencent, "https://mirrors.tencent.com/composer/"}, {&Tencent, "https://mirrors.tencent.com/composer/"},
// {&Tencent_Intra, "https://mirrors.tencentyun.com/composer/"}, // {&Tencent_Intra, "https://mirrors.tencentyun.com/composer/"},

View File

@ -12,7 +12,7 @@
*/ */
static SourceInfo static SourceInfo
pl_perl_sources[] = { pl_perl_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&Bfsu, "https://mirrors.bfsu.edu.cn/CPAN/"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/CPAN/"},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/CPAN/"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/CPAN/"},
{&Bjtu, "https://mirror.bjtu.edu.cn/cpan/"}, {&Bjtu, "https://mirror.bjtu.edu.cn/cpan/"},

View File

@ -14,7 +14,7 @@
*/ */
static SourceInfo static SourceInfo
pl_python_sources[] = { pl_python_sources[] = {
{&Upstream, "https://pypi.org/simple"}, {&UpstreamProvider, "https://pypi.org/simple"},
{&Bfsu, "https://mirrors.bfsu.edu.cn/pypi/web/simple"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/pypi/web/simple"},
{&Lzuoss, "https://mirror.lzu.edu.cn/pypi/web/simple"}, {&Lzuoss, "https://mirror.lzu.edu.cn/pypi/web/simple"},
{&Jlu, "https://mirrors.jlu.edu.cn/pypi/web/simple"}, {&Jlu, "https://mirrors.jlu.edu.cn/pypi/web/simple"},

View File

@ -16,7 +16,7 @@
*/ */
static SourceInfo static SourceInfo
pl_r_sources[] = { pl_r_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/cran/"}, {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/cran/"},
// {&Ali, "https://mirrors.aliyun.com/CRAN/"}, // {&Ali, "https://mirrors.aliyun.com/CRAN/"},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/CRAN/"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/CRAN/"},

View File

@ -22,7 +22,7 @@ RubyChina = {
*/ */
static SourceInfo static SourceInfo
pl_ruby_sources[] = { pl_ruby_sources[] = {
{&Upstream, "https://rubygems.org"}, {&UpstreamProvider, "https://rubygems.org"},
{&RubyChina, "https://gems.ruby-china.com/"}, {&RubyChina, "https://gems.ruby-china.com/"},
{&Ustc, "https://mirrors.ustc.edu.cn/rubygems/"} {&Ustc, "https://mirrors.ustc.edu.cn/rubygems/"}

View File

@ -14,7 +14,7 @@
*/ */
static SourceInfo static SourceInfo
pl_rust_cargo_sources[] = { pl_rust_cargo_sources[] = {
{&Upstream, "https://index.crates.io/"}, // @help 是这个吗? {&UpstreamProvider, "https://index.crates.io/"}, // @help 是这个吗?
{&MirrorZ, "https://mirrors.cernet.edu.cn/crates.io-index/"}, {&MirrorZ, "https://mirrors.cernet.edu.cn/crates.io-index/"},
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/crates.io-index/"}, {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/crates.io-index/"},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/crates.io-index/"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/crates.io-index/"},

View File

@ -13,7 +13,7 @@
*/ */
static SourceInfo static SourceInfo
pl_rust_rustup_sources[] = { pl_rust_rustup_sources[] = {
{&Upstream, "https://static.rust-lang.org"}, {&UpstreamProvider, "https://static.rust-lang.org"},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/rustup"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/rustup"},
{&Ustc, "https://mirrors.ustc.edu.cn/rust-static"}, {&Ustc, "https://mirrors.ustc.edu.cn/rust-static"},
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/rust-static"}, {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/rust-static"},

View File

@ -164,7 +164,7 @@ available_mirrors[] = {
&RubyChina, &EmacsChina, &NpmMirror, &GoProxyIO, &GoProxyCN, &RsProxyCN, &RubyChina, &EmacsChina, &NpmMirror, &GoProxyIO, &GoProxyCN, &RsProxyCN,
// 暂不支持 &NugetOrg // 暂不支持 &NugetOrg
// 不要列出 &Upstream 和 &UserDdefine // 不要列出 &UpstreamProvider 和 &UserDefinedProvider
}; };
/* End Target Matrix */ /* End Target Matrix */

View File

@ -14,7 +14,7 @@
*/ */
static SourceInfo static SourceInfo
os_armbian_sources[] = { os_armbian_sources[] = {
{&Upstream, "http://apt.armbian.com"}, {&UpstreamProvider, "http://apt.armbian.com"},
{&MirrorZ, "https://mirrors.cernet.edu.cn/armbian"}, {&MirrorZ, "https://mirrors.cernet.edu.cn/armbian"},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/armbian"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/armbian"},
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/armbian"}, {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/armbian"},

View File

@ -14,7 +14,7 @@
*/ */
static SourceInfo static SourceInfo
os_debian_sources[] = { os_debian_sources[] = {
{&Upstream, "http://deb.debian.org/debian"}, {&UpstreamProvider, "http://deb.debian.org/debian"},
{&MirrorZ, "https://mirrors.cernet.edu.cn/debian/"}, {&MirrorZ, "https://mirrors.cernet.edu.cn/debian/"},
{&Ali, "https://mirrors.aliyun.com/debian"}, {&Ali, "https://mirrors.aliyun.com/debian"},
{&Volcengine, "https://mirrors.volces.com/debian"}, {&Volcengine, "https://mirrors.volces.com/debian"},

View File

@ -14,7 +14,7 @@
*/ */
static SourceInfo static SourceInfo
os_kali_sources[] = { os_kali_sources[] = {
{&Upstream, "http://http.kali.org/kali"}, {&UpstreamProvider, "http://http.kali.org/kali"},
{&MirrorZ, "https://mirrors.cernet.edu.cn/kali"}, {&MirrorZ, "https://mirrors.cernet.edu.cn/kali"},
{&Ali, "https://mirrors.aliyun.com/kali"}, {&Ali, "https://mirrors.aliyun.com/kali"},
{&Volcengine, "https://mirrors.volces.com/kali"}, {&Volcengine, "https://mirrors.volces.com/kali"},

View File

@ -13,7 +13,7 @@
*/ */
static SourceInfo static SourceInfo
os_linuxlite_sources[] = { os_linuxlite_sources[] = {
{&Upstream, "http://repo.linuxliteos.com/linuxlite/"}, {&UpstreamProvider, "http://repo.linuxliteos.com/linuxlite/"},
{&MirrorZ, "https://mirrors.cernet.edu.cn/linuxliteos/"}, {&MirrorZ, "https://mirrors.cernet.edu.cn/linuxliteos/"},
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/linuxliteos/"}, {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/linuxliteos/"},
{&Nju, "https://mirror.nju.edu.cn/linuxliteos/"} {&Nju, "https://mirror.nju.edu.cn/linuxliteos/"}

View File

@ -13,7 +13,7 @@
*/ */
static SourceInfo static SourceInfo
os_linuxmint_sources[] = { os_linuxmint_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&MirrorZ, "https://mirrors.cernet.edu.cn/linuxmint/"}, {&MirrorZ, "https://mirrors.cernet.edu.cn/linuxmint/"},
{&Ali, "http://mirrors.aliyun.com/linuxmint-packages/"}, {&Ali, "http://mirrors.aliyun.com/linuxmint-packages/"},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/linuxmint/"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/linuxmint/"},

View File

@ -12,7 +12,7 @@
*/ */
static SourceInfo static SourceInfo
os_ros_sources[] = { os_ros_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&Ali, "https://mirrors.aliyun.com"}, {&Ali, "https://mirrors.aliyun.com"},
{&Bfsu, "https://mirrors.bfsu.edu.cn"}, {&Bfsu, "https://mirrors.bfsu.edu.cn"},
{&Ustc, "https://mirrors.ustc.edu.cn"}, {&Ustc, "https://mirrors.ustc.edu.cn"},

View File

@ -14,7 +14,7 @@
*/ */
static SourceInfo static SourceInfo
os_raspberrypi_sources[] = { os_raspberrypi_sources[] = {
{&Upstream, "https://archive.raspberrypi.com/"}, // https://archive.raspberrypi.org/ until Debian "bullseye" release {&UpstreamProvider, "https://archive.raspberrypi.com/"}, // https://archive.raspberrypi.org/ until Debian "bullseye" release
{&MirrorZ, "https://mirrors.cernet.edu.cn/raspberrypi/"}, {&MirrorZ, "https://mirrors.cernet.edu.cn/raspberrypi/"},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/raspberrypi/"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/raspberrypi/"},
{&Bfsu, "https://mirrors.bfsu.edu.cn/raspberrypi/"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/raspberrypi/"},

View File

@ -14,7 +14,7 @@
*/ */
static SourceInfo static SourceInfo
os_trisquel_sources[] = { os_trisquel_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&MirrorZ, "https://mirrors.cernet.edu.cn/trisquel/"}, {&MirrorZ, "https://mirrors.cernet.edu.cn/trisquel/"},
{&Ali, "https://mirrors.aliyun.com/trisquel/"}, {&Ali, "https://mirrors.aliyun.com/trisquel/"},
{&Nju, "https://mirror.nju.edu.cn/trisquel/"}, {&Nju, "https://mirror.nju.edu.cn/trisquel/"},

View File

@ -14,7 +14,7 @@
*/ */
static SourceInfo static SourceInfo
os_ubuntu_sources[] = { os_ubuntu_sources[] = {
{&Upstream, "http://archive.ubuntu.com/ubuntu/"}, //不支持https {&UpstreamProvider, "http://archive.ubuntu.com/ubuntu/"}, //不支持https
{&MirrorZ, "https://mirrors.cernet.edu.cn/ubuntu/"}, {&MirrorZ, "https://mirrors.cernet.edu.cn/ubuntu/"},
{&Ali, "https://mirrors.aliyun.com/ubuntu"}, {&Ali, "https://mirrors.aliyun.com/ubuntu"},
{&Volcengine, "https://mirrors.volces.com/ubuntu"}, {&Volcengine, "https://mirrors.volces.com/ubuntu"},

View File

@ -14,7 +14,7 @@
*/ */
static SourceInfo static SourceInfo
os_deepin_sources[] = { os_deepin_sources[] = {
{&Upstream, "https://community-packages.deepin.com/deepin"}, {&UpstreamProvider, "https://community-packages.deepin.com/deepin"},
{&Ali, "https://mirrors.aliyun.com/deepin"}, {&Ali, "https://mirrors.aliyun.com/deepin"},
{&Bfsu, "https://mirrors.bfsu.edu.cn/deepin"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/deepin"},
{&Ustc, "https://mirrors.ustc.edu.cn/deepin"}, {&Ustc, "https://mirrors.ustc.edu.cn/deepin"},

View File

@ -15,7 +15,7 @@
*/ */
static SourceInfo static SourceInfo
os_openkylin_sources[] = { os_openkylin_sources[] = {
{&Upstream, "https://archive.openkylin.top/openkylin/"}, {&UpstreamProvider, "https://archive.openkylin.top/openkylin/"},
{&Ali, "https://mirrors.aliyun.com/openkylin/"}, {&Ali, "https://mirrors.aliyun.com/openkylin/"},
{&Netease, "https://mirrors.163.com/openkylin/"}, {&Netease, "https://mirrors.163.com/openkylin/"},
}; };

View File

@ -12,7 +12,7 @@
*/ */
static SourceInfo static SourceInfo
os_alpine_sources[] = { os_alpine_sources[] = {
{&Upstream, "http://dl-cdn.alpinelinux.org/alpine"}, {&UpstreamProvider, "http://dl-cdn.alpinelinux.org/alpine"},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/alpine"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/alpine"},
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/alpine"}, {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/alpine"},
{&Sustech, "https://mirrors.sustech.edu.cn/alpine"}, {&Sustech, "https://mirrors.sustech.edu.cn/alpine"},

View File

@ -18,7 +18,7 @@
*/ */
static SourceInfo static SourceInfo
os_freebsd_sources[] = { os_freebsd_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&Ustc, "mirrors.ustc.edu.cn"}, {&Ustc, "mirrors.ustc.edu.cn"},
{&Nju, "mirror.nju.edu.cn"}, {&Nju, "mirror.nju.edu.cn"},
{&Netease, "mirrors.163.com"}, {&Netease, "mirrors.163.com"},

View File

@ -13,7 +13,7 @@
*/ */
static SourceInfo static SourceInfo
os_netbsd_sources[] = { os_netbsd_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&Ali, "https://mirrors.aliyun.com/pkgsrc/packages/NetBSD/"}, {&Ali, "https://mirrors.aliyun.com/pkgsrc/packages/NetBSD/"},
{&Bfsu, "https://mirrors.bfsu.edu.cn/pkgsrc/packages/NetBSD/"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/pkgsrc/packages/NetBSD/"},
{&Ustc, "https://mirrors.ustc.edu.cn/pkgsrc/packages/NetBSD/"}, {&Ustc, "https://mirrors.ustc.edu.cn/pkgsrc/packages/NetBSD/"},

View File

@ -13,7 +13,7 @@
*/ */
static SourceInfo static SourceInfo
os_openbsd_sources[] = { os_openbsd_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&Ali, "https://mirrors.aliyun.com/OpenBSD/"}, {&Ali, "https://mirrors.aliyun.com/OpenBSD/"},
{&Bfsu, "https://mirrors.bfsu.edu.cn/OpenBSD/"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/OpenBSD/"},
{&Ustc, "https://mirrors.ustc.edu.cn/OpenBSD/"}, {&Ustc, "https://mirrors.ustc.edu.cn/OpenBSD/"},

View File

@ -12,7 +12,7 @@
*/ */
static SourceInfo static SourceInfo
os_gentoo_sources[] = { os_gentoo_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&Ali, "mirrors.aliyun.com"}, {&Ali, "mirrors.aliyun.com"},
{&Bfsu, "mirrors.bfsu.edu.cn"}, {&Bfsu, "mirrors.bfsu.edu.cn"},
{&Ustc, "mirrors.ustc.edu.cn"}, {&Ustc, "mirrors.ustc.edu.cn"},

View File

@ -12,7 +12,7 @@
*/ */
static SourceInfo static SourceInfo
os_openwrt_sources[] = { os_openwrt_sources[] = {
{&Upstream, "http://downloads.openwrt.org"}, {&UpstreamProvider, "http://downloads.openwrt.org"},
{&MirrorZ, "https://mirrors.cernet.edu.cn/openwrt"}, {&MirrorZ, "https://mirrors.cernet.edu.cn/openwrt"},
{&Ali, "https://mirrors.aliyun.com/openwrt"}, {&Ali, "https://mirrors.aliyun.com/openwrt"},
{&Tencent, "https://mirrors.cloud.tencent.com/openwrt"}, {&Tencent, "https://mirrors.cloud.tencent.com/openwrt"},

View File

@ -12,7 +12,7 @@
*/ */
static SourceInfo static SourceInfo
os_solus_sources[] = { os_solus_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/solus/packages/shannon/eopkg-index.xml.xz"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/solus/packages/shannon/eopkg-index.xml.xz"},
{&Bfsu, "https://mirrors.bfsu.edu.cn/solus/packages/shannon/eopkg-index.xml.xz"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/solus/packages/shannon/eopkg-index.xml.xz"},
{&Nju, "https://mirror.nju.edu.cn/solus/packages/shannon/eopkg-index.xml.xz"} {&Nju, "https://mirror.nju.edu.cn/solus/packages/shannon/eopkg-index.xml.xz"}

View File

@ -12,7 +12,7 @@
*/ */
static SourceInfo static SourceInfo
os_void_sources[] = { os_void_sources[] = {
{&Upstream, "https://repo-default.voidlinux.org"}, {&UpstreamProvider, "https://repo-default.voidlinux.org"},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/voidlinux"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/voidlinux"},
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/voidlinux"}, {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/voidlinux"},
{&Bfsu, "https://mirrors.bfsu.edu.cn/voidlinux"} {&Bfsu, "https://mirrors.bfsu.edu.cn/voidlinux"}

View File

@ -12,7 +12,7 @@
*/ */
static SourceInfo static SourceInfo
os_almalinux_sources[] = { os_almalinux_sources[] = {
{&Upstream, "http://repo.almalinux.org/almalinux"}, {&UpstreamProvider, "http://repo.almalinux.org/almalinux"},
{&Ali, "https://mirrors.aliyun.com/almalinux"}, {&Ali, "https://mirrors.aliyun.com/almalinux"},
{&Volcengine, "https://mirrors.volces.com/almalinux"}, {&Volcengine, "https://mirrors.volces.com/almalinux"},
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/almalinux"}, {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/almalinux"},

View File

@ -14,7 +14,7 @@
*/ */
static SourceInfo static SourceInfo
os_anolis_sources[] = { os_anolis_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&Ali, "https://mirrors.aliyun.com/anolis"}, {&Ali, "https://mirrors.aliyun.com/anolis"},
{&Hust, "https://mirrors.hust.edu.cn/anolis"} {&Hust, "https://mirrors.hust.edu.cn/anolis"}
}; };

View File

@ -16,7 +16,7 @@
*/ */
static SourceInfo static SourceInfo
os_fedora_sources[] = { os_fedora_sources[] = {
{&Upstream, "http://download.example/pub/fedora/linux"}, {&UpstreamProvider, "http://download.example/pub/fedora/linux"},
{&Ali, "https://mirrors.aliyun.com/fedora"}, {&Ali, "https://mirrors.aliyun.com/fedora"},
{&Bfsu, "https://mirrors.bfsu.edu.cn/fedora"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/fedora"},
{&Ustc, "https://mirrors.ustc.edu.cn/fedora"}, {&Ustc, "https://mirrors.ustc.edu.cn/fedora"},

View File

@ -12,7 +12,7 @@
*/ */
static SourceInfo static SourceInfo
os_rockylinux_sources[] = { os_rockylinux_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&MirrorZ, "https://mirrors.cernet.edu.cn/rocky"}, {&MirrorZ, "https://mirrors.cernet.edu.cn/rocky"},
{&Ali, "https://mirrors.aliyun.com/rockylinux"}, {&Ali, "https://mirrors.aliyun.com/rockylinux"},
{&Volcengine, "https://mirrors.volces.com/rockylinux"}, {&Volcengine, "https://mirrors.volces.com/rockylinux"},

View File

@ -13,7 +13,7 @@
*/ */
static SourceInfo static SourceInfo
os_openeuler_sources[] = { os_openeuler_sources[] = {
{&Upstream, "https://repo.openeuler.org/"}, {&UpstreamProvider, "https://repo.openeuler.org/"},
{&Ali, "https://mirrors.aliyun.com/openeuler/"}, {&Ali, "https://mirrors.aliyun.com/openeuler/"},
{&Bfsu, "https://mirrors.bfsu.edu.cn/openeuler/"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/openeuler/"},
{&Ustc, "https://mirrors.ustc.edu.cn/openeuler/"}, {&Ustc, "https://mirrors.ustc.edu.cn/openeuler/"},

View File

@ -12,7 +12,7 @@
*/ */
static SourceInfo static SourceInfo
os_opensuse_sources[] = { os_opensuse_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&Ali, "https://mirrors.aliyun.com/opensuse"}, {&Ali, "https://mirrors.aliyun.com/opensuse"},
{&Volcengine, "https://mirrors.volces.com/opensuse"}, {&Volcengine, "https://mirrors.volces.com/opensuse"},
{&Bfsu, "https://mirrors.bfsu.edu.cn/opensuse"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/opensuse"},

View File

@ -14,7 +14,7 @@
*/ */
static SourceInfo static SourceInfo
os_arch_sources[] = { os_arch_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&Ali, "https://mirrors.aliyun.com/archlinux"}, {&Ali, "https://mirrors.aliyun.com/archlinux"},
{&Bfsu, "https://mirrors.bfsu.edu.cn/archlinux"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/archlinux"},
{&Ustc, "https://mirrors.ustc.edu.cn/archlinux"}, {&Ustc, "https://mirrors.ustc.edu.cn/archlinux"},
@ -31,7 +31,7 @@ os_arch_sources[] = {
* @note GitHub:@zheng7fu2 archlinuxcn * @note GitHub:@zheng7fu2 archlinuxcn
*/ */
os_archlinuxcn_sources[] = { os_archlinuxcn_sources[] = {
{&Upstream, "https://repo.archlinuxcn.org/"}, {&UpstreamProvider, "https://repo.archlinuxcn.org/"},
{&Ali, "https://mirrors.aliyun.com/archlinuxcn/"}, {&Ali, "https://mirrors.aliyun.com/archlinuxcn/"},
{&Bfsu, "https://mirrors.bfsu.edu.cn/archlinuxcn/"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/archlinuxcn/"},
{&Ustc, "https://mirrors.ustc.edu.cn/archlinuxcn/"}, {&Ustc, "https://mirrors.ustc.edu.cn/archlinuxcn/"},

View File

@ -12,7 +12,7 @@
*/ */
static SourceInfo static SourceInfo
os_msys2_sources[] = { os_msys2_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&Ali, "https://mirrors.aliyun.com/msys2"}, {&Ali, "https://mirrors.aliyun.com/msys2"},
{&Bfsu, "https://mirrors.bfsu.edu.cn/msys2"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/msys2"},
{&Ustc, "https://mirrors.ustc.edu.cn/msys2"}, {&Ustc, "https://mirrors.ustc.edu.cn/msys2"},

View File

@ -47,7 +47,7 @@ RubyMetric = {"rbmt", // chsrc set <target> rbmt
*/ */
static SourceInfo static SourceInfo
<category>_<target>_sources[] = { <category>_<target>_sources[] = {
{&Upstream, "上游地址若维护者暂时未知可填NULL这个主要用于reset"}, {&UpstreamProvider, "上游地址若维护者暂时未知可填NULL这个主要用于reset"},
{&RubyMetric, "https://rubymetirc.com/target"}, {&RubyMetric, "https://rubymetirc.com/target"},
{&RubyInstaller, "https://rubyinstaller.cn/target"}, {&RubyInstaller, "https://rubyinstaller.cn/target"},
{&Gitee, "https://gitee.com/RubyMetric/chsrc"}, {&Gitee, "https://gitee.com/RubyMetric/chsrc"},

View File

@ -13,7 +13,7 @@
*/ */
static SourceInfo static SourceInfo
wr_anaconda_sources[] = { wr_anaconda_sources[] = {
{&Upstream, "https://repo.anaconda.com/"}, {&UpstreamProvider, "https://repo.anaconda.com/"},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/anaconda/"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/anaconda/"},
{&Bfsu, "https://mirrors.bfsu.edu.cn/anaconda/"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/anaconda/"},
{&Zju, "https://mirrors.zju.edu.cn/anaconda/"}, {&Zju, "https://mirrors.zju.edu.cn/anaconda/"},

View File

@ -12,7 +12,7 @@
*/ */
static SourceInfo static SourceInfo
wr_cocoapods_sources[] = { wr_cocoapods_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git"},
{&Bfsu, "https://mirrors.bfsu.edu.cn/git/CocoaPods/Specs.git"} {&Bfsu, "https://mirrors.bfsu.edu.cn/git/CocoaPods/Specs.git"}
}; };

View File

@ -38,7 +38,7 @@ Huecker = {
static SourceInfo static SourceInfo
wr_dockerhub_sources[] = { wr_dockerhub_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
// {&Ustc, "https://docker.mirrors.ustc.edu.cn/"}, // {&Ustc, "https://docker.mirrors.ustc.edu.cn/"},
// https://github.com/DaoCloud/public-image-mirror // https://github.com/DaoCloud/public-image-mirror

View File

@ -19,7 +19,7 @@ EmacsChina = {
*/ */
SourceInfo SourceInfo
wr_emacs_sources[] = { wr_emacs_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/docs/emacs-elpa"}, {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/docs/emacs-elpa"},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/help/elpa/"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/help/elpa/"},
{&Bfsu, "https://mirrors.bfsu.edu.cn/help/elpa/"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/help/elpa/"},

View File

@ -13,7 +13,7 @@
*/ */
static SourceInfo static SourceInfo
wr_flathub_sources[] = { wr_flathub_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/flathub"}, {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/flathub"},
}; };
def_sources_n(wr_flathub); def_sources_n(wr_flathub);

View File

@ -13,7 +13,7 @@
*/ */
static SourceInfo static SourceInfo
wr_guix_sources[] = { wr_guix_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/git/guix.git"} {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/git/guix.git"}
}; };
def_sources_n(wr_guix); def_sources_n(wr_guix);

View File

@ -17,7 +17,7 @@
*/ */
static SourceInfo static SourceInfo
wr_homebrew_sources[] = { wr_homebrew_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/"},
{&Bfsu, "https://mirrors.bfsu.edu.cn/"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/"},
{&Zju, "https://mirrors.zju.edu.cn/"}, {&Zju, "https://mirrors.zju.edu.cn/"},

View File

@ -16,7 +16,7 @@
*/ */
static SourceInfo static SourceInfo
wr_nix_sources[] = { wr_nix_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&Bfsu, "https://mirrors.bfsu.edu.cn/nix-channels/"} {&Bfsu, "https://mirrors.bfsu.edu.cn/nix-channels/"}
}; };
def_sources_n(wr_nix); def_sources_n(wr_nix);

View File

@ -12,7 +12,7 @@
*/ */
static SourceInfo static SourceInfo
wr_tex_sources[] = { wr_tex_sources[] = {
{&Upstream, NULL}, {&UpstreamProvider, NULL},
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/ctan/systems/texlive/tlnet"}, {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/ctan/systems/texlive/tlnet"},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet"},
{&Bfsu, "https://mirrors.bfsu.edu.cn/CTAN/systems/texlive/tlnet"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/CTAN/systems/texlive/tlnet"},

View File

@ -13,7 +13,7 @@
*/ */
static SourceInfo static SourceInfo
wr_winget_sources[] = { wr_winget_sources[] = {
{&Upstream, "https://cdn.winget.microsoft.com/cache"}, {&UpstreamProvider, "https://cdn.winget.microsoft.com/cache"},
{&Ustc, "https://mirrors.ustc.edu.cn/winget-source"}, {&Ustc, "https://mirrors.ustc.edu.cn/winget-source"},
}; };
def_sources_n(wr_winget); def_sources_n(wr_winget);