xray-relay-deploylisted
Install: claude install-skill superchaospc/xray-relay-deploy
# xray-relay Deploy & Operate
Install and operate the user's own relay script `xray_deploy.sh` (repo `superchaospc/xray-relay`, which the user maintains) on a remote VPS over SSH. The script is a single interactive bash menu with 16 functions. This skill installs it and drives any function **non-interactively** by feeding stdin over SSH.
This is the user's own infrastructure and their own script — operating it on their VPS is authorized. Treat node deletion, port changes, and uninstall as the only sensitive parts (see Destructive operations).
## How the script behaves (the mechanism that makes this work)
`xray_deploy.sh` loops a main menu forever, reading every answer through a `prompt_read` helper. The key fact: **when stdin hits EOF, `prompt_read` prints `输入流已结束,操作取消` and exits 0 cleanly.** So you can pipe a fixed sequence of answers; once they run out, the script exits on its own. There is no CLI/flag interface — stdin feeding is the only non-interactive path.
The script **requires root** (it exits if `id -u != 0`) and **systemd**. SSH must land as root. The user's `~/.ssh/config` aliases generally log in as root; if a target logs in as a non-root user, wrap the remote command in `sudo` and confirm with the user first.
## Step 1 — Pick the VPS target
Support both connection styles:
- **Preferred — SSH config alias.** The user keeps aliases in `~/.ssh/config` (e.g. `japan`, `vps1`, `germany`, `jabbar`). When the user names one, use `ssh <alias> ...`. If they say "my