update doc for bandwith limit

This commit is contained in:
fatedier 2019-11-26 10:23:37 +08:00
parent 1cdceee347
commit c63737ab3e
3 changed files with 44 additions and 0 deletions

View File

@ -37,6 +37,8 @@ frp also has a P2P connect mode.
* [Get proxy status from client](#get-proxy-status-from-client)
* [Only allowing certain ports on the server](#only-allowing-certain-ports-on-the-server)
* [Port Reuse](#port-reuse)
* [Bandwidth Limit](#bandwidth-limit)
* [For Each Proxy](#for-each-proxy)
* [TCP Stream Multiplexing](#tcp-stream-multiplexing)
* [Support KCP Protocol](#support-kcp-protocol)
* [Connection Pooling](#connection-pooling)
@ -495,6 +497,21 @@ allow_ports = 2000-3000,3001,3003,4000-50000
We would like to try to allow multiple proxies bind a same remote port with different protocols in the future.
### Bandwidth Limit
#### For Each Proxy
```ini
# frpc.ini
[ssh]
type = tcp
local_port = 22
remote_port = 6000
bandwidth_limit = 1MB
```
Set `bandwidth_limit` in each proxy's configure to enable this feature. Supported units are `MB` and `KB`.
### TCP Stream Multiplexing
frp supports tcp stream multiplexing since v0.10.0 like HTTP2 Multiplexing, in which case all logic connections to the same frpc are multiplexed into the same TCP connection.

View File

@ -33,6 +33,8 @@ frp 是一个可用于内网穿透的高性能的反向代理应用,支持 tcp
* [客户端查看代理状态](#客户端查看代理状态)
* [端口白名单](#端口白名单)
* [端口复用](#端口复用)
* [限速](#限速)
* [代理限速](#代理限速)
* [TCP 多路复用](#tcp-多路复用)
* [底层通信可选 kcp 协议](#底层通信可选-kcp-协议)
* [连接池](#连接池)
@ -531,6 +533,23 @@ allow_ports = 2000-3000,3001,3003,4000-50000
后续会尝试允许多个 proxy 绑定同一个远端端口的不同协议。
### 限速
#### 代理限速
目前支持在客户端的代理配置中设置代理级别的限速,限制单个 proxy 可以占用的带宽。
```ini
# frpc.ini
[ssh]
type = tcp
local_port = 22
remote_port = 6000
bandwith_limit = 1MB
```
在代理配置中增加 `bandwith_limit` 字段启用此功能,目前仅支持 `MB``KB` 单位。
### TCP 多路复用
从 v0.10.0 版本开始,客户端和服务器端之间的连接支持多路复用,不再需要为每一个用户请求创建一个连接,使连接建立的延迟降低,并且避免了大量文件描述符的占用,使 frp 可以承载更高的并发数。

View File

@ -207,6 +207,14 @@ plugin_key_path = ./server.key
plugin_host_header_rewrite = 127.0.0.1
plugin_header_X-From-Where = frp
[plugin_http2https]
type = http
custom_domains = test.yourdomain.com
plugin = http2https
plugin_local_addr = 127.0.0.1:443
plugin_host_header_rewrite = 127.0.0.1
plugin_header_X-From-Where = frp
[secret_tcp]
# If the type is secret tcp, remote_port is useless
# Who want to connect local port should deploy another frpc with stcp proxy and role is visitor