0

This is a well-known bug that cabal can not handle proxies in format http://user:password@host:port format. On Haskell mailing list, someone suggested a patch to overcome this but that patch is now quite old.

It fails with following message

   Downloading the latest package list from hackage.haskell.org
   Warning: invalid http proxy uri:
   "http://user:pass@host:80/"
   Warning: proxy uri must be http with a hostname
   Warning: ignoring http proxy, trying a direct connection

Does anyone know how to make cabal use my proxy settings? Any indirect method will also do such as proxy bypassing etc.

A similar question is asked on superuser but it is not answered there.

Community
  • 1
  • 1
Dilawar
  • 5,438
  • 9
  • 45
  • 58

1 Answers1

1

I have got it working with polipo. My university uses http-proxy with authentication. In /etc/polipo/config you need to add these lines

parentProxy = "proxy.server.com:80"
parentAuthCredentials = "myusername:mypassword"

And export http_proxy=http://localhost:8123". And it worked like a charm.

Dilawar
  • 5,438
  • 9
  • 45
  • 58
  • i tried using polipo in any browser, it works fine for http links, but opening https links asks for authentication. please help – shivshnkr Sep 30 '13 at 11:53
  • I havn't tried it with https. Did u try exporting https_proxy to http://localhost:8123? If yes, then I am out of ideas. – Dilawar Oct 01 '13 at 09:16
  • i tried using all manual proxy settings of firefox to 127.0.0.1:8123, but in vain. It asks for authentication, with https browsing like gmail.com or github.com. Please see if it could work the same as http. Thanks in advance. I also have posted this question in forums: http://unix.stackexchange.com/questions/92971/https-authentication-problem-polipo – shivshnkr Oct 01 '13 at 10:51
  • Shooting in dark : Are u running pilipo as root? `sudo service polipo restart` should do it. And check if polipo is running successfully. I really cant reproduce it now for I am no longer on my campus where I was behind proxy. – Dilawar Oct 02 '13 at 11:05
  • I have been doing the whole thing as root, in fact there has also been issues before: http://www.mail-archive.com/polipo-users@lists.sourceforge.net/msg00859.html – shivshnkr Oct 02 '13 at 11:15