Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function proxy () {
- UNSET=""
- PROXY="http://127.0.0.1:8080"
- PROXY_ENV=(http_proxy https_proxy ftp_proxy HTTP_PROXY HTTPS_PROXY FTP_PROXY)
- if [ $1 == on ]; then
- for i in $PROXY_ENV; do
- export $i=$PROXY
- done
- echo "proxy set"
- elif [ $1 == off ]; then
- for i in $PORXY_ENV; do
- unset $i
- done
- echo "proxy unset"
- fi
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement