Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Proxy Option for download things from github #98

Open
RedElectricity opened this issue Dec 18, 2022 · 8 comments
Open

Add a Proxy Option for download things from github #98

RedElectricity opened this issue Dec 18, 2022 · 8 comments
Labels
enhancement New feature or request

Comments

@RedElectricity
Copy link

RedElectricity commented Dec 18, 2022

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

@RedElectricity RedElectricity added the enhancement New feature or request label Dec 18, 2022
@RedElectricity RedElectricity changed the title Add 啊 Add a Proxy Opinion for download things from github Dec 18, 2022
@RedElectricity RedElectricity changed the title Add a Proxy Opinion for download things from github Add a Proxy Option for download things from github Dec 18, 2022
@SergioGasquez
Copy link
Member

Hi, we are more than happy to accept contributions! Definitely, this is something that we will need to solve.

@SergioGasquez
Copy link
Member

For reference, we could use:

@RedElectricity
Copy link
Author

🤔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

@SergioGasquez
Copy link
Member

We could publish the toolchain release artifacts to AWS.

@SergioGasquez
Copy link
Member

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.

@SergioGasquez
Copy link
Member

Tracking issue for Xtensa Rust mirror: esp-rs/rust-build#27

@SergioGasquez
Copy link
Member

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.

@wyswill
Copy link

wyswill commented Aug 14, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

3 participants