dsh-remote-peers 0.3.138 → 0.3.165
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/README.zh-CN.md +13 -0
- package/index.mjs +1636 -41
- package/lib/client.js +1043 -127
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -39,6 +39,8 @@ Both machines run this plugin. On the machine you want to reach, the panel shows
|
|
|
39
39
|
- **Approvals and questions**: approve or answer here; the decision is relayed to the peer
|
|
40
40
|
- **Files**: preview PDF / Word / Excel / PPT / images / text in the right pane; downloads land in one shared local copy, and *Open*, *Download* and *Show in folder* all reuse it
|
|
41
41
|
- **Run state**: a remote session that is still working keeps showing its running state, including after you reopen the panel
|
|
42
|
+
- **Cross-network link**: the *跨域网关* card at the top of the panel joins an EasyTier virtual network, so two machines on different networks can reach each other. Enable it on one machine and send its **connection code** to the other; pasting that code there brings it in, and pasting the other machine's code links back the other way. The core runs with `--no-tun` (no admin rights, no virtual adapter) and is a separate step: download it first (~33 MB into `<stateDir>/easytier/`), then enable — or paste the other side's code to join without creating your own network. Each machine then forwards through a local port derived from the peer's virtual address (`127.0.0.1:37500+` the address's last octet), and a peer joined this way is an ordinary peer record, so sessions, attachments, files and approvals behave exactly as on a LAN. The peer list has no hub and no announcements: every node reads the core's peer table for the network's virtual addresses, derives the plug-in port as `37000 + last octet`, and derives the token from the network secret, so all nodes reach the same answer without telling each other anything.
|
|
43
|
+
- **One link mode at a time**: LAN and cross-network each have their own enable switch, both off on first launch (nothing listens until one is enabled). Only one can be on; whichever is on decides which peers appear in the list, the sidebar, sessions and attachments. Switching turns the other off but keeps its peer records, so switching back restores them.
|
|
42
44
|
|
|
43
45
|
## Security
|
|
44
46
|
|
|
@@ -49,7 +51,7 @@ Two gates, both on the gateway:
|
|
|
49
51
|
| Source CIDR allow-list | private ranges only: `127.0.0.0/8`, `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`, `::1/128` |
|
|
50
52
|
| Shared token | `x-dsh-lan-token` header or `Authorization: Bearer`, compared in fixed time |
|
|
51
53
|
|
|
52
|
-
The token is generated on first launch (43 chars) and can be **reset** from the panel; resetting invalidates the old token immediately, and peers that registered this machine elsewhere must be updated. The port is open on the LAN — on Windows, allow it on *Private* networks when the firewall asks.
|
|
54
|
+
The token is generated on first launch (43 chars) and can be **reset** from the panel; resetting invalidates the old token immediately, and peers that registered this machine elsewhere must be updated. Under the cross-network gateway the token is not local: it is derived from the network `secret`, so changing it means changing the secret and rebuilding the whole network — there is no reset there, only a new connection code. Anyone holding the code can derive every node's token: the code *is* the admission ticket. The port is open on the LAN — on Windows, allow it on *Private* networks when the firewall asks.
|
|
53
55
|
|
|
54
56
|
The gateway neither exposes DSH's source nor carries any local credential; the token stays inside the peer's Host process and is never handed to a browser.
|
|
55
57
|
|
package/README.zh-CN.md
CHANGED
|
@@ -44,6 +44,17 @@ dsh plugin --profile desktop remove dsh-remote-peers
|
|
|
44
44
|
- **文件**:右侧预览 PDF / Word / Excel / PPT / 图片 / 文本;下载落进同一份本机副本,
|
|
45
45
|
**打开**、**下载**、**显示文件位置** 共用这份副本
|
|
46
46
|
- **运行态**:对端仍在跑的会话会一直显示运行状态,重开面板后也在
|
|
47
|
+
- **跨域连接**:面板顶部的「跨域网关」用 EasyTier 组一张虚拟网,两端不在同一个局域网也能互连。
|
|
48
|
+
本机启用后把**连接码**发给对端,对端粘贴即接入;对端给的连接码粘进来,则反过来由本机接入对方。
|
|
49
|
+
内核以 `--no-tun` 运行,免管理员、不建虚拟网卡;内核是独立的一步(先「下载内核」约 33MB 到
|
|
50
|
+
`<stateDir>/easytier/`,再「启用」或直接用对方的连接码加入),之后每台机器一个转发口
|
|
51
|
+
(`127.0.0.1:37500+` 虚拟地址末三位的数)直连对方网关,接入的节点就是一条普通对端记录,会话、附件、文件、审批的
|
|
52
|
+
行为与局域网完全一致。
|
|
53
|
+
节点清单没有中心也没有公告:每个节点直接读内核的 peer 表拿到全网虚拟地址,插件端口=
|
|
54
|
+
`37000 + 末段`,口令=`network secret` 派生的固定串,所有节点算出同一套结果,谁都不必通知谁。
|
|
55
|
+
- **连接方式二选一**:局域网与跨域网关各有一个启用开关,初始都不启用(本机不监听)。同一时刻
|
|
56
|
+
只能启用一种;启用哪种,节点清单、左栏入口、会话与附件就只走这种方式下的节点。切换会关掉
|
|
57
|
+
另一种,但它的节点记录保留,切回来即可恢复。
|
|
47
58
|
|
|
48
59
|
## 安全
|
|
49
60
|
|
|
@@ -55,6 +66,8 @@ dsh plugin --profile desktop remove dsh-remote-peers
|
|
|
55
66
|
| 共享密钥 | `x-dsh-lan-token` 头或 `Authorization: Bearer`,固定时间比较 |
|
|
56
67
|
|
|
57
68
|
密钥首次启动自动生成(43 字符),面板里可**重置**;重置后旧密钥立刻失效,别处登记过本机的他端需要重填。
|
|
69
|
+
跨域网关方式下口令不来自本机,而是由网络 `secret` 派生:换口令等于换 secret、等于整张网重来,
|
|
70
|
+
所以那里没有「重置」,只有重新发连接码。拿到连接码的人可以推出全网任何节点的口令——连接码本身就是进网权。
|
|
58
71
|
端口对局域网开放,Windows 弹防火墙提示时请允许**专用网络**。
|
|
59
72
|
|
|
60
73
|
网关不暴露 DSH 源码,也不携带本机任何凭证;密钥只留在对端 Host 进程内,从不下发给浏览器。
|