Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

How do I configure apt to use a Proxy.pac file?

Writer Matthew Martinez

So I have a proxy.pac file at work (it doesn't have a username or password) it's just a simple .pac file.

I've gotten it to work with Chrome so I can surf the web, but apt-get and update do not work. How would I go about making this work?

Im on 10.10 btw.

3 Answers

In system --> preferences --> network proxy, enable Automatic proxy configuration and enter the URL of the PAC.

Then press apply system wide, and that should do the trick.

3

sudo apt-get update failed (on a fresh 11.04 VM) after following the instructions in DemonWareXT's answer (System -> Preferences -> Network Proxy).

I followed the instructions I found in (under "APT configuration file method") and then it worked.

On Ubuntu 12.04 or 14.04 with Unity, the following can break your Apt config.

In system --> preferences --> network proxy, enable Automatic proxy configuration >and enter the URL of the PAC.

Then press apply system wide, and that should do the trick.

The issue is that Apt has no concept of a "no_proxy" and so tries to send all traffic out this proxy. There are a couple ways to work around this, one is to create a specific override file for Apt telling it to use/ignore a proxy. Taken from

Acquire { Retries "0"; HTTP { Proxy ""; };
};

The other is after clicking Apply in the Network Proxy page, go edit the /etc/apt/apt.conf file as root sudo gedit /etc/apt/apt.conf and remove any mentions of proxy in this file.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy