Skip to content

Instantly share code, notes, and snippets.

@jizusun
Created September 18, 2018 13:00
Show Gist options
  • Save jizusun/487153816aa722845ce98be5301be1a5 to your computer and use it in GitHub Desktop.
Save jizusun/487153816aa722845ce98be5301be1a5 to your computer and use it in GitHub Desktop.
function corp-proxy {
http_proxy="http://proxy.${1}.sap.corp:8080"
HTTP_PROXY=$http_proxy
https_proxy=$http_proxy
HTTPS_PROXY=$http_proxy
ftp_proxy=$http_proxy
FTP_PROXY=$http_proxy
no_proxy=".sap.corp, localhost"
NO_PROXY=$no_proxy
export http_proxy https_proxy HTTP_PROXY HTTPS_PROXY ftp_proxy FTP_PROXY no_proxy NO_PROXY
echo "http_proxy https_proxy HTTP_PROXY HTTPS_PROXY ftp_proxy FTP_PROXY no_proxy NO_PROXY"
echo "set to: $http_proxy"
echo "no_proxy, NO_PROXY set to: $no_proxy!"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment