From 4793204926b6bedd9d5bf027b5c03bc32075a061 Mon Sep 17 00:00:00 2001 From: arraykeys Date: Sun, 23 Apr 2023 19:45:05 +0800 Subject: [PATCH] update --- README.md | 10 ++++++++-- README_ZH.md | 10 ++++++++-- docs/manual/manual.md | 10 ++++++++-- docs/manual/zh/manual.md | 10 ++++++++-- docs/sitemap.xml | 10 +++++----- docs/tags/cdn/index.html | 4 ++-- docs/tags/cdn/index.xml | 4 ++-- docs/tags/index.xml | 2 +- 8 files changed, 42 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 8761192..209f2c5 100644 --- a/README.md +++ b/README.md @@ -556,7 +556,8 @@ If there is a upstream agent, then refer to the above tutorial to set the upstre `proxy http -t tcp -p :80,:443 -T tls -P "2.2.2.2:33080" -C proxy.crt -K proxy.key` Note: -The DNS resolution result of the server where the proxy is located cannot be affected by the custom resolution, otherwise it will be infinite loop. The proxy proxy should specify the `--dns-address 8.8.8.8` parameter. +The DNS resolution result of the server where the proxy is located cannot be affected by the custom resolution, +otherwise it will be infinite loop. The proxy proxy should specify the `--dns-address 8.8.8.8` parameter. ### 1.10 HTTP(S) Transparent Proxy This mode needs to have a certain network foundation. If the related concepts are not understood, please search for it yourself. @@ -2016,7 +2017,12 @@ There are two reporting modes, which can be specified by the `--traffic-mode` pa For each connection that has been established, the proxy will `timely` report the traffic generated by this connection to this` --traffic-url` address. `Timing` defaults to 5 seconds, and you can modify` Timing` to the appropriate number of seconds via the parameter `--traffic-interval`. -The traffic reporting function combined with the above API authentication function can control the user's traffic usage in real time. The traffic is reported to the interface. The interface writes the traffic data to the database, and then the authentication API queries the database to determine the traffic usage and determine whether the user can be successfully authenticated. +3. Report in `fast` global mode + By default, if the API can't handle high concurrency report access, you can use the fast global mode, + Use the parameter `--fast-global` to open, this parameter is only valid when `--traffic-mode=fast`. In fast global mode, for a `--traffic-url`, + no matter how many concurrent connections there are, only have one reporter, and the reporting interval is 5 seconds. + In this mode, the reporting request method is `POST`, `Content-Type` is `application/json`, the post body data is `JSON Array`, example: `[{},{}]`, the keys of object in the array are same with the following `Please parameter description`. +4. The traffic reporting function combined with the above API authentication function can control the user's traffic usage in real time. The traffic is reported to the interface. The interface writes the traffic data to the database, and then the authentication API queries the database to determine the traffic usage and determine whether the user can be successfully authenticated. The following is a complete URL request example: diff --git a/README_ZH.md b/README_ZH.md index a30e3a5..fe3a475 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -2197,8 +2197,14 @@ proxy会把连接使用的流量上报到这个地址,具体情况是,proxy发 当连接释放时,proxy会把此次连接使用的流量上报到这个`--traffic-url`地址. 2. `fast`快速模式上报 对已经建立的每个连接,proxy会`定时`把这个连接产生的流量上报到这个这个`--traffic-url`地址. - `定时`默认是5秒,可以通过参数`--traffic-interval`修改`定时`为合适的秒数。 - 流量上报功能结合上面的API认证功能可以实现实时控制用户的流量使用,流量统计,流量限制;流量上报到接口,接口把流量数据写入数据库,然后认证API查询数据库判断用户或者IP流量使用情况,用来确定用户是否可以认证成功. + `定时`默认是5秒,可以通过参数`--traffic-interval`修改`定时`为合适的秒数。 + 默认情况下,快速上报是单个TCP链接维度,定时上报的,也就是说有1000个TCP链接,那么就会有1000的并发上报 +3. `fast`快速模式全局上报 + 默认情况下,如果API接口处理并发能力不足,可以使用fast全局模式, + 使用参数`--fast-global`开启,此参数只有`--traffic-mode=fast`的时候有效。fast全局模式,针对一个`--traffic-url`, + 无论多少并发连接,只会开启一个定时上报,`定时`是5秒。 + 此模式下,上报请求方式是`POST`,`Content-Type`是`application/json`,数据是`JSON 数组`,示例:`[{},{}]`,数组里面的对象字段和下面的`请求参数说明`里面一致。 +4. 流量上报功能结合上面的API认证功能可以实现实时控制用户的流量使用,流量统计,流量限制;流量上报到接口,接口把流量数据写入数据库,然后认证API查询数据库判断用户或者IP流量使用情况,用来确定用户是否可以认证成功. 下面是一个完整的URL请求实例: diff --git a/docs/manual/manual.md b/docs/manual/manual.md index da3d68b..cb16bd9 100644 --- a/docs/manual/manual.md +++ b/docs/manual/manual.md @@ -365,7 +365,8 @@ If there is a upstream agent, then refer to the above tutorial to set the upstre `proxy http -t tcp -p :80,:443 -T tls -P "2.2.2.2:33080" -C proxy.crt -K proxy.key` Note: -The DNS resolution result of the server where the proxy is located cannot be affected by the custom resolution, otherwise it will be infinite loop. The proxy proxy should specify the `--dns-address 8.8.8.8` parameter. +The DNS resolution result of the server where the proxy is located cannot be affected by the custom resolution, +otherwise it will be infinite loop. The proxy proxy should specify the `--dns-address 8.8.8.8` parameter. ### 1.10 HTTP(S) Transparent Proxy This mode needs to have a certain network foundation. If the related concepts are not understood, please search for it yourself. @@ -1825,7 +1826,12 @@ There are two reporting modes, which can be specified by the `--traffic-mode` pa For each connection that has been established, the proxy will `timely` report the traffic generated by this connection to this` --traffic-url` address. `Timing` defaults to 5 seconds, and you can modify` Timing` to the appropriate number of seconds via the parameter `--traffic-interval`. -The traffic reporting function combined with the above API authentication function can control the user's traffic usage in real time. The traffic is reported to the interface. The interface writes the traffic data to the database, and then the authentication API queries the database to determine the traffic usage and determine whether the user can be successfully authenticated. +3. Report in `fast` global mode + By default, if the API can't handle high concurrency report access, you can use the fast global mode, + Use the parameter `--fast-global` to open, this parameter is only valid when `--traffic-mode=fast`. In fast global mode, for a `--traffic-url`, + no matter how many concurrent connections there are, only have one reporter, and the reporting interval is 5 seconds. + In this mode, the reporting request method is `POST`, `Content-Type` is `application/json`, the post body data is `JSON Array`, example: `[{},{}]`, the keys of object in the array are same with the following `Please parameter description`. +4. The traffic reporting function combined with the above API authentication function can control the user's traffic usage in real time. The traffic is reported to the interface. The interface writes the traffic data to the database, and then the authentication API queries the database to determine the traffic usage and determine whether the user can be successfully authenticated. The following is a complete URL request example: diff --git a/docs/manual/zh/manual.md b/docs/manual/zh/manual.md index a7248e9..cfa5cdf 100644 --- a/docs/manual/zh/manual.md +++ b/docs/manual/zh/manual.md @@ -1976,8 +1976,14 @@ proxy会把连接使用的流量上报到这个地址,具体情况是,proxy发 当连接释放时,proxy会把此次连接使用的流量上报到这个`--traffic-url`地址. 2. `fast`快速模式上报 对已经建立的每个连接,proxy会`定时`把这个连接产生的流量上报到这个这个`--traffic-url`地址. - `定时`默认是5秒,可以通过参数`--traffic-interval`修改`定时`为合适的秒数。 - 流量上报功能结合上面的API认证功能可以实现实时控制用户的流量使用,流量统计,流量限制;流量上报到接口,接口把流量数据写入数据库,然后认证API查询数据库判断用户或者IP流量使用情况,用来确定用户是否可以认证成功. + `定时`默认是5秒,可以通过参数`--traffic-interval`修改`定时`为合适的秒数。 + 默认情况下,快速上报是单个TCP链接维度,定时上报的,也就是说有1000个TCP链接,那么就会有1000的并发上报 +3. `fast`快速模式全局上报 + 默认情况下,如果API接口处理并发能力不足,可以使用fast全局模式, + 使用参数`--fast-global`开启,此参数只有`--traffic-mode=fast`的时候有效。fast全局模式,针对一个`--traffic-url`, + 无论多少并发连接,只会开启一个定时上报,`定时`是5秒。 + 此模式下,上报请求方式是`POST`,`Content-Type`是`application/json`,数据是`JSON 数组`,示例:`[{},{}]`,数组里面的对象字段和下面的`请求参数说明`里面一致。 +4. 流量上报功能结合上面的API认证功能可以实现实时控制用户的流量使用,流量统计,流量限制;流量上报到接口,接口把流量数据写入数据库,然后认证API查询数据库判断用户或者IP流量使用情况,用来确定用户是否可以认证成功. 下面是一个完整的URL请求实例: diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 5ae94c9..9facd59 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -18,31 +18,31 @@ - https://snail007.host900.com/goproxy/categories/ + https://snail007.host900.com/goproxy/tags/cdn/ 2019-07-05T08:20:48+08:00 0 - https://snail007.host900.com/goproxy/ + https://snail007.host900.com/goproxy/categories/ 2019-07-05T08:20:48+08:00 0 - https://snail007.host900.com/goproxy/posts/ + https://snail007.host900.com/goproxy/ 2019-07-05T08:20:48+08:00 0 - https://snail007.host900.com/goproxy/tags/ + https://snail007.host900.com/goproxy/posts/ 2019-07-05T08:20:48+08:00 0 - https://snail007.host900.com/goproxy/tags/cdn/ + https://snail007.host900.com/goproxy/tags/ 2019-07-05T08:20:48+08:00 0 diff --git a/docs/tags/cdn/index.html b/docs/tags/cdn/index.html index e9d7646..a7beca7 100644 --- a/docs/tags/cdn/index.html +++ b/docs/tags/cdn/index.html @@ -14,7 +14,7 @@ - cdn - GOPROXY IN ACTION + CDN - GOPROXY IN ACTION @@ -77,7 +77,7 @@ diff --git a/docs/tags/cdn/index.xml b/docs/tags/cdn/index.xml index ab1a975..cb5d91a 100644 --- a/docs/tags/cdn/index.xml +++ b/docs/tags/cdn/index.xml @@ -1,9 +1,9 @@ - cdn on GOPROXY IN ACTION + CDN on GOPROXY IN ACTION https://snail007.host900.com/goproxy/tags/cdn/ - Recent content in cdn on GOPROXY IN ACTION + Recent content in CDN on GOPROXY IN ACTION Hugo -- gohugo.io zh-CN Fri, 05 Jul 2019 08:20:48 +0800 diff --git a/docs/tags/index.xml b/docs/tags/index.xml index 311e588..cd84ea7 100644 --- a/docs/tags/index.xml +++ b/docs/tags/index.xml @@ -12,7 +12,7 @@ - cdn + CDN https://snail007.host900.com/goproxy/tags/cdn/ Fri, 05 Jul 2019 08:20:48 +0800