Skip to content

Network failure after using socks5 proxy on rustup 1.17.0 #1736

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

Closed
KaneGreen opened this issue Apr 3, 2019 · 3 comments
Closed

Network failure after using socks5 proxy on rustup 1.17.0 #1736

KaneGreen opened this issue Apr 3, 2019 · 3 comments
Labels

Comments

@KaneGreen
Copy link
Contributor

Problem
Failed to make network request when update using socks5 proxy on 1.17.0.

Steps

  1. The last time I updated my rustup is when stable-1.33.0 release, I can't remember which version that is.
  2. Today, I run set https_proxy=socks5://127.0.0.1:1080 and rustup self update. The rustup upgraded to 1.17.0 successfully.
  3. The I run rustup update nightly, and there cames an error.
info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'
error: could not download file from 'https://static.rust-lang.org/dist/channel-rust-nightly.toml.sha256' to 'C:\Users\myname\.rustup\tmp\kf4wksnp1qdcizk__file'
info: caused by: failed to make network request
info: caused by: https://static.rust-lang.org/dist/channel-rust-nightly.toml.sha256: an error occurred trying to connect: unexpected eof while tunneling
info: caused by: unexpected eof while tunneling

and my proxy soft only shows this:invalid socks handshake message.
3. Finally I run set https_proxy=http://127.0.0.1:1081 and rustup update nightly, it work well.

Possible Solution(s)
Use HTTP proxy.

Notes
OS: Windows 10 64bit 17763.79
Output of rustup --version:

rustup 1.17.0 (069c88ed6 2019-03-05)

Output of rustup show:

Default host: x86_64-pc-windows-msvc

installed toolchains
--------------------

stable-x86_64-pc-windows-gnu
stable-x86_64-pc-windows-msvc (default)
nightly-x86_64-pc-windows-msvc

active toolchain
----------------

stable-x86_64-pc-windows-msvc (default)
rustc 1.33.0 (2aa4c46cf 2019-02-28)
@KaneGreen KaneGreen added the bug label Apr 3, 2019
@kinnison
Copy link
Contributor

kinnison commented Apr 3, 2019

@seanmonstar Any chance reqwest will support socks proxying?

@seanmonstar
Copy link
Contributor

There was a PR to add support in reqwest, it stalled due to the socks lib being blocking IO only (and reqwest tries to use non-blocking internally), but I can push it through anyways.

@seanmonstar
Copy link
Contributor

reqwest v0.9.14 now has an optional socks cargo feature. By enabling it, I believe the combination with env_proxy should be enough to use SOCKS5 automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants