-
Notifications
You must be signed in to change notification settings - Fork 892
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
Reintegrate hyper #509
Comments
I'll give it a try. I expect that most work will involve adding proxy support: curl enables it by setting the proxy URL in the environment, and I want to keep that ability with hyper. |
I made a crate to connect through SOCKS proxies with hyper: https://crates.io/crates/hyper-socks. I think there was some work to add HTTP proxy support directly into hyper, but I'm not sure what the status of that is. |
It works, but there's no built-in support for rust-native-tls, which rustup has to use. I'll see if it's possible to manually create Client instances using a proxy with a custom TLS wrapper. |
You should be able to grab that from the original implementation in this crate. |
Right, but I can't use it with hyper's proxy support because |
@seanmonster ^ appears to be an API hole in |
It's ^ @seanmonstar (not a difficult typo to make 😄) Also, no dice with reimplementing I'll think about what would be a minimal API change to allow a custom TLS wrapper for proxied connections. |
@sfackler is native-tls stable enough that I could add a 'tls' feature to hyper that uses it? If I did, would rustup need anything else custom, or could it just use the default connector and proxy? (I'm not in love with the proxy api, and I'd rather focus energy improving it in async hyper.) |
@seanmonstar it's not quite ready yet - in particular it depends on a fork of winapi until some additions land. |
Restore support for hyper + rust-native-tls, selectable at runtime by setting RUSTUP_USE_HYPER in the environment. Proxied connections are supported as well. Fixes rust-lang#509
Hyper 0.9.8 is now out with proxy TLS wrapper support ( @seanmonstar : thanks! ), so I've published a PR which incorporates the changes required in this issue. |
@inejge Yay! Thank you! |
@sfackler I see that the Windows build is failing because schannel can't find constants in the published winapi. I slapped together a Windows build environment and managed to pass the schannel hurdle, only for the build to fail with:
My understanding of schannel is nil, so I don't know how to proceed from here. |
@inejge for the winapi issue, schannel depends on a fork of winapi until this PR merges: retep998/winapi-rs#288. You can use cargo's new top-level-override feature to force it to use my git fork until then: https://github.com/sfackler/rust-native-tls/blob/master/Cargo.toml#L16-L17. For the Send and Sync things, I just need to add some |
@sfackler yes, I've noticed the override.
Got it, thanks, it's unsafe impl Send for CertStore { } I've forked native-tls and schannel, and created a rustup branch which now builds cleanly on Windows (and works!) I've also submitted a PR to schannel. |
@brson I pushed another commit to #532, which should have produced clean builds, however both failed. Travis couldn't compile any Linux version (Darwin succeeded). The logs say:
This looks like a build environment problem. FWIW, OpenSSL was successfully compiled before this failure in the same run. The Windows build failed because, for some reason, Cargo fetched an older commit from the "rewrite" branch of schannel ( |
"Some reason" being the commit hash written in |
|
Update Cargo.lock so that CI builders don't try to modify it, as it is read-only during the build. Fixes rust-lang#509
All builds passing now. |
Restore support for hyper + rust-native-tls, selectable at runtime by setting RUSTUP_USE_HYPER in the environment. Proxied connections are supported as well. Fixes rust-lang#509
Update Cargo.lock so that CI builders don't try to modify it, as it is read-only during the build. Fixes rust-lang#509
@sfackler has updated native-tls to use new schannel bindings. Let's add support back for hyper, alongside curl, switchable at runtime I think.
This will involve updating the rustup-utils crate to have two different download functions, the existing one that uses curl, and the new one that uses hyper and native-tls. Look at the revert of 5fc6377 to figure out how to write hyper + native-tls.
If the
RUSTUP_USE_HYPER
env var is set then use hyper, otherwise use curl.cc @seanmonstar
The text was updated successfully, but these errors were encountered: