export RUSTUP_DIST_SERVER="https://mirrors.ustc.edu.cn/rust-static"
export RUSTUP_UPDATE_ROOT="https://mirrors.ustc.edu.cn/rust-static/rustup"
curl https://sh.rustup.rs -sSf | sh
crates代理
代理一:
[source.crates-io]
replace-with = "rustcc"
[source.rustcc]
registry = "https://code.aliyun.com/rustcc/crates.io-index.git"
代理二:
[source.crates-io]
replace-with = 'ustc'
[source.ustc]
registry = "git://mirrors.ustc.edu.cn/crates.io-index"
代理三:
# Put the content into ${HOME}/.cargo/config
[source.crates-io]
registry = "https://github.com/rust-lang/crates.io-index"
# replace with your favourite mirror
replace-with = 'sjtu'
[source.ustc]
registry = "git://mirrors.ustc.edu.cn/crates.io-index"
[source.sjtu]
registry = "https://mirrors.sjtug.sjtu.edu.cn/git/crates.io-index"
[source.rustcc]
registry = "https://code.aliyun.com/rustcc/crates.io-index.git"
代理四:
[source.crates-io]
replace-with = 'tuna'
[source.tuna]
registry = "https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git"
转:
https://blog.hellojukay.cn/2020/03/06/20200307/
https://blog.hellojukay.cn/2020/03/24/20200325/