ssh-net 26.10.32 → 26.10.33
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/CHANGELOG.md +10 -0
- package/libexec/commands/install.mjs +10 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,16 @@
|
|
|
7
7
|
GitHub Release(Actions 自动跑测试后 npm publish;跳号与 0.x 的完整
|
|
8
8
|
考据见 git 史)。
|
|
9
9
|
|
|
10
|
+
## [26.10.33] - 2026-10-03
|
|
11
|
+
|
|
12
|
+
### 修复:edge 端口预检按 link 形态收窄
|
|
13
|
+
|
|
14
|
+
- **默认零常驻形态不再预检转发口**:install 只有装 link 附加件时才绑
|
|
15
|
+
topology forwards 的端口;默认形态下他进程占用这些口(mb5 实案:
|
|
16
|
+
VS Code Remote 的自动端口转发在本机占着 1090/1080/5900)与本服务无关,
|
|
17
|
+
旧版预检却拒绝 install、挡住升级。`--with-link` 或 marker 在时预检照旧;
|
|
18
|
+
`[::1]:10022` 的 banner 检查不受影响(peer 按需路径仍由它保护)
|
|
19
|
+
|
|
10
20
|
## [26.10.32] - 2026-10-03
|
|
11
21
|
|
|
12
22
|
### 精简:VS Code 打标并入 routes,文档去演进考古层
|
|
@@ -42,13 +42,15 @@ function compNote(results) {
|
|
|
42
42
|
return `(组件对账:${parts.join('、')})`;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
/** edge 端口预检(纯读 + banner
|
|
46
|
-
|
|
45
|
+
/** edge 端口预检(纯读 + banner 判定),冲突抛错并报持有者。转发口只在
|
|
46
|
+
* link 附加件本次会装时才查:默认零常驻不绑这些口,他进程(如 VS Code
|
|
47
|
+
* 自动转发到本机的端口)占用与本服务无关。 */
|
|
48
|
+
async function precheckEdgePorts(ctx, linkOn) {
|
|
47
49
|
|
|
48
50
|
const { runner, paths, uid, topo } = ctx;
|
|
49
51
|
const jobPid = launchd.inspect(runner, uid, linkLabel(topo.core.alias)).pid;
|
|
50
52
|
|
|
51
|
-
for (const port of topo.forwards.map((f) => f.listenPort)) {
|
|
53
|
+
if (linkOn) for (const port of topo.forwards.map((f) => f.listenPort)) {
|
|
52
54
|
const c = classifyLocalPort(runner, port, jobPid);
|
|
53
55
|
if (c.kind === 'foreign') {
|
|
54
56
|
const who = runner.run('lsof', ['-nP', `-iTCP:${port}`, '-sTCP:LISTEN']).stdout.trim();
|
|
@@ -92,10 +94,13 @@ function parseLinkFlag(args) {
|
|
|
92
94
|
|
|
93
95
|
async function installEdge(ctx, args) {
|
|
94
96
|
const { topo, paths } = ctx;
|
|
97
|
+
const flag = parseLinkFlag(args);
|
|
98
|
+
// 本次 install 后 link 在不在:显式 flag 说了算,无 flag 按 marker
|
|
99
|
+
const linkOn = flag === true
|
|
100
|
+
|| (flag !== false && fs.existsSync(paths.linkEnabledFile));
|
|
95
101
|
// 预检纯读且在落任何产物之前:被拒时 bin/ 一个都不建
|
|
96
|
-
await precheckEdgePorts(ctx);
|
|
102
|
+
await precheckEdgePorts(ctx, linkOn);
|
|
97
103
|
|
|
98
|
-
const flag = parseLinkFlag(args);
|
|
99
104
|
const label = linkLabel(topo.core.alias);
|
|
100
105
|
const plistPath = path.join(paths.launchAgentsDir, plistFileName(label));
|
|
101
106
|
|
|
@@ -105,7 +110,6 @@ async function installEdge(ctx, args) {
|
|
|
105
110
|
writeFileAtomic(paths.linkEnabledFile, '1\n', 0o600);
|
|
106
111
|
}
|
|
107
112
|
if (flag === false) fs.rmSync(paths.linkEnabledFile, { force: true });
|
|
108
|
-
const linkOn = fs.existsSync(paths.linkEnabledFile);
|
|
109
113
|
|
|
110
114
|
// 基础 3 实体(sn-probe/route/ipv6);linkOn 才加第 4 实体与带机器名
|
|
111
115
|
// 软链。回拨通知与 link 秒切已内联在 sn-route 成功点(本地进程调用),
|