每日备份 2026-06-10 12:57:13

This commit is contained in:
root-backup committed 2026-06-10 12:57:14 +08:00
1 parent fda2ccb8c2
commit 3d2e638c6a
244 files changed
+58890 -3

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
#!/bin/bash
# 代理切换脚本 - 按需启用/禁用代理
PROXY_FILE="/root/.openclaw/proxy/proxy-domains.json"
PROXY_ADDR="http://192.168.0.66:7890"
enable_proxy() {
echo "✅ 启用代理: "
export https_proxy=""
export http_proxy=""
export HTTPS_PROXY=""
export HTTP_PROXY=""
echo "已启用代理环境变量"
cat "" | grep 'pattern' | head -10
}
disable_proxy() {
echo "❌ 禁用代理(恢复直连)"
unset https_proxy http_proxy HTTPS_PROXY HTTP_PROXY
echo "已清除代理环境变量"
}
status() {
if [ -n "" ]; then
echo "🟢 代理已启用: "
else
echo "🔴 代理未启用(直连模式)"
fi
}
case "$1" in
enable) enable_proxy ;;
disable) disable_proxy ;;
status|*) status ;;
esac