LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-16-2007, 02:04 AM   #1
havok1977
Member
 
Registered: Apr 2005
Distribution: Mint KDE on the Desktop, Debian on the Server
Posts: 66

Rep: Reputation: 15
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...
 
Old 10-18-2007, 09:06 AM   #2
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,453

Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
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";
 
Old 10-19-2007, 07:44 PM   #3
havok1977
Member
 
Registered: Apr 2005
Distribution: Mint KDE on the Desktop, Debian on the Server
Posts: 66

Original Poster
Rep: Reputation: 15
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.
 
Old 10-19-2007, 11:50 PM   #4
havok1977
Member
 
Registered: Apr 2005
Distribution: Mint KDE on the Desktop, Debian on the Server
Posts: 66

Original Poster
Rep: Reputation: 15
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
 
Old 04-03-2008, 11:35 AM   #5
Xorgroth
LQ Newbie
 
Registered: May 2006
Location: Idaho
Distribution: Debian, Arch, Kali
Posts: 28

Rep: Reputation: 15
There we go thanks.
 
Old 12-11-2012, 03:22 AM   #6
nighttrain
LQ Newbie
 
Registered: Dec 2012
Posts: 1

Rep: Reputation: Disabled
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"
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set up proxy in Apt-Get's apt.conf? rykel Fedora 9 10-09-2013 03:24 AM
proxy.pac command line syntax mfran2002 Linux - Security 1 03-26-2007 05:54 AM
proxy via http sharadshankar Linux - Software 2 02-15-2006 05:57 PM
apt-proxy and cron-apt - download once for the whole LAN Abject Debian 1 06-20-2004 01:53 PM
"socks5" -> "http" proxy protocol, or ssh tunnel to sock5 ? I'm beyond http p vmicho Linux - Networking 2 12-16-2003 05:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 10:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration