Duncan Coutts duncan.coutts at
Mon Feb 9 19:24:18 EST 2009

On Mon, 2009-02-09 at 16:25 +0000, Neil Mitchell wrote:
> Hi Duncan,
> >> I know that Cabal is currently looking very seriously at proxies etc,
> >> but is there any way to override the proxies that Cabal uses on a
> >> temporary basis? Many work environments have a fairly complex proxy
> >> script that handles things like VPN correctly, and it would be nice to
> >> override the Cabal proxy settings without changing them in IE.
> >
> > Ganesh has said the same thing. I'll accept a patch to have it consult
> > the same env var as unix does, overriding what it would look up in the
> > registry.
> I seem to remember that only a couple of days ago you said you'd stop
> asking Windows developers for patches :-)

Heh heh. You don't count ;-)

> I suspect Ganesh has very similar issues with going through a
> corporate firewall, those things aren't fun! I doubt I'll have time to
> look in to a patch, which is a real shame, since I suspect its not
> that hard...

As I understand it Ganesh is going to send a patch, so you can thank

> > I looked into using the info in the registry properly but it turns out
> > to be more than a little difficult, requiring a javascript interpreter
> > or linking to the MS HTTP library (which seems to need support in
> > ghc/cabal for linking to assemblies).
> Yeah, the HTTP proxy thing sucks, its unfortunate... However, surely
> one of the libraries on hackage should do it? And if one doesn't, one
> should be written? It seems like critical (if not highly annoying)
> functionality for Windows.

Of course one should be written :-)

Actually as I understand it, on Win2k3 and later it requires assemblies
to link to it properly, so that support will have to be added to
ghc/cabal first.

> Another alternative would be to have a flag to get Cabal to use wget
> for downloading, since wget can be set up with environment variables
> for proxies and absolutely every other configuration setting
> imaginable - so you don't have to keep tweaking in response to bizarre
> proxy servers.

Just consulting the right env var is easy. That's what Ganesh is going
to do.

Presumably your problem is that your proxy changes frequently, so you'd
have to keep updating this env var. I don't think wget does anything
special beyond consulting the http_proxy/HTTP_PROXY env vars.


More information about the cabal-devel mailing list