Skip to content

Commit a6331c5

Browse files
committed
feat: 更改时序图
1 parent ff483a4 commit a6331c5

File tree

1 file changed

+21
-16
lines changed

1 file changed

+21
-16
lines changed

README.md

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,24 +40,29 @@ ReverseTcpProxy.create(Vertx.vertx(), "10.0.0.1", 8080)
4040

4141
```mermaid
4242
sequenceDiagram
43-
participant 用户 as 外部用户
44-
participant server as 服务端
45-
participant client as 客户端
46-
participant service as 内网服务(如Web服务)
47-
48-
client->>server: 1. 建立控制连接
49-
server-->>client: 2. 认证响应
50-
loop 心跳保持
51-
client->>server: 心跳包
52-
server-->>client: 心跳响应
43+
participant user as User
44+
participant ts as TunnelServer
45+
participant tc as TunnelClient
46+
participant rs as RealServer
47+
48+
tc->>ts: 1. 主动建立控制连接
49+
ts-->>tc: 2. 认证并响应
50+
loop 控制连接实现长连接
51+
tc-->>ts: 发送心跳
52+
ts-->>tc:响应心跳
5353
end
5454
55-
用户->>server: 3. 访问公网端口(HTTP请求)
56-
server->>client: 4. 通过隧道转发请求
57-
client->>service: 5. 请求内网服务
58-
service-->>client: 6. 服务响应
59-
client-->>server: 7. 返回隧道响应
60-
server-->>用户: 8. 返回最终结果
55+
user->>ts: 3. 发起请求
56+
ts-->>tc: 4. 通过控制连接发送:有新的请求进来,需要你主动与我建立数据连接
57+
tc->>ts: 5. 主动建立数据连接
58+
ts-->>tc: 6. 通过数据连接转发用户请求
59+
tc->>rs: 7. 请求真实服务
60+
rs-->>tc: 8. 服务响应
61+
tc-->>ts: 9. 隧道响应
62+
ts-->user: 10. 返回最终结果
63+
64+
65+
6166
```
6267

6368

0 commit comments

Comments
 (0)