agent-mobile/dsh-mobile-gateway1

dsh-mobile-gateway

DSH Web 宿主的局域网访问插件,绑定所有网卡并为配套移动端 App 提供基于 Token 鉴权的 /m/api 路由服务。

AI 分析

核心用途是允许局域网内的移动端设备安全访问 DSH 宿主。适合需要配合移动端配套 App 使用 DSH,且需要配置 Token 鉴权以保障安全的用户。

包名
dsh-mobile-gateway
版本
0.4.0
许可证
MIT
最近更新
2026年9月8日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:agent-mobile/dsh-mobile-gateway

3. 配置 token(见下),然后启动——不用任何 flag

dsh web

配置

token 必填,其余有默认值。两种配置途径:

途径一:profile patch~/.dsh/profiles/web/cordis.patch.yml):

- id: mobile-gateway
  config:
    token: 换成一个长随机串
    allowSettings: true        # 设置面(settings.*),默认 true
    allowCredentials: true     # 凭据面(credentials.*),默认 true
    extraMethods: []           # 追加放行的方法名,如 ['subagent.history']
    maxRequestBodyBytes: 750000000

途径二:Web GUI 设置卡(设置 → 插件配置 → mobile-gateway),改完热生效。

字段默认说明
token(必填)App 侧以 Authorization: Bearer 呈现;留空插件拒绝启动
allowSettingstrue放行 settings.describe/update/replace/mutate
allowCredentialstrue放行 credentials.describe/set/unset
extraMethods[]白名单之外追加放行的方法
maxRequestBodyBytes750000000/m/api 单请求体上限(须与 connection 行同步调大)