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
cabal
http://user:password@host:port
I have got it working with polipo. My university uses http-proxy with authentication. In /etc/polipo/config you need to add these lines
http-proxy
/etc/polipo/config
parentProxy = "proxy.server.com:80" parentAuthCredentials = "myusername:mypassword"
And export http_proxy=http://localhost:8123". And it worked like a charm.
http_proxy=http://localhost:8123"