mirror of
https://github.com/wnlen/clash-for-linux.git
synced 2025-05-07 20:44:44 +08:00
20 lines
519 B
Bash
20 lines
519 B
Bash
function proxy_on() {
|
||
export http_proxy=http://127.0.0.1:7890
|
||
export https_proxy=http://127.0.0.1:7890
|
||
export no_proxy=127.0.0.1,localhost
|
||
export HTTP_PROXY=http://127.0.0.1:7890
|
||
export HTTPS_PROXY=http://127.0.0.1:7890
|
||
export NO_PROXY=127.0.0.1,localhost
|
||
echo -e "\033[32m[√] 已开启代理\033[0m"
|
||
}
|
||
|
||
# 关闭系统代理
|
||
function proxy_off(){
|
||
unset http_proxy
|
||
unset https_proxy
|
||
unset no_proxy
|
||
unset HTTP_PROXY
|
||
unset HTTPS_PROXY
|
||
unset NO_PROXY
|
||
echo -e "\033[31m[×] 已关闭代理\033[0m"
|
||
} |