Habitat: Proxy support does not work

Created on 16 Jun 2016  Â·  13Comments  Â·  Source: habitat-sh/habitat

Back in #652 we had to remove proxy support in order to get SSL working correctly. The reason we can't do both at the moment has to do with Hyper, the HTTP client we're using.

Fix this so both SSL and proxy support work correctly

Bug

Most helpful comment

We are planning on doing a release this week that will ship with proxy support. It will be _unauthenticated_ proxy support at first (i.e. solely respecting HTTP_PROXY, HTTPS_PROXY and so on) and if there is sufficient demand for inline authentication we will tackle that later.

All 13 comments

rustup had this issue before too, it uses curl now, like cargo.
As mentioned in rustup issues, they also wait for hyper to support it(support that landed).
rustup has this issue to use the new hyper feature.

For those interested, I tried using proxychains with http and https setup and it doesn't work that way either.
Example run:
sudo -E proxychains hab pkg install core/cmake

If you do succeed using Habitat trough proxychains or something similar, please let me know.

Any update on this?
I think some companies might like to use Habitat as a way of distributing software, but without support for proxy, you can't even test Habitat.

If it helps: https://github.com/rust-lang-nursery/rustup.rs/pull/532

Proxy support is essential for large corporations, I work for one and would love to use this awesome tech. Please bump priority - should not be too hard to fix. Or maybe consider using curl instead :)

We are planning on doing a release this week that will ship with proxy support. It will be _unauthenticated_ proxy support at first (i.e. solely respecting HTTP_PROXY, HTTPS_PROXY and so on) and if there is sufficient demand for inline authentication we will tackle that later.

That is great news! I can live with unauthenticated proxy support for now. Thank you.

I too can live with unauthenticated support.

1044 fixes this. Will make a new release once it has been reviewed and merged.

Good news, #1044 is merged (see link for PR all the details) which means we should be set up for unauthenticated and basic-authenticated proxy support in both plaintext (i.e. http:// target URLs) and tunneled (i.e. https:// target URLs) modes. This will ship in the next release which I'm gearing up now.

@lilianmoraru thanks for the links to rustup--I was resigned to adding another dependency until I ran across the hyper-socks crate which finally clicked the last mental puzzle piece in for me.

@dmagyar once the 0.8.0 release is out the door, I'd love if you had time to verify the behavior works in your environment. The http_proxy/HTTP_PROXY/https_proxy/HTTPS_PROXY/no_proxy/NO_PROXY environment variables will be honored by the hab CLI as well as the Supervisor (used with hab start …), and the Director meaning that starting services should also work.

Note for all that the gossip network traffic is _not_ aware or flowing through a web proxy. This traffic is UDP-based, and I'm not 100% sure if a TCP tunneling proxy would support that traffic. Some future research I have no doubt 😄

You are awesome Sir, I will definitively try and provide feedback. Gossip would not need to go through a proxy as it is usually local (between hab-s) and rarely external.

@fnichol If you have a nightly build or something like that, I am more than willing to test it before the release of 0.8.

I can confirm that it works, although with a little quirk.
Doing sudo hab doesn't work, but doing sudo -E hab works.
I know of one more tool that behaves this way: apt-add-repository.

It is okay with me, although this most probably will be an issue almost all users will hit when going through a proxy.

903 is something we'll be tackling next in order to address that. @lilianmoraru

Was this page helpful?
0 / 5 - 0 ratings