@wwkit/sshproxy 1.0.16 → 1.0.17

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.
Files changed (2) hide show
  1. package/bin/index.js +5 -0
  2. package/package.json +2 -2
package/bin/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ import { execSync } from 'node:child_process'
3
4
  import { ProxyManager } from '../src/ProxyManager.js'
4
5
  import { SshCommands } from '../src/SshCommands.js'
5
6
  import { clientAddr, loadConfig } from '../src/config.js'
@@ -28,6 +29,9 @@ async function main() {
28
29
  return handleDebug()
29
30
  case 'web':
30
31
  return handleWeb(sub)
32
+ case 'upgrade':
33
+ execSync('npm install -g @wwkit/sshproxy@latest', { stdio: 'inherit' })
34
+ return
31
35
  case 'help':
32
36
  default:
33
37
  printHelp()
@@ -300,6 +304,7 @@ function printHelp() {
300
304
  sshproxy web 启动 Web 管理页(后台,默认 http://127.0.0.1:1081)
301
305
  sshproxy web on 启动 Web 管理页
302
306
  sshproxy web off 关闭 Web 管理页
307
+ sshproxy upgrade 升级 sshproxy 自身(npm install -g @wwkit/sshproxy@latest)
303
308
  sshproxy help 显示本帮助
304
309
 
305
310
  配置: ~/.config/sshproxy/config.json5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wwkit/sshproxy",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
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.15"
40
+ "@wwkit/shared": "1.0.16"
41
41
  },
42
42
  "devDependencies": {
43
43
  "jest": "^29.7.0"