🎨 Style: change function name
This commit is contained in:
parent
0c119aaba5
commit
19570a867e
54
start.sh
54
start.sh
|
@ -179,35 +179,35 @@ fi
|
||||||
|
|
||||||
# Output Dashboard access address and Secret
|
# Output Dashboard access address and Secret
|
||||||
echo ''
|
echo ''
|
||||||
echo -e "Clash Dashboard 访问地址: http://<ip>:9090/ui"
|
echo -e "Clash Dashboard 访问地址: http://127.0.0.1:9090/ui"
|
||||||
echo -e "Secret: ${Secret}"
|
echo -e "Secret: ${Secret}"
|
||||||
echo ''
|
echo ''
|
||||||
|
|
||||||
# 添加环境变量(root权限)
|
# # 添加环境变量(root权限)
|
||||||
cat>/etc/profile.d/clash.sh<<EOF
|
# cat>/etc/profile.d/clash.sh<<EOF
|
||||||
# 开启系统代理
|
# # 开启系统代理
|
||||||
function proxy_on() {
|
# function proxy_on() {
|
||||||
export http_proxy=http://127.0.0.1:7890
|
# export http_proxy=http://127.0.0.1:7890
|
||||||
export https_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 no_proxy=127.0.0.1,localhost
|
||||||
export HTTP_PROXY=http://127.0.0.1:7890
|
# export HTTP_PROXY=http://127.0.0.1:7890
|
||||||
export HTTPS_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 NO_PROXY=127.0.0.1,localhost
|
||||||
echo -e "\033[32m[√] 已开启代理\033[0m"
|
# echo -e "\033[32m[√] 已开启代理\033[0m"
|
||||||
}
|
# }
|
||||||
|
|
||||||
# 关闭系统代理
|
# # 关闭系统代理
|
||||||
function proxy_off(){
|
# function proxy_off(){
|
||||||
unset http_proxy
|
# unset http_proxy
|
||||||
unset https_proxy
|
# unset https_proxy
|
||||||
unset no_proxy
|
# unset no_proxy
|
||||||
unset HTTP_PROXY
|
# unset HTTP_PROXY
|
||||||
unset HTTPS_PROXY
|
# unset HTTPS_PROXY
|
||||||
unset NO_PROXY
|
# unset NO_PROXY
|
||||||
echo -e "\033[31m[×] 已关闭代理\033[0m"
|
# echo -e "\033[31m[×] 已关闭代理\033[0m"
|
||||||
}
|
# }
|
||||||
EOF
|
# EOF
|
||||||
|
|
||||||
echo -e "请执行以下命令加载环境变量: source /etc/profile.d/clash.sh\n"
|
# echo -e "请执行以下命令加载环境变量: source /etc/profile.d/clash.sh\n"
|
||||||
echo -e "请执行以下命令开启系统代理: proxy_on\n"
|
echo -e "请执行以下命令开启系统代理: enable_proxy\n"
|
||||||
echo -e "若要临时关闭系统代理,请执行: proxy_off\n"
|
echo -e "若要临时关闭系统代理,请执行: disable_proxy\n"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user