Otherwise, sudo resets the environment and loses the http_proxy environment variable.
Multi-user installation + proxy must use sudo -E
why not set the proxy on machine level in /etc/curlrc?
At least for my proxy setup, users must authenticate to the proxy with
their own user credentials. This can't be set system-wide.