Notify users

This commit is contained in:
Aoran Zeng 2025-07-11 21:06:28 +08:00
parent c0598b2dad
commit 48be5f5acb
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
4 changed files with 59 additions and 15 deletions

View File

@ -506,6 +506,33 @@ iterate_targets_ (const char ***array, size_t size, const char *input, const cha
#define iterate_targets(ary, input, target) iterate_targets_(ary, xy_arylen(ary), input, target)
/**
*
*/
void
cli_notify_for_users ()
{
char *msg = "2025-07-11:\n\n"
" 有时,同一镜像站对不同资源的实际服务速度差异,可能比不同镜像站之间的差异还要大。\n\n"
" * 精准测速: 能真实反映您未来使用该资源时的速度,因为它直接测量您关注的那个资源。\n\n"
" * 模糊测速: 仅代表该镜像站提供服务的一个可能速度。因而可能会出现测速数值较高,但实际使用体验不佳的现象。\n\n"
" 因此,当您遇到模糊测速时,请务必向我们提交准确的测速链接,这既能帮助您,也能造福所有用户。\n\n"
" chsrc 是一个自助和共建的项目。 维护者对于不熟悉的生态系统很难提供有价值的贡献。请您将这部分功能视为您的专属,您可以完全掌控和维护它,就像您是唯一的负责人一样。\n";
br();br();
chsrc_note2 (msg);
}
typedef enum {
TargetOp_Get_Source = 1,
TargetOp_Set_Source,
@ -515,7 +542,7 @@ typedef enum {
} TargetOp;
/**
* target`code`
* target @param:code
*
* @param input
* @param code target要执行的操作
@ -585,6 +612,14 @@ get_target (const char *input, TargetOp code, char *option)
select_mirror_autoly (target->sources, target->sources_n, input);
return true;
}
if (TargetOp_Set_Source==code
|| TargetOp_Reset_Source==code
|| TargetOp_Measure_Source==code)
{
cli_notify_for_users();
}
return true;
}

View File

@ -36,11 +36,11 @@ GoProxyIO =
*/
static Source_t pl_go_sources[] =
{
{&pl_go_upstream, "https://proxy.golang.org"},
{&GoProxyCN, "https://goproxy.cn"},
{&Ali, "https://mirrors.aliyun.com/goproxy/"},
{&Huawei, "https://mirrors.huaweicloud.com/goproxy/"},
{&GoProxyIO, "https://goproxy.io"}
{&pl_go_upstream, "https://proxy.golang.org", NULL},
{&GoProxyCN, "https://goproxy.cn", DelegateToMirror},
{&Ali, "https://mirrors.aliyun.com/goproxy/", NULL},
{&Huawei, "https://mirrors.huaweicloud.com/goproxy/", NULL},
{&GoProxyIO, "https://goproxy.io", DelegateToMirror}
};
def_sources_n(pl_go);

View File

@ -28,26 +28,35 @@ static Source_t pl_rust_cargo_sources[] =
{
{&pl_rust_cargo_upstream, "https://github.com/rust-lang/crates.io-index/",
NULL},
{&MirrorZ, "https://mirrors.cernet.edu.cn/crates.io-index/",
NULL},
{&RsProxyCN, "https://rsproxy.cn/index/",
NULL},
{&Ali, "https://mirrors.aliyun.com/crates.io-index/",
"https://mirrors.aliyun.com/crates/api/v1/crates/windows/0.58.0/download"},
{&Zju, "https://mirrors.zju.edu.cn/crates.io-index/",
NULL},
// {&Nju, "https://mirror.nju.edu.cn/git/crates.io-index.git/",
// NULL},
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/crates.io-index/",
NULL},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/crates.io-index/",
NULL},
{&Bfsu, "https://mirrors.bfsu.edu.cn/crates.io-index/",
NULL},
{&Ustc, "https://mirrors.ustc.edu.cn/crates.io-index/",
"https://crates-io.proxy.ustclug.org/api/v1/crates/windows/0.58.0/download"},
// {&Hust, "https://mirrors.hust.edu.cn/crates.io-index/",
// NULL},
{&Cqu, "https://mirrors.cqu.edu.cn/crates.io-index/",
NULL}
};

View File

@ -19,15 +19,15 @@ static SourceProvider_t pl_rust_binary_upstream =
* @update 2025-06-17
*/
static Source_t pl_rust_rustup_sources[] = {
{&pl_rust_binary_upstream, "https://static.rust-lang.org"},
{&MirrorZ, "https://mirrors.cernet.edu.cn/rustup"},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/rustup"},
{&Ustc, "https://mirrors.ustc.edu.cn/rust-static"},
{&Nju, "https://mirror.nju.edu.cn/rustup"},
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/rust-static"},
{&Zju, "https://mirrors.zju.edu.cn/rustup"},
{&Iscas, "https://mirror.iscas.ac.cn/rustup"},
{&Ali, "https://mirrors.aliyun.com/rustup"},
{&pl_rust_binary_upstream, "https://static.rust-lang.org", NULL},
{&MirrorZ, "https://mirrors.cernet.edu.cn/rustup", NULL},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/rustup", NULL},
{&Ustc, "https://mirrors.ustc.edu.cn/rust-static", NULL},
{&Nju, "https://mirror.nju.edu.cn/rustup", NULL},
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/rust-static", NULL},
{&Zju, "https://mirrors.zju.edu.cn/rustup", NULL},
{&Iscas, "https://mirror.iscas.ac.cn/rustup", NULL},
{&Ali, "https://mirrors.aliyun.com/rustup", NULL},
{&RsProxyCN, "https://rsproxy.cn"}};
def_sources_n(pl_rust_rustup);