Created
May 10, 2020 11:58
-
-
Save leonGravel/b48d8f7427de1ac65dc8dddfc563613c to your computer and use it in GitHub Desktop.
proxy_on
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
function proxy_off(){ | |
unset http_proxy | |
unset https_proxy | |
echo -e "已关闭代理" | |
} | |
function proxy_on() { | |
export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com" | |
export http_proxy="http://127.0.0.1:8118" | |
export https_proxy=$http_proxy | |
echo -e "已开启代理" | |
} | |
proxy_on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment