clash-for-linux/scripts/functions.fish
2023-12-12 20:32:17 +08:00

21 lines
543 B
Fish
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 开启系统代理
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"
end
# 关闭系统代理
function proxy_off
set -e http_proxy
set -e https_proxy
set -e no_proxy
set -e HTTP_PROXY
set -e HTTPS_PROXY
set -e NO_PROXY
echo -e "\033[31m[×] 已关闭代理\033[0m"
end