mirror of
https://github.com/lwch/natpass.git
synced 2026-10-20 00:16:47 +00:00
GitBook: [#6] No subject
This commit is contained in:
@@ -5,3 +5,4 @@
|
||||
* [开发](dev/README.md)
|
||||
* [S1 - 代码结构](dev/s1-dai-ma-jie-gou.md)
|
||||
* [S2 - 通信协议](dev/s2-tong-xin-xie-yi.md)
|
||||
* [S3 - shell](dev/s3-shell.md)
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# S3 - shell
|
||||
|
||||
|
||||
|
||||
shell功能的主要流程如下:
|
||||
|
||||
1. 当用户点击终端页面的连接按钮后,会调用`/new`接口创建一个到远端的连接
|
||||
2. 在`/new`接口中会优先发送一个connect\_req消息来创建一个shell的连接
|
||||
3. 等待远端返回connect\_rep消息,若连接创建成功则返回该链接的ID
|
||||
4. 创建`/ws/<linkid>`的websocket连接
|
||||
5. 调用`/resize`接口调整pty设备的大小
|
||||
6. 开始转发数据
|
||||
Reference in New Issue
Block a user