dsh-relay-server

中文文档
0.1.0发布于 2026/11/03Apache-2.0ES Module

Zero-knowledge relay for dsh-relay-phone: no accounts, no database, routes end-to-end encrypted streams by device id.

原始使用文档
文档目录3 节
  1. Run
  2. TLS for phones
  3. License

dsh-relay-server

A zero-knowledge relay for dsh-relay-phone: it pairs a phone connection with your machine's outbound agent connection and forwards bytes, without accounts, a database, or the ability to read payloads.

Part of dsh-relay. Read the main README for the architecture and security model.

Run

KEY="$(openssl rand -hex 24)"
npx dsh-relay-server --port 8889 --agent-port 9000 --key "$KEY"

# or from a clone
node src/index.mjs --port 8889 --agent-port 9000 --key "$KEY"

Two listeners:

PortPurpose
--port (default 8889)Phones. Plain HTTP unless --tls-cert/--tls-key are given
--agent-port (default port + 1)Agents. Always TLS; the certificate is self-signed and generated on first run unless provided

State is limited to the generated agent certificate in --data-dir (default ~/.dsh-relay); everything else is in memory.

TLS for phones

Either terminate TLS in the relay itself:

node src/index.mjs --port 8443 --agent-port 9000 --key "$KEY" --tls-cert cert.pem --tls-key key.pem

or run the bundled terminator in front of a plain listener, with certificates from acme.sh/certbot:

node src/tls-terminator.mjs --port 8443 --upstream 8889 --cert-dir /etc/letsencrypt/live/example.com

The terminator reloads certificates when they change, so renewals need no restart.

License

Apache-2.0

版本与发布记录

dsh-relay-server 共发布 2 个版本,首次发布于 2026/11/03;过去 12 个月发布了 2 个版本。

版本发布日期距今
0.1.0latest2026/11/03今天
0.0.0-stage2026/11/03今天

关于 dsh-relay-server 的常见问题

dsh-relay-server 是什么?

对dsh-relay-phone进行零知识中继:无账号、无数据库、路由端到端按设备id加密流。

如何安装 dsh-relay-server?

在项目目录运行 npm install dsh-relay-server,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 dsh-relay-server,可以用 npx dsh-relay-server 直接运行。

dsh-relay-server 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/dsh-relay-server 是否存在。

dsh-relay-server 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

dsh-relay-server 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

dsh-relay-server 可以商用吗?

dsh-relay-server 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

dsh-relay-server 还在维护吗?

最新版本 0.1.0 发布于 2026/11/03(今天);至今共发布 2 个版本,其中过去 12 个月发布了 2 个;首次发布于 2026/11/03。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。