It is now recommended to install yarn via npm
npm install --global yarn
yarn --version
Configure a forward proxy
yarn config set proxy http://forward-proxy.example.com:3128
yarn config set https-proxy http://forward-proxy.example.com:3128
For older versions of Yarn, use this form instead
yarn config set httpProxy http://forward-proxy.example.com:3128
yarn config set httpsProxy http://forward-proxy.example.com:3128