Linux: how to set up proxy using pac script Linux: how to set up proxy using pac script linux linux

Linux: how to set up proxy using pac script


Proxy settings are implemented differently according to the software you use. On graphical desktop environments there are setup tools to configure a PAC; browsers like Chromium and Firefox detect the current desktop environment and import the proxy settings from there; Firefox also used to offer options for manual configuration of proxies and PAC URLs.

Integration of proxy options is not a priority for developers of text-only software packages. Each one of your tools will have to be manually configured to use a proxy. For example, APT must have a proxy configuration file at /etc/apt/apt.conf.d/.

Some packages may consult the environment variables http_proxy, https_proxy, et al, for proxy configuration.

You will need to read the documentation of the packages you will use in your GUI-less Linux to learn how to configure each of them to use the company's proxy. Some packages will use protocols and ports other than HTTP(S), FTP, GOPHER, which may be forbidden by the company's firewall.


I know this is an old thread.

In my case, I did the following steps

  1. Download the automatic configuration script and copy proxy address from that file.
  2. export "http_proxy" and "https_proxy" in bashrc using the proxy address get from step 1
  3. Reload bashrc file


use the PAC even in the terminal environment. it works.