Install
openclaw skills install clash-vpnManage Clash VPN proxy service for accessing blocked websites like Google Play. Use when the user needs to (1) setup/configure VPN proxy, (2) update Clash proxy configuration, (3) start/stop VPN service, (4) test proxy connectivity, or (5) access blocked resources through proxy.
openclaw skills install clash-vpn此 Skill 用于管理 Clash VPN 代理服务,实现访问 Google Play 等被屏蔽的网站。
/usr/local/bin/clash/root/.config/clash/config.yamlscripts/clash-vpn.sh用户提供新的 Clash 配置时:
# 使用脚本更新配置
cat << 'EOF' | scripts/clash-vpn.sh update
port: 7890
socks-port: 7891
# ... 完整配置内容 ...
EOF
或直接写入文件:
cat > /root/.config/clash/config.yaml << 'EOF'
# 配置内容
EOF
scripts/clash-vpn.sh start
scripts/clash-vpn.sh test
scripts/clash-vpn.sh status
启动后使用以下代理地址:
| 类型 | 地址 |
|---|---|
| HTTP | http://127.0.0.1:7890 |
| SOCKS5 | socks5://127.0.0.1:7891 |
| Mixed | http://127.0.0.1:7893 |
# HTTP 代理
curl --proxy http://127.0.0.1:7890 https://play.google.com
# SOCKS5 代理
curl --proxy socks5://127.0.0.1:7891 https://play.google.com
参考 references/config-guide.md 获取配置模板和字段说明。
每次更新会自动创建备份:
/root/.config/clash/config.yaml.bak.YYYYMMDDHHMMSS
tail -f /var/log/clash.log
clash -t -f /root/.config/clash/config.yaml
scripts/clash-vpn.sh start # 启动
scripts/clash-vpn.sh stop # 停止
scripts/clash-vpn.sh restart # 重启
scripts/clash-vpn.sh status # 状态
scripts/clash-vpn.sh test # 测试连接
scripts/clash-vpn.sh update # 更新配置(从 stdin)
scripts/clash-vpn.sh help # 帮助