Many programs that make use of the internet will check for the http_proxy or HTTP_PROXY environment variables before connecting. If they are present, they will use the proxy settings to connect through. Some programs may also use the HTTPS and FTP protocols, so we can set the proxy setting for them here too.
The last part allows any programs that execute using the sudo command to use the proxy environment variables while acting as the super user (most programs ...