提交 3dd54891 authored 作者: blu's avatar blu

feature: reverse debug tunnel

上级 ba72317f
...@@ -237,18 +237,38 @@ get value for specified key in cloud db. keys list is queried by /keys api ...@@ -237,18 +237,38 @@ get value for specified key in cloud db. keys list is queried by /keys api
##### description ##### description
*[NOT IMPLEMENTED]* get edge terminal hw & os infomation including resource usage of CPU, RAM, IO, DISK etc... *[NOT IMPLEMENTED]* get edge terminal hw & os infomation including resource usage of CPU, RAM, IO, DISK etc...
#### POST /debug #### POST /cmd
##### description ##### description
*[NOT IMPLEMENTED]* turn on/off debug tunnel send cmd to edge.
##### params currently implemented cmd: reversetun, debug:list_files, debug:record, debug:toggle_log
- sn: string ##### cmd: reversetun
- op: on|off ###### description
- ip: string. ip of public accessable host create reverse ssh tunnel between edge box and an sshd server
- port(optional): number. ssh port of the public accessable host. default 22. ###### params
- port_tun(optional): number. tunnuel port of the public accessable host. default 11222. none
- user: ssh user of the public accessable host ###### body
- password: ssh password of the public accessable host ```
##### return {
"target":"0017SRTC",
"metaType":"cmd",
"metaValue":"reversetun",
"data":{
"host":"47.56.83.236",
"user":"root",
"password":"Hz123456",
"port":9999
}
}
```
- target: edge box SN
- metaType: always being "cmd"
- metaValue: "reversetun
- data.host: cloud sshd host (with serving port on 22)
- data.user: cloud sshd user name
- data.password: cloud sshd password
- data.port: port on cloud sshd host, which will be created and reversed tunneling to the port 22 of the edge box.
###### return
- type: json - type: json
- example - example
``` ```
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论