Lets QClaw remotely control any Kylin/Feiteng ARM64 Linux computer.
From a new Windows machine, one command deploys everything. From then on, instant reconnect.
`
QClaw (Windows) TCP:12345 (JSON) Kylin ARM64
relay_client.py ──── exec/status ────────→ qt-relay (GUI)
←── stdout/stderr/exit ──── QProcess → bash
`
`
python scripts/relay_client.py
python scripts/relay_client.py
`
`
python scripts/relay_client.py
`
Credentials are saved to ~/.qclaw/kylin-relay.json automatically.
After first deploy, just use status and exec without credentials.
`
python scripts/relay_client.py 192.168.1.7 status
python scripts/relay_client.py 192.168.1.7 exec "df -h"
python scripts/relay_client.py 192.168.1.100 status
python scripts/relay_client.py 192.168.1.100 exec "uname -a"
`
```powershell
$url = "https://raw.githubusercontent.com/XinLongWang2001/kylin-relay/main/assets/qt-relay-arm64"
$dir = "$env:USERPROFILE\.qclaw\skills\kylin-relay\assets"
New-Item -ItemType Directory -Path $dir -Force | Out-Null
Invoke-WebRequest -Uri $url -OutFile "$dir\qt-relay-arm64"
```
```bash
curl -fsSL https://raw.githubusercontent.com/XinLongWang2001/kylin-relay/main/assets/qt-relay-arm64 \
-o ~/.qclaw/skills/kylin-relay/assets/qt-relay-arm64
```
Step by step what happens:
`
User: "部署麒麟 192.168.1.100"
Agent calls:
python scripts/relay_client.py 192.168.1.100 deploy --ssh-user root --ssh-pass MyPass123
The deploy command:
[1/4] SSH to Kylin, verify connectivity and architecture
[2/4] SCP the pre-compiled ARM64 binary (~/qt-relay-project/qt-relay)
[3/4] Check Qt5 libraries (auto-install if missing)
[4/4] Start service: nohup DISPLAY=:0 ./qt-relay --bind 0.0.0.0 &
→ Save credentials to ~/.qclaw/kylin-relay.json
`
Time: ~5 seconds (binary transfer). No compilation needed.
`
User: "连麒麟看看状态"
Agent: python scripts/relay_client.py 192.168.1.7 status
→ [OK] Kylin Relay online / system / user / hostname
User: "麒麟上看看磁盘"
Agent: python scripts/relay_client.py 192.168.1.7 exec "df -h"
User: "麒麟安装nginx"
Agent: python scripts/relay_client.py 192.168.1.7 exec "sudo apt install nginx -y"
`
~/.qclaw/kylin-relay.json:
`json
{
"targets": {
"192.168.1.7": {
"host": "192.168.1.7",
"ssh_user": "d2000",
"ssh_pass": "qilin@123",
"port": 12345,
"token": "qclaw-relay"
},
"192.168.1.100": {
"host": "192.168.1.100",
"ssh_user": "root",
"ssh_pass": "MyPass",
"port": 12345,
"token": "qclaw-relay"
}
},
"default": "192.168.1.7"
}
`
Agent should write to this file when deploying or when user provides new credentials.
| Path | Size | Purpose |
|------|------|---------|
| scripts/relay_client.py | 15KB | Main client: status, exec, deploy |
| scripts/config.template.json | 0.2KB | Config template |
| scripts/config.template.json | 0.2KB | Config template |
| scripts/pw_helper.py | 0.6KB | SSH password helper (Linux/macOS) |
| scripts/ssh_askpass.cmd | 0.03KB | SSH password helper (Windows) |
| SKILL.md | this file | Skill description |
(deploy step [3/4] auto-installs these via apt if missing)
TCP connection to port 12345, JSON messages separated by newline:
`
Client → {"type":"auth","token":"qclaw-relay"}
Server ← {"type":"auth_ok"}
Client → {"type":"exec","id":"abc123","command":"uname -a","timeout":30}
Server ← {"id":"abc123","type":"stdout","data":"Linux ...\n"}
Server ← {"id":"abc123","type":"exit","code":0}
`
共 1 个版本