Skip to content

Instantly share code, notes, and snippets.

@Kuri-su
Last active August 2, 2020 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kuri-su/88e85afe12057531adb11380d9cf0934 to your computer and use it in GitHub Desktop.
Save Kuri-su/88e85afe12057531adb11380d9cf0934 to your computer and use it in GitHub Desktop.
#use Proxy In Rust Cargo

{"title":"use Proxy In Rust Cargo","type":"blogGist","show":true,"description":"为 Rust Cargo 设置代理","tag":["rust"]}

Rust Cargo 使用 Proxy

[TOC]

由于有一些 Rust Cargo 包需要从 github 下载, 没有 Proxy 会很慢, 遂开始寻找 代理的方法, 在 Rust docs 里找到相关介绍.

任何环境下都可以 在 $HOME/.cargo 下创建 config 文件 (刚刚安装 Cargo 是没有 config 文件的, 不用紧张), 然后填入如下内容

[http]
proxy = "127.0.0.1:1234"

[https]
proxy = "127.0.0.1:1234"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment