APt proxy configuration

Dag Wieers dag at wieers.com
Fri Jun 2 08:48:47 PDT 2006


On Fri, 2 Jun 2006, Dag Wieers wrote:

> I'm having problems configuring apt to use a proxy. In fact here's the 
> executive summary :)
> 
> I have a local repository on one of my systems with all my updated RPMs. 
> All systems are told to use _that_ internal server for updates. But some 
> of the servers have internet access and therefor have the http_proxy 
> variable set by default.
> 
> Now the problem is, how do I tell apt to _not_ use the proxy when getting 
> packages from localhost or another hostname that's internal. Currently I 
> have to start apt-get like:
> 
> 	http_proxy="" apt-get update
> 
> But that's annoying and only works if all the repositories are internal. 
> But in some cases I use mixed internal and internet repositories.
> 
> I tried something like:
> 
> 	Acquire {
> 	        http {
> 			Proxy::apt.sw.be "http://proxy:8080";
> 	                Proxy::localhost "DIRECT";
> 			Proxy::yam "DIRECT";
> 	                Timeout "120";
> 	                Pipeline-Depth "5";
> 	
> 	                No-Cache "false";
> 	                Max-Age "86400";     // 1 Day age on index files
> 	                No-Store "false";    // Prevent the cache from storing archives
> 	        };
> 	};
> 
> in /etc/apt/apt.conf.d/proxy.conf

Putting:

	Acquire::http::Proxy "DIRECT";
	Acquire::http::Proxy::apt.sw.be "http://10.225.0.24:8000/";
	Acquire::http::Proxy::localhost "DIRECT";
	Acquire::http::Proxy::yam "DIRECT";

inside of /etc/apt/apt.conf doesn't work either it always uses http_proxy. 
So I think it is a bug.

Kind regards,
--   dag wieers,  dag at wieers.com,  http://dag.wieers.com/   --
[all I want is a warm bed and a kind word and unlimited power]



More information about the Apt-Rpm mailing list