-
-
Save byeblogs/9cae6f6f3cd6b3aa36c506e800aedf49 to your computer and use it in GitHub Desktop.
This file contains 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