-
-
Save yazdipour/58f972a8568c46edb23679de86dfec1d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# using: | |
# for set proxy: | |
# $ setproxy 127.0.0.1 8118 | |
# for unset: | |
# $ unsetproxy | |
function setproxy() { | |
export {http,https,ftp,HTTP,HTTPS}_proxy=http://$1:$2 | |
export no_proxy="localhost,127.0.0.1,master.cafecluster" | |
echo "Proxy variable(http,https,ftp) set to $1:$2" | |
} | |
function unsetproxy() { | |
unset {http,https,ftp,HTTP,HTTPS,no}_proxy | |
echo "Proxy variable(http,https,ftp) is unset!" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment