Created
June 10, 2018 10:20
-
-
Save ysrotciv/2fcad712538dc1002a750e313553a741 to your computer and use it in GitHub Desktop.
http_proxy switch functions
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
| function proxy_off(){ | |
| unset http_proxy | |
| unset https_proxy | |
| brew services stop polipo | |
| echo -e "已关闭代理" | |
| } | |
| function proxy_on() { | |
| export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com" | |
| export http_proxy="http://127.0.0.1:8123" | |
| export https_proxy=$http_proxy | |
| brew services start polipo | |
| echo -e "已开启代理" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment