agent-ssh-cli 0.3.4 → 0.3.5

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 CHANGED
@@ -91,6 +91,8 @@ AGENT_SSH_CONFIG=/path/to/config.json
91
91
  - `password` / `passwordRef` / `privateKey`: 认证方式,密码、密码引用、私钥三类认证只能保留一种
92
92
  - `port`: SSH 端口,默认 `22`
93
93
  - `passphrase`: 私钥口令,仅配合 `privateKey` 使用
94
+ - `socksProxy`: SOCKS5 代理地址,例如 `socks5://127.0.0.1:1080`;也可省略协议写成 `127.0.0.1:1080`
95
+ - `jumpHost`: 跳板机连接名,填写配置文件中另一台机器的 `name`
94
96
  - `pty`: 是否分配伪终端,默认 `false`,也可通过 `exec --pty` 临时开启
95
97
  - `allowedLocalPaths`: 额外允许上传或下载写入的本地路径
96
98
  - `commandWhitelist`: 命令白名单正则数组
@@ -113,12 +115,22 @@ AGENT_SSH_CONFIG=/path/to/config.json
113
115
  "username": "root",
114
116
  "password": "",
115
117
  "passwordRef": "agentsshcli:密码服务器",
118
+ "jumpHost": "jump-server",
116
119
  "commandBlacklist": [
117
120
  "(^|[;&|()\\s])rm(\\s|$)",
118
121
  "(^|[;&|()\\s])shutdown(\\s|$)",
119
122
  "(^|[;&|()\\s])reboot(\\s|$)"
120
123
  ]
121
124
  },
125
+ {
126
+ "name": "jump-server",
127
+ "host": "198.51.100.20",
128
+ "port": 22,
129
+ "username": "ubuntu",
130
+ "privateKey": "/path/to/jump_key",
131
+ "passphrase": "******",
132
+ "socksProxy": "socks5://127.0.0.1:1080"
133
+ },
122
134
  {
123
135
  "name": "密钥服务器",
124
136
  "host": "198.51.100.10",
@@ -6,6 +6,7 @@
6
6
  "username": "root",
7
7
  "password": "",
8
8
  "passwordRef": "agentsshcli:密码服务器",
9
+ "jumpHost": "跳板机",
9
10
  "allowedLocalPaths": [
10
11
  "./tmp"
11
12
  ],
@@ -15,6 +16,15 @@
15
16
  "(^|[;&|()\\s])reboot(\\s|$)"
16
17
  ]
17
18
  },
19
+ {
20
+ "name": "跳板机",
21
+ "host": "198.51.100.20",
22
+ "port": 22,
23
+ "username": "ubuntu",
24
+ "privateKey": "/path/to/jump_key",
25
+ "passphrase": "******",
26
+ "socksProxy": "socks5://127.0.0.1:1080"
27
+ },
18
28
  {
19
29
  "name": "密钥服务器",
20
30
  "host": "198.51.100.10",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-ssh-cli",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "基于 CLI 的 SSH 代理工具,按 ssh-mcp-server 的能力一一映射",
5
5
  "type": "module",
6
6
  "engines": {
@@ -27,10 +27,10 @@
27
27
  "build:native-package": "npm run build:native-bin && node scripts/build-native-package.js"
28
28
  },
29
29
  "optionalDependencies": {
30
- "@agent-ssh-cli/darwin-arm64": "0.3.4",
31
- "@agent-ssh-cli/darwin-x64": "0.3.4",
32
- "@agent-ssh-cli/linux-arm64": "0.3.4",
33
- "@agent-ssh-cli/linux-x64": "0.3.4",
34
- "@agent-ssh-cli/win32-x64": "0.3.4"
30
+ "@agent-ssh-cli/darwin-arm64": "0.3.5",
31
+ "@agent-ssh-cli/darwin-x64": "0.3.5",
32
+ "@agent-ssh-cli/linux-arm64": "0.3.5",
33
+ "@agent-ssh-cli/linux-x64": "0.3.5",
34
+ "@agent-ssh-cli/win32-x64": "0.3.5"
35
35
  }
36
36
  }