Skip to content

Commit 2f0ef00

Browse files
committed
feat: 添加protobuf依赖
(cherry picked from commit c784a94)
1 parent a6331c5 commit 2f0ef00

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,25 @@ sequenceDiagram
4545
participant tc as TunnelClient
4646
participant rs as RealServer
4747
48-
tc->>ts: 1. 主动建立控制连接
49-
ts-->>tc: 2. 认证并响应
48+
ts->>ts: 1. 启动ts,监听tcp控制端口
49+
tc->>tc: 2. 启动tc
50+
tc->>ts: 3. 与ts控制端口建立控制连接,并传入tcp数据端口
51+
ts-->>tc: 4. ts认证通过后,监听tcp数据端口,并返回响应
5052
loop 控制连接实现长连接
5153
tc-->>ts: 发送心跳
52-
ts-->>tc:响应心跳
54+
ts-->>tc: 响应心跳
5355
end
5456
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. 返回最终结果
57+
user->>ts: 5. 与数据端口建立连接,传输数据
58+
ts-->>tc: 6. 通过控制连接发送:有新的请求进来,需要你主动与我建立数据连接
59+
tc->>ts: 7. 主动建立数据连接
60+
ts-->>tc: 8. 通过数据连接转发用户请求
61+
tc->>rs: 9. 请求真实服务
62+
rs-->>tc: 10. 服务响应
63+
tc-->>ts: 11. 隧道响应
64+
ts-->user: 12. 返回最终结果
65+
6366
64-
6567
6668
```
6769

pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@
4040
<version>4.5.10</version>
4141
<scope>provided</scope>
4242
</dependency>
43+
<dependency>
44+
<groupId>com.google.protobuf</groupId>
45+
<artifactId>protobuf-javalite</artifactId>
46+
<version>4.30.2</version>
47+
<scope>provided</scope>
48+
</dependency>
4349
</dependencies>
4450

4551

0 commit comments

Comments
 (0)