Skip to content

Instantly share code, notes, and snippets.

@billmeyer
Last active December 30, 2020 11:20
Show Gist options
  • Save billmeyer/90ea2c7a69a254270b8b5e9d6b42121d to your computer and use it in GitHub Desktop.
Save billmeyer/90ea2c7a69a254270b8b5e9d6b42121d to your computer and use it in GitHub Desktop.
Setting PROXY variables for Go apps

Set https_proxy in Mac OS or Linux

To set the https_proxy environment variable in Mac OS or Linux:

Use the command specific to your shell. For example, in bash, use the export command, as in the example below:

export https_proxy=http://my.proxyserver.com:8080

To make this change persistent, add the command to the appropriate profile file for the shell. For example, in bash, add a line like example below to your .bash_profile or .bashrc file:

https_proxy=http://username:password@hostname:port
export $https_proxy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment