NOirBRight/dsh-mobile--plugins-pairing ↗★ 3
@dsh-mobile/pairing
dsh-mobile pairing plugin (host half): daemon Curve25519 keypair, loopback /pair routes, LAN auth reverse proxy
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:NOirBRight/dsh-mobile#d4697c8454c476a258ed51b3d9917cb34a47cb8c&path:plugins/pairing说明文档
阅读完整 README ↗配置位置
正式版安装:
pnpm add github:NOirBRight/dsh-mobile-pairing#v0.1.6
然后把 @dsh-mobile/pairing 加入 profile 的 dsh.profile.bundles。包内的 cordis.patch.yml 会插入 Remote loader;默认配置面向日常 :3080:
- id: dsh-mobile-pairing
config:
dshHost: 127.0.0.1
dshPort: 3080
gatewayBind: 127.0.0.1
gatewayPort: 0
lab profile 使用 :3082 时,将该 profile 的配置覆盖为 dshPort: 3082 和独立的 gatewayPort。如果用户给实例配置了 hostName,手机优先显示该名称;DSH 目前没有向插件暴露 profile 名称的稳定接口,因此未配置时使用 dshPort · 系统主机名 自动区分同机实例。产品默认是一台 Host 一个 Gateway(gatewayPort: 0);手机只连接二维码里的 Public Endpoint,不会连到维护者机器。可选的 dsh-pair-mux 只跑在操作者自己的 Host 上回环,后端端口必须由环境变量显式给出。
| 键 | 默认 | 说明 |
|---|---|---|
| hostName | 未设置 | 用户设置的 Host 实例名称;未设置时显示 dshPort · 系统主机名,例如 3082 · noir-pc |
| appUrl | dsh-mobile://pair | Android QR / Deep Link 入口 |
| endpointMode | quick | GUI 只显示 quick(临时地址)和 relay(Relay);custom 仅作为旧配置兼容模式保留 |
| customEndpointUrl | 无 | 旧 operator overlay 兼容字段;不在当前 GUI 选项中显示 |
| relayUrl | 无 | relay 模式下必填,必须是无凭据的 WSS URL |
| gatewayBind / gatewayPort | 127.0.0.1 / 0 | Host Gateway 始终只允许回环绑定 |
| cloudflaredPath | cloudflared | 默认 Quick Tunnel 可执行文件 |
| quickTunnelCommand / quickTunnelArgs | cloudflared 默认 argv | 可换成 natapp / cpolar / frpc 等能打印 HTTPS URL 的命令 |
| quickTunnelEndpointPattern | trycloudflare.com | 从子进程日志里抽出 HTTPS 端点的正则 |
| stunUrls | [stun:stun.cloudflare.com:3478] | 仅 STUN;TURN/TURNS 会 fail loud |
| dshHost / dshPort | 127.0.0.1 / 3080 | 有界 Gateway 的 DSH 上游;lab 写成 3082 |
| codeTtlMs | 300000 | 首配 offer/code 有效期 |
Quick Tunnel 其它提供者
默认是 cloudflared。下面只是配置样例,不打进 APK,也不作为产品默认依赖。{gateway} 会换成回环 Gateway URL。
# frpc(仅旧 operator overlay 兼容;新用户使用 Relay)
quickTunnelCommand: frpc
quickTunnelArgs: ['-c', '/etc/frp/frpc.toml']
quickTunnelEndpointPattern: 'https://mobile\\.example\\.com\\b'
域名与 Relay
- 临时域名:endpointMode: quick 自动生成,不能手工固定。
- 旧 Custom Endpoint:仅为已有 operator overlay 保留兼容,不在当前 GUI 选项中展示;Relay 用户只选择两个预置 Relay 区域。
- Relay:选择 endpointMode: relay 并填写 relayUrl。官方区域和 Docker 自托管部署见 relay/deploy/README.md。每个 Client Instance 使用独立 Room。
- dsh.noirbright.top、dshweb.noirbright.top、dshapp.noirbright.top 等个人域名只能作为个人恢复基础设施,不是产品默认值或依赖。
严禁启动共享同一 DSH_HOME 的第二个 DSH 进程来承载本插件。
验证
npm test
npm run typecheck
npm run build
npm pack --dry-run