Problems with http and ftp proxies
I've run into a problem (which is not an emdebian bug hence a post
rather than a bug report). I list several possible solutions - this is
mainly for the benefit of anyone else who may have this problem.
At work I am behind a proxy for both HTTP and FTP. I had set up my
sources lists to use HTTP for external servers and FTP for internal
servers (local Debian mirror and private package repository).
I had the environment http_proxy setup to go through our proxy for
HTTP requests. As I didn't have any FTP urls I had no ftp_proxy
Today I did a fresh emsetup (lenny version) and it fails because FTP
is hardcoded into emsetup (no complaints about that - seems quite
reasonable) [my previous emsetups were done on my home network which
is, thankfully, proxyless].
So I setup ftp_proxy to use the proxy for FTP too. And, to prevent it
trying to use the proxy for the internal servers, no_proxy too.
And then I ran into bug #283718 (in apt) which is that no_proxy is
ignored for FTP proxies.
Solutions I can think of:
1) Fix the bug in apt locally - it's not too hard there's a simple
patch with the bugreport but the correct solution is explained in the
last comment. But this is Lenny and I'm not happy about modifying core
Debian packages like apt. Will lead to problems with security updates
2) Patch emdebian-tools to use HTTP. Don't like that either for
similar reasons though its less sensitive than apt.
3) Temporarilly set ftp_proxy just for running emsetup - and let it
complain about not being able to access the local repository [not
needed for emsetup anyway] - probably the simplest way out.
4) Switch my local mirror to HTTP [no_proxy _does_ work for HTTP URLs]
5) Install a local proxy server that forwards to the company one when
required and set the env variables to always use it. As we use
authentication will need to be something fairly heavyweight like squid
- I tried this a while back with tinyproxy and it doesn't do
authentication. Disadvantages: more work to setup, overhead.
Advantages: single point of control for proxy settings.
I think I'll try 4) first.