Wrangler: Does wrangler support a corporate proxy?

Created on 4 Jul 2019  路  7Comments  路  Source: cloudflare/wrangler

Hi,

I attempted 'wrangler preview' and got the following

Error: Error(Hyper(Error(Connect, Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })), "https://cloudflareworkers.com/script")

I am using linux behing a corp proxy and have set the usual environment variables..

Is it possible that wrangler is ignoring these variables?

Regards,
Dave

status - needs repro status - waiting on response user report

Most helpful comment

This should be fixed with the latest release.

All 7 comments

Hi! Some questions to help us investigate these connectivity issues:

  1. Do you mind sharing which environment variables you've set?
  2. Are you able to send a GET request to https://cloudflareworkers.com?

With this information I can look into this issue more in-depth.

I started off with an issue installing wrangler. Was able to download the package manually and extra to here: C:\Users\michael.west\.wrangler\out.

Now I see an error, which I assume is proxy related, when using the generate command.

PS C:\Work\cloudflare> wrangler generate my-worker
Error: https://crates.io/api/v1/crates/cargo-generate: error trying to connect: An existing connection was forcibly closed by the remote host. (os error 10054)

My environment variables HTTP_PROXY and HTTPS_PROXY both have Fiddler setup to help me handle authentication through proxy servers. Have had to do this for general use with npm.

I am however able to perform a simple GET request like so:

iwr https://cloudflareworkers.com

Hi! Some questions to help us investigate these connectivity issues:

  1. Do you mind sharing which environment variables you've set?
  2. Are you able to send a GET request to https://cloudflareworkers.com?

With this information I can look into this issue more in-depth.

Hi Gabbi,

Forgive my tardiness replying. Curse of distractions. Back to this now...

$http_proxy and $https_proxy are set to our corporate proxy. These are squid proxies with no authentication

See screengrab for terminal output

image

As you can see we have no issue hitting https://cloudflareworkers.com

Also to further illustrate we have no issue hitting https://crates.io/api/v1/crates/cargo-generate either through the proxy

image

It's just wrangler. Doesn't seem to be proxy aware to me.

Hi Cloudflare - any progress on this?

https://github.com/cloudflare/wrangler/pull/1009 will fix this problem--reqwest 0.10.1 introduced proxy env var support for its HTTP client, which is exactly what we needed.

The following comment is related, namely when trying to install wrangler through _npm install @cloudflare/wrangler -g__ then calling _node install-wrangler.js_ fails due to the same problem. In specific the call to axios does not inherit the npm proxy settings. This should be fixed at the same time

This should be fixed with the latest release.

Was this page helpful?
0 / 5 - 0 ratings