@wwkit/sshproxy 1.0.17 → 1.0.18
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/bin/index.js +7 -0
- package/package.json +2 -2
package/bin/index.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { execSync } from 'node:child_process'
|
|
4
|
+
import { readFileSync } from 'node:fs'
|
|
4
5
|
import { ProxyManager } from '../src/ProxyManager.js'
|
|
5
6
|
import { SshCommands } from '../src/SshCommands.js'
|
|
6
7
|
import { clientAddr, loadConfig } from '../src/config.js'
|
|
7
8
|
|
|
9
|
+
const pkgVersion = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8')).version
|
|
10
|
+
|
|
8
11
|
const args = process.argv.slice(2)
|
|
9
12
|
const cmd = args[0] ?? 'help'
|
|
10
13
|
const sub = args[1] ?? ''
|
|
@@ -32,6 +35,9 @@ async function main() {
|
|
|
32
35
|
case 'upgrade':
|
|
33
36
|
execSync('npm install -g @wwkit/sshproxy@latest', { stdio: 'inherit' })
|
|
34
37
|
return
|
|
38
|
+
case 'version':
|
|
39
|
+
console.log(pkgVersion)
|
|
40
|
+
return
|
|
35
41
|
case 'help':
|
|
36
42
|
default:
|
|
37
43
|
printHelp()
|
|
@@ -305,6 +311,7 @@ function printHelp() {
|
|
|
305
311
|
sshproxy web on 启动 Web 管理页
|
|
306
312
|
sshproxy web off 关闭 Web 管理页
|
|
307
313
|
sshproxy upgrade 升级 sshproxy 自身(npm install -g @wwkit/sshproxy@latest)
|
|
314
|
+
sshproxy version 显示版本号
|
|
308
315
|
sshproxy help 显示本帮助
|
|
309
316
|
|
|
310
317
|
配置: ~/.config/sshproxy/config.json5
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wwkit/sshproxy",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"author": "bluesliu <langcai163@163.com>",
|
|
5
5
|
"description": "SOCKS5 proxy manager (client SSH tunnel / server remote), CLI + web UI",
|
|
6
6
|
"type": "module",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dotenv": "^16.4.5",
|
|
38
38
|
"json5": "^2.2.3",
|
|
39
39
|
"ssh2": "^1.16.0",
|
|
40
|
-
"@wwkit/shared": "1.0.
|
|
40
|
+
"@wwkit/shared": "1.0.17"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"jest": "^29.7.0"
|