在 dsh 所在电脑打开终端,粘贴这一行并回车:
curl -fsSL https://dshost.me/install.sh | RELAY_HOST=dshost.me bash
脚本会:
如果不想用一键安装,也可以看下面的手动方法。
打开 dsh 所在电脑的终端(命令行),粘贴执行:
dsh plugin add dshost-plugin
插件源码(MIT):github.com/NoelJudeNoel/dshost-plugin。(也兼容旧版包名 @noeljude/dsh-remote-plugin,如果提示没有 pnpm,请先安装 pnpm)。
在 dsh 电脑上执行下面命令,打开配置文件:
nano ~/.dsh/profiles/web/cordis.patch.yml
在文件最下面添加(把 你的Token 换成刚才复制的):
- insert:
- id: dshost-agent
name: 'dshost-plugin'
config:
token: '你的Token'
relayUrl: 'wss://dshost.me/agent'
autoConnect: true
不会用 nano?按 Ctrl+O 保存,按 Ctrl+X 退出。
systemctl restart dsh.service
如果 dsh 不是用 systemd 启动的,就关掉重新运行 dsh web。
/portal/enter 链接加 &transport=webrtc(只走直连)或 &transport=relay(只走中继);实例卡片上的按钮效果相同。