dsh-remote-agent
其他 活跃维护

dsh-remote-agent

yhuan416/dsh-remote-agent

支持一键部署远程代理,自动连接管理端并完成注册,通过轻量守护进程维持长连接,提供稳定安全的远程访问通道。配置简单,无需复杂依赖,适合批量部署至边缘设备。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
7 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:yhuan416/dsh-remote-agent
git clone https://github.com/yhuan416/dsh-remote-agent.git
git clone git@github.com:yhuan416/dsh-remote-agent.git
README.md main

dsh-remote-agent

English | 中文

Deployment guide (Chinese): dsh-remote-hub/docs/DEPLOY.zh.md

Agent-side DSH host plugin, installed on every backend a hub should reach.

It publishes this process's launch token + identity to $DSH_HOME/remote-agent.json
(0600, atomic write) and removes the file on shutdown. The token is generated per
process and never persisted by dsh itself, so this file is the clean way for a hub to
mint the browser cookie without scraping journalctl.

{
  "version": 1,
  "hostname": "yhuan-n100",
  "pid": 1234,
  "startedAt": 1792400000000,
  "updatedAt": 1792400000000,
  "token": "<43-char launch token>",
  "webPort": 3080,
  "dshHome": "/home/yhuan/.dsh"
}

Install

# 1) place the package where the profile can resolve it
mkdir -p ~/.dsh/plugins
tar xzf dsh-remote-agent.tgz -C ~/.dsh/plugins
ln -sfn ~/.dsh/plugins/dsh-remote-agent ~/.dsh/profiles/node_modules/dsh-remote-agent
ln -sfn ~/.dsh/plugins/dsh-remote-agent ~/.dsh/profiles/web/node_modules/dsh-remote-agent

# 2) append to ~/.dsh/profiles/web/cordis.patch.yml
# - insert:
#     - id: remote-agent
#       name: dsh-remote-agent

# 3) restart dsh web; then check
cat ~/.dsh/remote-agent.json

Optional config: { file: "/custom/path/remote-agent.json" }.

Hub side pairs with tokenFile: { kind: ssh, host, user, path: ~/.dsh/remote-agent.json }.