cabal does not use JavaScript proxy autoconfiguration #738

Closed
bos opened this Issue May 24, 2012 · 7 comments

Comments

Projects
None yet
2 participants
Contributor

bos commented May 24, 2012

(Imported from Trac #748, reported by guest on 2010-10-13)

I've installed Haskell Platform 2010.2.0.0 and I cannot make any use of cabal since "cabal update" results in:

Config file path source is default config file.
Config file C:\Users\suszynskAppData?\Roaming\cabal\config not found.
Writing default configuration to
C:\Users\suszynsk`AppData?`\Roaming\cabal\config
Downloading the latest package list from hackage.haskell.org
cabal: failed

cabal -V returns:
cabal-install version 0.8.2
using version 1.8.0.6 of the Cabal library

I'm using Windows Vista Enterprise

GHC ver. 6.12.3

[I was unable to select correct versions of cabal and ghc in this "create new ticket" form]

Contributor

bos commented May 24, 2012

(Imported comment by @dcoutts on 2010-10-13)

Can you please attach the output of cabal update -v3 so we can see what is actually going on. As a first guess, do you perhaps need to use a proxy?

Contributor

bos commented May 24, 2012

(Imported comment by guest on 2010-10-13)

cabal update -v3

Downloading the latest package list from hackage.haskell.org
Sending:
GET /packages/archive/00-index.tar.gz HTTP/1.1
Host: hackage.haskell.org
User-Agent: cabal-install/0.8.2
Creating new connection to hackage.haskell.org
cabal: failed

Yes, I use proxy - I got this error when I tried to setup haskell environment in my work - unfortunately I cannot provide you with all information about my Internet connection and I also cannot chose not to use proxy.

Contributor

bos commented May 24, 2012

(Imported comment by @dcoutts on 2010-10-14)

Ok, so from the log we can see that it is trying to use a direct connection rather than a proxy. Cabal can use a proxy. It tries to use the same proxy as internet explorer (by looking in the registry) but you can also configure it using the environment variable http_proxy (or HTTP_PROXY).

BTW, if Windows Vista has a different standard way of configuring the proxy then perhaps we should look into it more. In XP there does not seem to be any system wide notion of a default proxy, individual applications like IE just store their own proxy settings.

Contributor

bos commented May 24, 2012

(Imported comment by guest on 2010-10-15)

I think it's not about system wide configuration. My company has more sophisticated proxy policy - all my browsers (IE, Chrome, Firefox) are configured to use autoconfiguration script, which is accessible in my intranet - this script does not define one proxy server and selects proxy based on some conditions. It appears that cabal is not using this script - as I see it's written in JS, so I suppose this bug will not be resolved as you probably aren't willing to add JS compiler to cabal - at least I wouldn't :) In the other hand this bug makes it more difficult for many companies to use haskell - at least for HP. Check out this: http://en.wikipedia.org/wiki/Proxy_auto-config

Contributor

bos commented May 24, 2012

(Imported comment by guest on 2010-10-15)

of course I meant JS interpreter, not compiler :P

Contributor

bos commented May 24, 2012

(Imported comment by @dcoutts on 2010-10-15)

If you're able to pick a static proxy then you can set it with the env var. I know some other corporate users do this even though their browsers use the funky JS method.

Yes, I don't intend to add a JS interpreter but in principle it's plausible that we could bind to the IE HTTP library and take advantage of its proxy support (which does use a JS interpreter). I'd probably accept a patch to do that.

Owner

gregorycollins commented Jan 28, 2013

We are not going to do Windows proxy auto-configuration, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment