17

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?

seemuch
  • 633
  • 3
  • 8
  • 19
  • 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 Aug 04 '14 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 Oct 17 '14 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? – Fabio A. Correa Oct 17 '14 at 15:53

3 Answers3

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.

Fabio A. Correa
  • 1,968
  • 1
  • 17
  • 26
-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
Biju
  • 83
  • 5
-7

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