self-hosted-vpnlisted
Install: claude install-skill sunreview/claude-anti-ban-reality-hy2-vpn
# Self-hosted VPN (Reality + Hysteria2 + Clash Verge)
Bundled files (relative to this skill's directory):
- `scripts/install.sh`: the server installer. It is idempotent with `FORCE=1`, writes the client config to `/root/vpn-client/{clash.yaml,links.txt}`, and has a `RENDER_ONLY=1` mode for tests.
- `scripts/mac-check.sh`: the macOS client check (ports, per-node delay through the mihomo socket, exit IP).
Reply in the user's language. Treat node secrets (UUID, private and public keys, shortId, Hy2 passwords) as credentials. Never paste them into public places, commits, artifacts or external services.
## 0. Access: key-based SSH only
- Never type, store or use a root password, even if the user pastes one. Ask the user to run the following themselves in the terminal:
`ssh-copy-id -i ~/.ssh/id_ed25519.pub root@<IP>` (run `ssh-keygen -t ed25519` first if no key exists).
- After that, run commands with `ssh -o ConnectTimeout=15 -i ~/.ssh/id_ed25519 root@<IP> '...'`. A transient "banner exchange" timeout usually works on retry.
- If the password was shared in chat, recommend that the user run `passwd`. Offer to disable `PasswordAuthentication`, but only after key login is confirmed.
## 1. Preflight (read-only)
```bash
ssh ... 'cat /etc/os-release | head -3; uname -m; free -h | sed -n 2p; systemd-detect-virt;
ss -tlnp | grep -E ":(443|8443) "; ss -ulnp | grep ":443 ";
ufw status 2>/dev/null | head -3; systemctl is-active firewalld 2>/dev/null;
sysctl -n net.ipv4.tcp_cong