2022-10-14 15:27:34 +11:00

38 lines
2.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 限速功能说明
1. 节点限速请在SSpanel的节点限速处填写单位Mbps。
2. 用户限速请在SSpanel的用户设置处填写单位Mbps。
3. 限速值设为0则为不限速。
## 本地节点限速设置
针对不支持远程设置限速的面板如V2board可以在本地配置文件`SpeedLimit`设置限速。注意此设置会覆盖远程获取的节点级别限速。
{% hint style="info" %}
节点限速:所有连接到该节点的用户限速值都会采用`SpeedLimit`中的设置值**(不是端口限速)**
{% endhint %}
配置文件详见:[配置文件说明](../xrayr-pei-zhi-wen-jian-shuo-ming/config.md#mian-ban-dui-jie-pei-zhi)
## 动态限速功能
XrayR支持动态限速功能可以根据用户的使用流量调整限速值。在`ControllerConfig` 中配置如下项。
{% hint style="info" %}
为保证能及时调整长连接的限速如长时间下载请确保默认限速值大于0。可在用户、节点、本地任意位置配置默认大于0的限速值优先级为本地>节点>用户。如果默认限速值为0则用户的动态限速只有在下次建立连接时才会生效。
{% endhint %}
```yaml
AutoSpeedLimitConfig:
Limit: 0 # Warned speed. Set to 0 to disable AutoSpeedLimit (mbps)
WarnTimes: 0 # After (WarnTimes) consecutive warnings, the user will be limited. Set to 0 to punish overspeed user immediately.
LimitSpeed: 0 # The speedlimit of a limited user (unit: mbps)
LimitDuration: 0 # How many minutes will the limiting last (unit: minute)
```
| 参数 | 说明 |
| ------------- | --------------------------------------------------------------------------- |
| Limit | 警告速度。设置为0以禁用自动限速功能。单位Mbps。 |
| WarnTimes | 警告次数。连续警告次数达到该值后用户将被限速。设置为0以立即惩罚超速用户。 |
| LimitSpeed | 限速值。单位Mbps。 |
| LimitDuration | 限速时长。单位:分钟。 |