When working behind a corporate proxy server, one typically has to configure proxy settings for applications to reach the Internet. Clear Linux* OS has implemented an Autoproxy feature to try and eliminate manual configurations as much as possible. However, there are still some applications that cannot take full advantage of the Autoproxy feature due to their own ways of configuring proxy settings. This guide shows you how to configure proxy settings for some of the known applications manually.
You have installed Clear Linux OS on your host system.
For detailed instructions on installing Clear Linux OS on a bare metal system, visit the bare metal installation guide.
General proxy settings for many applications¶
First, apply these general proxy settings which should work for many applications. If they do not work for a specific application, such as the ones listed below, apply application-specific proxy settings as needed.
export http_proxy=http://<YOUR.HTTP-PROXY.URL:PORT> export https_proxy=http://<YOUR.HTTPS-PROXY.URL:PORT> export ftp_proxy=http://<YOUR.FTP-PROXY.URL:PORT> export socks_proxy=http://<YOUR.SOCKS-PROXY.URL:PORT> export no_proxy="<YOUR-DOMAIN>,localhost" export HTTP_PROXY=$http_proxy export HTTPS_PROXY=$https_proxy export FTP_PROXY=$ftp_proxy export SOCKS_PROXY=$socks_proxy export NO_PROXY=$no_proxy
User-specific, put them in
For all users, put them in
For the proxies to take effect, either source the file manually or log out and log back in.
Please refer the official Docker links on how to configure proxies:
git over SSH¶
Add the following to your
host github.com port 22 user git ProxyCommand connect-proxy -S <YOUR.SSH-PROXY.URL:PORT> %h %p
Though netcat is included with Clear Linux OS, it is not the BSD version, which is the one usually used to enable git over SSH.
autospec uses mock to do builds. Configure mock’s proxy settings with these steps:
Override the general mock configuration file with a custom one, otherwise your settings will get overwritten each time autospec is updated.
sudo mkdir -p /etc/mock sudo cp ~/clearlinux/projects/common/conf/clear.cfg /etc/mock/clear-custom.cfg
/etc/mock/clear-custom.cfgand add the highlighted lines.
... config_opts['use_bootstrap_container'] = False config_opts['http_proxy'] = '<YOUR.HTTP.PROXY.URL>:<PORT>' config_opts['https_proxy'] = '<YOUR.HTTPS.PROXY.URL>:<PORT>' config_opts['no_proxy'] = '<YOUR.DOMAIN>,192.168.0.0/16,localhost,127.0.0.0/8'