cloudfoundry/credhub-cli

If $CREDHUB_PROXY set, please ignore $HTTPS_PROXY

drnic opened this issue · 3 comments

drnic commented

Firstly, thanks for adding SOCKS5 proxy support recently.

I need to set $HTTPS_PROXY for many Golang CLIs that cleverly use it to route traffic thru a SOCKS5 proxy. Can credhub move to use HTTPS_PROXY features from Golang 1.9/1.10? Or if we must keep CREDHUB_PROXY, can the CLI internally ignore HTTPS_PROXY if its set, please?

Currently, if both are set:

$ credhub find
Get https://10.10.1.4:8844/api/v1/data?path=: proxyconnect tcp: proxy: failed to read connect reply from SOCKS5 proxy at localhost:9999: EOF

$ unset HTTPS_PROXY
$ credhub find
credentials:
- name: /bucc/useast2-prod-vault/root_token
...

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/156072811

The labels on this github issue will be updated when the story is started.

@drnic thanks for reporting this! Moving to use HTTPS_PROXY in place of CREDHUB_PROXY would break backwards compatibility which we are trying to maintain. But we agree it is a good idea to ignore HTTPS_PROXY if CREDHUB_PROXY is set. We'll prioritize as necessary.

@drnic we have decided that we are just going to document the priority of each environment variable to make it clear