There is a simpler workaround to preserve the http_proxy environment variable:
sudo -E apt-get install ...
However this preserves all other (potentially dangerous) environment variables. The point is that that environment variables which are safe and commonly needed in a sudo environment should be whitelisted by default.
There is a simpler workaround to preserve the http_proxy environment variable:
sudo -E apt-get install ...
However this preserves all other (potentially dangerous) environment variables. The point is that that environment variables which are safe and commonly needed in a sudo environment should be whitelisted by default.