Skip to content

Instantly share code, notes, and snippets.

@3lpsy
Last active October 21, 2019 21:58
Show Gist options
  • Save 3lpsy/096603fdddaa06d66213305c1d24f287 to your computer and use it in GitHub Desktop.
Save 3lpsy/096603fdddaa06d66213305c1d24f287 to your computer and use it in GitHub Desktop.
export HTTP_PROXY_IP=x.x.x.x
export HTTP_PROXY_PORT=8080
function useproxy() {
export http_proxy="http://${HTTP_PROXY_IP}:${HTTP_PROXY_PORT}/"
export https_proxy="http://${HTTP_PROXY_IP}:${HTTP_PROXY_PORT}/"
}
function disableproxy() {
unset http_proxy
unset https_proxy
}
echo "No changes have been made yet. Use the 'useproxy' and 'disableproxy' commands to manage the proxy. You will need to do this for every terminal session."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment