LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Using apt behing a .pac http Proxy (https://www.linuxquestions.org/questions/debian-26/using-apt-behing-a-pac-http-proxy-592148/)

havok1977 10-16-2007 02:04 AM

Using apt behing a .pac http Proxy
 
Hello

After googling a while searching for a solution to this i found a couple of tips, but i am still unable to get it working properly.

First off, i am in my university WLAN, behind a .pac script http proxy; which works fine with my Firefox; and i configured something like this in my /etc/apt/apt.conf:

Code:

Acquire::http::Proxy "http://unidomain.something/proxy.pac";
However, whenever i try to update my package listings i get a bunch of 404 errors:

Code:

dfuentes@raziel:/etc/apt$ sudo aptitude update
Ign http://ftp.debian-unofficial.org testing Release.gpg
Ign http://moblock-deb.sourceforge.net lenny Release.gpg
Ign http://wine.sourceforge.net binary/ Release.gpg
Ign http://debian-multimedia.dfoell.org testing Release.gpg
Ign http://security.debian.org stable/updates Release.gpg
Ign http://ftp.debian.org stable Release.gpg
Ign http://ftp.debian-unofficial.org testing Release
Ign http://moblock-deb.sourceforge.net lenny Release
Ign http://debian-multimedia.dfoell.org testing Release
Ign http://wine.sourceforge.net binary/ Release
Ign http://ftp.debian-unofficial.org testing/main Packages
Ign http://moblock-deb.sourceforge.net lenny/main Packages
Ign http://wine.sourceforge.net binary/ Packages
Ign http://debian-multimedia.dfoell.org testing/main Packages
Ign http://ftp.debian.org testing Release.gpg
Ign http://security.debian.org testing/updates Release.gpg
Ign http://ftp.debian-unofficial.org testing/contrib Packages
Err http://moblock-deb.sourceforge.net lenny/main Packages
  404 Not Found
Err http://wine.sourceforge.net binary/ Packages
  404 Not Found
Err http://debian-multimedia.dfoell.org testing/main Packages
  404 Not Found
Ign http://ftp.debian.org experimental Release.gpg
Ign http://security.debian.org stable/updates Release
Ign http://ftp.debian-unofficial.org testing/non-free Packages
Ign http://ftp.debian.org stable Release
Ign http://security.debian.org testing/updates Release
Ign http://ftp.debian-unofficial.org testing/restricted Packages
Ign http://ftp.debian.org testing Release
Ign http://security.debian.org stable/updates/main Packages
Err http://ftp.debian-unofficial.org testing/main Packages
  404 Not Found
Ign http://ftp.debian.org experimental Release
Ign http://security.debian.org stable/updates/contrib Packages
Err http://ftp.debian-unofficial.org testing/contrib Packages
  404 Not Found
Ign http://ftp.debian.org stable/main Packages
Ign http://security.debian.org stable/updates/non-free Packages
Err http://ftp.debian-unofficial.org testing/non-free Packages
  404 Not Found
Ign http://ftp.debian.org stable/contrib Packages
Ign http://security.debian.org testing/updates/main Packages
Err http://ftp.debian-unofficial.org testing/restricted Packages
  404 Not Found
Ign http://ftp.debian.org stable/non-free Packages
Ign http://security.debian.org testing/updates/contrib Packages
Ign http://ftp.debian.org testing/main Packages
Ign http://security.debian.org testing/updates/non-free Packages
Ign http://ftp.debian.org testing/contrib Packages
Err http://security.debian.org stable/updates/main Packages
  404 Not Found
Ign http://ftp.debian.org testing/non-free Packages
Err http://security.debian.org stable/updates/contrib Packages
  404 Not Found
Ign http://ftp.debian.org experimental/main Packages
Err http://security.debian.org stable/updates/non-free Packages
  404 Not Found
Ign http://ftp.debian.org experimental/contrib Packages
Err http://security.debian.org testing/updates/main Packages
  404 Not Found
Err http://security.debian.org testing/updates/contrib Packages
  404 Not Found
Ign http://ftp.debian.org experimental/non-free Packages
Err http://ftp.debian.org stable/main Packages
  404 Not Found
Err http://security.debian.org testing/updates/non-free Packages
  404 Not Found
Err http://ftp.debian.org stable/contrib Packages
  404 Not Found
Err http://ftp.debian.org stable/non-free Packages
  404 Not Found
Err http://ftp.debian.org testing/main Packages
  404 Not Found
Err http://ftp.debian.org testing/contrib Packages
  404 Not Found
Err http://ftp.debian.org testing/non-free Packages
  404 Not Found
Err http://ftp.debian.org experimental/main Packages
  404 Not Found
Err http://ftp.debian.org experimental/contrib Packages
  404 Not Found
Err http://ftp.debian.org experimental/non-free Packages
  404 Not Found
Reading package lists... Done


Does anyone know of a workaround for this? Help will be appreciated...

Guttorm 10-18-2007 09:06 AM

Hi

I think it's not possible to setup apt to use a pac file like that. But fortunately .pac files are usually very simple text files.

Take a look at http://en.wikipedia.org/wiki/Proxy_auto-config for an explanation of .pac files. Then you can simply download it, and take a look.

wget http://unidomain.something/proxy.pac

(or you can probably just open it with Firefox)

If you find something like
function FindProxyForURL(url, host) { return "PROXY proxy.foo.com:8080; DIRECT"; }

Put this in your /etc/apt/apt.conf file:
Acquire::http::Proxy "http://proxy.foo.com:8080";

havok1977 10-19-2007 07:44 PM

Thanks for your tips, i did try it and sadly it didnt work for me; i am in the exact same situation as before, maybe here in campus they have some kind of filter in the proxy to the debian mirrors?

Oh well, i wanted to take advantage of the broadband for my OS updates.

havok1977 10-19-2007 11:50 PM

Update: the tips provided by Guttorm actually work, i had to physically move to another location and now my aptitude is able to update package lists and download actual packages.

I find it very weird that this particular thing had anything to do with signal strenght; but well, i am happily installing now ;)

Xorgroth 04-03-2008 11:35 AM

There we go thanks.

nighttrain 12-11-2012 03:22 AM

Hello, it works also for me. But another issue is i cant e.g ping google.com... Its logical because i set the proxy for apt for use. But how to set it to general terminal? I treid to set the same proxy in this way, but it not work:

export http_proxy="proxy address"
export ftp_proxy="proxy address"


All times are GMT -5. The time now is 07:26 AM.