title: cabal can't use http proxy
body: <p>My Linux(redhat6) server has to use http proxy to connect to outside world. While it works for other things like wget, it doesn't work for cabal. </p>
  
  <pre><code>cabal update -v3
  </code></pre>
  
  <p>shows errors like this:</p>
  
  <blockquote>
    <p>407 - proxy authentication required cabal: Failed to download
    <a href="http://hackage.haskell.org/packages/archive/00-index.tar.gz" rel="nofollow noreferrer">http://hackage.haskell.org/packages/archive/00-index.tar.gz</a> :
    ErrorMisc "Unsucessful HTTP code: 407"</p>
  </blockquote>
  
  <p>I tried to change http_proxy environment variable to format like http:// user: passwd at proxy:port, but it doesn't work either.</p>
  
  <p>The same problem has been asked <a href="https://stackoverflow.com/questions/9310218/cabal-fails-with-proxy-with-authentication">here</a></p>
  
  <p>But I'm not allowed use a proxy server like polipo, is there any other way to make cabal work behind a proxy?</p>