Astrill Watchdog
/install astrill-watchdog
astrill-watchdog
Monitors Astrill VPN on Ubuntu (deb GUI package) and automatically restarts it when the StealthVPN tunnel drops.
What it does
Watches tun0 + ping every 30 seconds. On failure, performs a full Astrill restart:
pkill astrillkills the process tree (root-owned childrenasproxy/asovpncdie with the parent — no sudo needed)setsid /autostartrelaunches Astrill with the full desktop environment (DISPLAY,DBUS,WAYLAND_DISPLAY) so it can initialize its GUI/Wayland stack from a systemd service context- Astrill auto-connects to the last used server
On restart failure: logs a CRITICAL block, resumes checking next cycle. Never exits.
Requirements
- Ubuntu Linux, Astrill deb GUI package (
/usr/local/Astrill/astrill) ping,ip,pgrep,pkill,setsid(Ubuntu defaults)- Active desktop session (DISPLAY/DBUS/WAYLAND) — required for Astrill relaunch
Installation
bash setup.sh
No sudo. Installs the watchdog, creates a systemd user unit, and starts the service. Enabled on login automatically.
Usage
astrill-watchdog.sh start # start watchdog (also done by systemd on login)
astrill-watchdog.sh stop # stop watchdog
astrill-watchdog.sh status # health summary + last 20 log lines
astrill-watchdog.sh once # single health check + restart if needed, then exit
Files
| Path | Purpose |
|---|---|
~/.config/astrill-watchdog/astrill-watchdog.sh |
Watchdog script |
~/.config/systemd/user/astrill-watchdog.service |
Systemd user unit |
~/.local/state/astrill-watchdog/watchdog.log |
Log file (rotates at 5000 lines) |
~/.local/state/astrill-watchdog/watchdog.pid |
PID file |
Configuration
Edit the config block at the top of astrill-watchdog.sh:
CHECK_INTERVAL=30 # seconds between health checks
RECONNECT_WAIT=60 # seconds to wait after restart before health check
PING_HOST="8.8.8.8"
PING_COUNT=3
PING_TIMEOUT=3
LOG_MAX_LINES=5000
After editing, restart: systemctl --user restart astrill-watchdog.service
Diagnostics
# Live log tail
tail -f ~/.local/state/astrill-watchdog/watchdog.log
# Systemd journal
journalctl --user -u astrill-watchdog.service -n 30
# Full status summary
astrill-watchdog.sh status
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install astrill-watchdog - 安装完成后,直接呼叫该 Skill 的名称或使用
/astrill-watchdog触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Astrill Watchdog 是什么?
Monitor and auto-reconnect Astrill VPN on Ubuntu Linux (deb GUI package). Detects dropped connections via tun interface + ping, then reconnects using Astrill... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 453 次。
如何安装 Astrill Watchdog?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install astrill-watchdog」即可一键安装,无需额外配置。
Astrill Watchdog 是免费的吗?
是的,Astrill Watchdog 完全免费(开源免费),可自由下载、安装和使用。
Astrill Watchdog 支持哪些平台?
Astrill Watchdog 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Astrill Watchdog?
由 LittleJakub(@littlejakub)开发并维护,当前版本 v2.0.0。