diff --git a/doc/install_and_upgrade.md b/doc/install_and_upgrade.md index 3d48908c7b..b88a4f5ce4 100644 --- a/doc/install_and_upgrade.md +++ b/doc/install_and_upgrade.md @@ -328,6 +328,17 @@ package-indices: http: http://mirrors.tuna.tsinghua.edu.cn/hackage/00-index.tar.gz ``` +## Using an http proxy + +To use `stack` behind a http proxy with ip address *IP* and port *PORT*, first set up an environment variable `http_proxy` and then run the stack command. _e.g._ + +``` +$ export http_proxy=IP:PORT +$ stack install +``` + +Note that on most operating systems, it is not mandatory for programs to follow the "system-wide" http proxy. Some programs, such as browsers, do honor this "system-wide" http proxy setting, while other programs, including bash, do not. That means configuring "http proxy setting" in your Control Panel (Windows) or System Preferences (Mac) would not result in `stack` traffic going through the proxy. + ## Upgrade There are essentially four different approaches to upgrade: