Working behind a proxy

Looking for WET v3.1?

WET v4.0 is now the current version. There is a new location for the Getting started page in WET v3.1.

The following steps can be used for those working behind proxys that require authentication. All these methods will store your password in plain text, so use caution when doing this.

Setting the proxy for NPM installs

  1. Open a command prompt
  2. Run the following commands replacing "USERNAME", "PASSWORD", "PROXY_ADDRESS", and "PROXY_PORT" with your netork's information:
    1. npm config set proxy http://USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORT
    2. npm config set https-proxy http://USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORT

Setting the proxy for other tasks

Many plugins will also look for environmental variables of "HTTP_PROXY" and "HTTPS_PROXY" when they need to call out to the internet.
  1. You can set these variables with the value "http://USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORT" each session by calling:
    1. Windows Command Prompt: set http://HTTP_PROXY=USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORT
    2. Bash Shell: "export http://HTTP_PROXY=USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORT"
  2. To avoid doing this everytime, you can add these commands the the your console's "RC" file. If you are using the Git Bash Shell on Windows, you can add the export statements to the ".bashrc" in the root of your user profile ("C:\Users\USERNAME"). That file is run everytime you open a Git Bash session, so the environmental variables will be available from the command line. You may need to create that file with a text editor, since Windows doesn't allow creating files starting with a period in Windows Explorer.
Date modified: