@@ -6,7 +6,7 @@ GT 是一个高性能的 WebSocket(s)/HTTP(s)/TCP 中转代理。
6
6
7
7
具有以下设计特点:
8
8
- 多进程+多线程架构
9
- - reload 过程中,保持转发可以成功。压力测试过程中 reload, 测试结果 0 error
9
+ - reload 过程中,保持转发可以成功。压力测试过程中 reload,测试结果 0 error
10
10
- 进程守护,工作进程崩溃自动重启
11
11
- 加载配置文件目录,可以同时启动多个服务端,客户端
12
12
- 注重性能,在保持跨平台和功能稳定的前提下,会尝试采用性能更高的技术方案
@@ -44,6 +44,22 @@ GT 是一个高性能的 WebSocket(s)/HTTP(s)/TCP 中转代理。
44
44
└─────────────┘ └─────────────┘ └─────────────┘
45
45
```
46
46
47
+ ## 下载
48
+
49
+ ### Github
50
+
51
+ 从 < https://github.com/ao-space/gt/releases > 选择合适的版本下载。
52
+
53
+ ### Docker 容器
54
+
55
+ 更多容器镜像信息可以从 < https://github.com/ao-space/gt/pkgs/container/gt > 获取。
56
+
57
+ ``` shell
58
+ docker pull ghcr.io/ao-space/gt:server-dev
59
+
60
+ docker pull ghcr.io/ao-space/gt:client-dev
61
+ ```
62
+
47
63
## 用法
48
64
49
65
``` shell
@@ -59,7 +75,7 @@ Commands:
59
75
60
76
Options:
61
77
-c, --config < CONFIG>
62
- Path to the config file or the directory containing the config files
78
+ Path to the config file or the directory contains the config files
63
79
64
80
-s, --signal < SIGNAL>
65
81
Send signal to the running GT processes
@@ -76,6 +92,46 @@ Options:
76
92
Print version
77
93
```
78
94
95
+ ### 配置文件
96
+
97
+ 配置文件可以通过 Web 管理后台编辑生成,推荐直接使用 Web 管理后台编辑。
98
+
99
+ ### 服务端
100
+
101
+ 使用默认配置运行,运行后可从日志获取 Web 管理后台地址,用浏览器打开后,进行配置项编辑:
102
+
103
+ ``` shell
104
+ gt server
105
+ ```
106
+
107
+ 通过指定配置文件运行:
108
+
109
+ ``` shell
110
+ gt server -c ./config.yml
111
+ ```
112
+
113
+ ### 客户端
114
+
115
+ 使用默认配置运行,运行后可从日志获取 Web 管理后台地址,用浏览器打开后,进行配置项编辑:
116
+
117
+ ``` shell
118
+ gt client
119
+ ```
120
+
121
+ 通过指定配置文件运行:
122
+
123
+ ``` shell
124
+ gt client -c ./config.yml
125
+ ```
126
+
127
+ ### 批量启动
128
+
129
+ 通过指定配置文件目录批量启动:
130
+
131
+ ``` shell
132
+ gt -c ./conf.d
133
+ ```
134
+
79
135
## 性能测试
80
136
81
137
### 第一组(MacOS环境+nginx测试)
@@ -246,127 +302,9 @@ Requests/sec: 41334.52
246
302
Transfer/sec: 5.09MB
247
303
```
248
304
249
- ## 运行
250
-
251
- ### Docker 容器运行
252
-
253
- 更多容器镜像信息可以从< https://github.com/ao-space/gt/pkgs/container/gt > 获取。
254
-
255
- ``` shell
256
- docker pull ghcr.io/ao-space/gt:server-dev
257
-
258
- docker pull ghcr.io/ao-space/gt:client-dev
259
- ```
260
-
261
- ## 编译
262
-
263
- ### 在 Ubuntu/Debian 上编译
264
-
265
- #### 安装依赖
266
-
267
- ``` shell
268
- apt-get update
269
- apt-get install make git gn ninja-build python3 python3-pip libgtk-3-dev gcc-aarch64-linux-gnu g++-aarch64-linux-gnu gcc-x86-64-linux-gnu g++-x86-64-linux-gnu -y
270
- ```
271
-
272
- #### 获取代码并编译
273
-
274
- 你可以选择从镜像或者官方获取 WebRTC 并编译 GT:
275
-
276
- ##### 从 ISCAS 镜像获取 WebRTC 并编译 GT
277
-
278
- 1 . 获取代码
279
-
280
- ``` shell
281
- git clone < url>
282
- cd < folder>
283
- ```
284
-
285
- 2. 编译
286
-
287
- ` ` ` shell
288
- make release
289
- ` ` `
290
-
291
- 编译后的可执行文件在 release 目录下。
292
-
293
- # #### 从官方获取 WebRTC 并编译 GT
294
-
295
- 1. 获取代码
296
-
297
- ` ` ` shell
298
- git clone < url>
299
- cd < folder>
300
- ` ` `
301
-
302
- 2. 从官方获取 WebRTC
303
-
304
- ` ` ` shell
305
- mkdir -p dep/_google-webrtc
306
- cd dep/_google-webrtc
307
- git clone https://webrtc.googlesource.com/src
308
- ` ` `
309
-
310
- 然后按照[这个链接中的步骤](https://webrtc.googlesource.com/src/+/main/docs/native-code/development/)检出构建工具链和许多依赖项。
311
-
312
- 3. 编译
313
-
314
- ` ` ` shell
315
- WITH_OFFICIAL_WEBRTC=1 make release
316
- ` ` `
317
-
318
- 编译后的可执行文件在 release 目录下。
319
-
320
- # ## 在 Ubuntu/Debian 上通过 Docker 编译
321
-
322
- # ### 安装依赖
323
-
324
- [安装 Docker](https://docs.docker.com/engine/install/)
325
-
326
- # ### 获取代码并编译
327
-
328
- 你可以选择从镜像或者官方获取 WebRTC 并编译 GT:
329
-
330
- # #### 从 ISCAS 镜像获取 WebRTC 并编译 GT
331
-
332
- 1. 获取代码
333
-
334
- ` ` ` shell
335
- git clone < url>
336
- cd < folder>
337
- ` ` `
338
-
339
- 2. 编译
340
-
341
- ` ` ` shell
342
- make docker_release_linux_amd64 # docker_release_linux_arm64
343
- ` ` `
344
-
345
- 编译后的可执行文件在 release 目录下。
346
-
347
- # #### 从官方获取 WebRTC 并编译 GT
348
-
349
- 1. 获取代码
350
-
351
- ` ` ` shell
352
- git clone < url>
353
- cd < folder>
354
- ` ` `
355
-
356
- 2. 从官方获取 WebRTC
357
-
358
- ` ` ` shell
359
- mkdir -p dep/_google-webrtc
360
- cd dep/_google-webrtc
361
- git clone https://webrtc.googlesource.com/src
362
- ` ` `
363
-
364
- 然后按照[这个链接中的步骤](https://webrtc.googlesource.com/src/+/main/docs/native-code/development/)检出构建工具链和许多依赖项。
365
-
366
- 3. 编译
305
+ ## 贡献者
367
306
368
- ` ` ` shell
369
- WITH_OFFICIAL_WEBRTC=1 make docker_release_linux_amd64 # docker_release_linux_arm64
370
- ` ` `
307
+ 感谢以下人员为项目做出的贡献:
371
308
372
- 编译后的可执行文件在 release 目录下。
309
+ - [ zhiyi] ( https://github.com/vyloy )
310
+ - [ jianti] ( https://github.com/FH0 )
0 commit comments