How can I install a kURL embedded cluster in an environment with an HTTP proxy?

I was under the impression that setting HTTP_PROXY and friends would be sufficient to stand up a kURL cluster in an environment requiring a proxy for egress.

I’ve tried the following

export HTTP_PROXY=kots-field-labs-squid-proxy:3128
export HTTPS_PROXY=kots-field-labs-squid-proxy:3128
curl -sSL | sudo bash

I have verified that the curl without the | bash returns the install script

with | bash -x, it stalls at this line:

++ curl -IfsSL
++ grep -i etag:
++ sed -r 's/.*"(.*)".*/\1/'

I think this will work better if proxy info is in curl config file

$ cat ~/.curlrc
proxy =
noproxy = localhost,,,,

Dmitriy’s curlrc answer works, or now I’ve found we probably need sudo -E:

The sudo has a handy argument -E or --preserve-env which will pass all your environment variables into the sudo environment.