pull/539/head
arraykeys 1 year ago
parent d3a2cf15c0
commit 4793204926

@ -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:

@ -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请求实例:

@ -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:

@ -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请求实例:

@ -18,31 +18,31 @@
</url>
<url>
<loc>https://snail007.host900.com/goproxy/categories/</loc>
<loc>https://snail007.host900.com/goproxy/tags/cdn/</loc>
<lastmod>2019-07-05T08:20:48+08:00</lastmod>
<priority>0</priority>
</url>
<url>
<loc>https://snail007.host900.com/goproxy/</loc>
<loc>https://snail007.host900.com/goproxy/categories/</loc>
<lastmod>2019-07-05T08:20:48+08:00</lastmod>
<priority>0</priority>
</url>
<url>
<loc>https://snail007.host900.com/goproxy/posts/</loc>
<loc>https://snail007.host900.com/goproxy/</loc>
<lastmod>2019-07-05T08:20:48+08:00</lastmod>
<priority>0</priority>
</url>
<url>
<loc>https://snail007.host900.com/goproxy/tags/</loc>
<loc>https://snail007.host900.com/goproxy/posts/</loc>
<lastmod>2019-07-05T08:20:48+08:00</lastmod>
<priority>0</priority>
</url>
<url>
<loc>https://snail007.host900.com/goproxy/tags/cdn/</loc>
<loc>https://snail007.host900.com/goproxy/tags/</loc>
<lastmod>2019-07-05T08:20:48+08:00</lastmod>
<priority>0</priority>
</url>

@ -14,7 +14,7 @@
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/solarized_dark.min.css">
<title>cdn - GOPROXY IN ACTION</title>
<title>CDN - GOPROXY IN ACTION</title>
<link href="https://snail007.host900.com/goproxy/css/styles.css" rel="stylesheet">
@ -77,7 +77,7 @@
<header class="page-header">
<h1>cdn</h1>
<h1>CDN</h1>
</header>

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>cdn on GOPROXY IN ACTION</title>
<title>CDN on GOPROXY IN ACTION</title>
<link>https://snail007.host900.com/goproxy/tags/cdn/</link>
<description>Recent content in cdn on GOPROXY IN ACTION</description>
<description>Recent content in CDN on GOPROXY IN ACTION</description>
<generator>Hugo -- gohugo.io</generator>
<language>zh-CN</language>
<lastBuildDate>Fri, 05 Jul 2019 08:20:48 +0800</lastBuildDate>

@ -12,7 +12,7 @@
<item>
<title>cdn</title>
<title>CDN</title>
<link>https://snail007.host900.com/goproxy/tags/cdn/</link>
<pubDate>Fri, 05 Jul 2019 08:20:48 +0800</pubDate>

Loading…
Cancel
Save