18

I am using Red Hat Enterprise Linux Server release 6.2, and I have only terminal access (no GUI). My company has a proxy auto-config script (PAC), and that is the only way to get internet connection.

I had no problem with my windows machine, since it was easy to set it up in IE->Tools->Internet Options. But in Linux, especially without a GUI, there seems to be no way to use this PAC script (I have been Googling for a while). By the way, the script is over 400 lines of Javascript.

Anyone knows how to solve this problem?

3
  • 2
    The PAC should return a proxy hostname/IP and port (which you should be able to pull out of the script yourself), which can be manually configured in proxy configurations that do not support PAC.
    – admdrew
    Commented Aug 4, 2014 at 19:03
  • The worst is that Ubuntu Desktop has this option, but only through GUI, and I either could not find a command line to use in a headless-server :(
    – lucasvc
    Commented Oct 17, 2014 at 15:39
  • 1
    @seemuch the PAC configures HTTP/S, FTP, GOPHER. What protocols are you trying to use from your GUI-less linux? What programs specifically? Commented Oct 17, 2014 at 15:53

3 Answers 3

2

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.

3
-2

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
3
  • Simple and effective Commented Mar 26, 2019 at 7:40
  • 7
    This only works if: 1. The PAC file doesn't change and 2. The PAC file is extremely simple and just lists one proxy. PAC files can have logic that's quite complicated.
    – einpoklum
    Commented Dec 8, 2019 at 15:26
  • 1
    That's not what PAC files are for. If this were to work, the PAC file would be redundant. Commented Oct 28, 2020 at 0:44
-7

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

1
  • 3
    Please provide more information for further detail. Commented Jun 16, 2020 at 19:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.