Created
February 1, 2019 05:31
-
-
Save TerenceLiu98/6ee9c4a8c5d3632ee152205046573df7 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
#/bin/zsh | |
brew install privoxy | |
echo -n "<- Enter your http/https PORT ->" | |
read PORT | |
echo "PORT = $PORT" | |
echo "function proxy_off(){" >> ~/.bash_profile | |
echo " unset http_proxy" >> ~/.bash_profile | |
echo " unset https_proxy" >> ~/.bash_profile | |
echo " echo -e "已关闭代理"" ~/.bash_profile | |
echo "}\n" >> ~/.bash_profile | |
echo "function proxy_on() {" >> ~/.bash_profile | |
echo " export http_proxy='http://localhost:$PORT'" >> ~/.bash_profile | |
echo " export https_proxy='http://localhost:$PORT'" >> ~/.bash_profile | |
echo " echo -e "已开启代理"" >> ~/.bash_profile | |
echo "}" >> ~/.bash_profile | |
echo -n "done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment