Skip to content

Instantly share code, notes, and snippets.

@evmn
Created October 26, 2021 07:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evmn/a1141d982a4850854542ec53b051e47e to your computer and use it in GitHub Desktop.
Save evmn/a1141d982a4850854542ec53b051e47e to your computer and use it in GitHub Desktop.
function proxy_off(){
unset http_proxy
unset https_proxy
echo -e "已关闭代理"
}
function proxy_on() {
export no_proxy="localhost,127.0.0.1,192.168.1.1/24"
export http_proxy="http://127.0.0.1:8118"
export https_proxy=$http_proxy
echo -e "已开启代理"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment