espup
espup copied to clipboard
Add a Proxy Option for download things from github
Motivations
Sometimes, it's hard download things from github without proxy in china, so can it add a proxy option?
- Would you like to implement this feature? [y/n] y
Solution
Alternatives
Additional context
Hi, we are more than happy to accept contributions! Definitely, this is something that we will need to solve.
For reference, we could use:
- https://gitee.com/espressif_systems as mirror of esp-idf and other github dependencies
- And we could upload release binaries to AWS like we do in: https://github.com/espressif/idf-installer/blob/main/.github/workflows/update-index.yml
🤔maybe rust-build
need a mirror too
espup install --toolchain-version 1.66.0.0 -d x86_64-pc-windows-gnu --esp-idf-version master
[2022-12-20T06:11:23Z INFO ] 💽 Installing esp-rs
[2022-12-20T06:11:23Z INFO ] 🔧 Checking existing Rust installation
[2022-12-20T06:11:24Z INFO ] 🔧 Installing Xtensa Rust 1.66.0.0 toolchain
[2022-12-20T06:11:24Z INFO ] 📥 Downloading file rust.zip from https://github.com/esp-rs/rust-build/releases/download/v1.66.0.0/rust-1.66.0.0-x86_64-pc-windows-gnu.zip
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidArchive("Invalid zip header")', C:\Users\redel\scoop\persist\rustup\.cargo\registry\src\mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd\espup-0.2.4\src\toolchain\mod.rs:59:65
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
We could publish the toolchain release artifacts to AWS.
Just a small update on this, on yesterday's community meeting we discussed this issue. We will be probably creating a mirror of our Xtensa Rust and LLVM artifacts, probably in AWS, but we will wait until no_std
does not require GCC as a linker so we don't have to create a mirror for it too.
Tracking issue for Xtensa Rust mirror: https://github.com/esp-rs/rust-build/issues/27
Just noticed that @chang196700 is using https://ghproxy.com/. I dont have any experience with it, but if it works, maybe we could just include a --proxy
argument that when used we download it from ghproxy instead.
I modify this source file , path src/toolchain/mod.rs:73
let client = reqwest::Client::builder()
.proxy(reqwest::Proxy::https("http://127.0.0.1:20171")?)
.build()?;
let resp = client.get(&url).send().await?;
let bytes = resp.bytes().await?;
is work on my pc