No proxy flags for cabal under windows?

When I try to run cabal behind the proxy without setting HTTP_PROXY , I get

 C:\Users\joeschmo>cabal update Downloading the latest package list from hackage.haskell.org cabal: openTCPConnection: host lookup failure for "hackage.haskell.org" 

cabal -h does not provide a proxy option, and I cannot find information on how to configure the .cabal file to fix this.

For security reasons, setting HTTP_PROXY var var is probably a bad idea.

Any ideas? Trying to find a solution other than the command line:

 set HTTP_PROXY=http://username: password@proxyurl :port 
+6
source share
2 answers

The proxy server can be configured in ~/.cabal/config . Add this line to the configuration file:

 export http_proxy=http://${username}:${password}@${proxy_address}:${port} 
0
source

Modern cabal-install allows you to install http-transport either on the command line or in the .cabal/config file. If you set this transport to curl or wget , etc., then you can use any mechanisms you use to give them a proxy to give your cabal .

0
source

Source: https://habr.com/ru/post/957063/


All Articles