10

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.

7

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
  • 1
    Any hints how to do it in shell? I work on a server with no gui.
    – user812342
    Feb 5 '19 at 14:31
  • Where "system" menu? there are a link with screenshots? Jul 25 '19 at 15:03
  • 1
    Can I do it by terminal? Jul 25 '19 at 21:24
4

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 help.ubuntu.com/community/AptGet (under "APT configuration file method") and then it worked.

1

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 https://superuser.com/questions/323488/ubuntu-system-wide-proxy-auto-configuration-pac-script

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
  • Where "system" menu? there are a link with screenshots? Jul 25 '19 at 15:04
  • No news for UNUNTU 18 LTS? I have problems to submit the password, that seems confused with MSCHAPv2 login (PEAP with no certificate). Jul 29 '19 at 21:52

Your Answer

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