mirror of
https://github.com/XrayR-project/XrayR-doc.git
synced 2025-06-07 21:19:52 +00:00
update config
This commit is contained in:
parent
41c9abb6b2
commit
c5c805c1e6
@ -1,9 +1,15 @@
|
|||||||
# 基本对接配置
|
# 基本对接配置
|
||||||
|
|
||||||
1. 在`config.yml`中配置`PanelType: "V2board"`。
|
1. 在`config.yml`中配置`PanelType:`填写`"V2board"`或者`"NewV2board"`。
|
||||||
2. V2board只有V2ray节点类型支持面板配置审计规则,其他协议请使用XrayR[本地审计功能](../gong-neng-shuo-ming/rule.md)。
|
2. V2board只有V2ray节点类型支持面板配置审计规则,其他协议请使用XrayR[本地审计功能](../gong-neng-shuo-ming/rule.md)。
|
||||||
3. 启用vless和xtls,请在配置文件中手动启动,V2board不支持在线配置,同时V2board不支持vless和xtls下发,请手动修改客户端配置,或者自行寻找其他解决方案。
|
3. 启用vless和xtls,请在配置文件中手动启动,V2board不支持在线配置,同时V2board不支持vless和xtls下发,请手动修改客户端配置,或者自行寻找其他解决方案。
|
||||||
|
|
||||||
|
{% hint style="info" %}
|
||||||
|
v2board 版本 >= [1.6.1](https://github.com/v2board/v2board/releases/tag/1.6.1)请选择 "NewV2board"
|
||||||
|
|
||||||
|
其他版本选择 "V2board",注意老版本API将于 2023.6.1后移除。
|
||||||
|
{% endhint %}
|
||||||
|
|
||||||
配置文件详见:[配置文件说明](../xrayr-pei-zhi-wen-jian-shuo-ming/config.md)
|
配置文件详见:[配置文件说明](../xrayr-pei-zhi-wen-jian-shuo-ming/config.md)
|
||||||
|
|
||||||
### 对接vmess+ws
|
### 对接vmess+ws
|
||||||
|
@ -18,11 +18,11 @@
|
|||||||
|
|
||||||
## 全局设备限制
|
## 全局设备限制
|
||||||
|
|
||||||
当XrayR版本>=v0.8.6,可以启用基于redis的全局设备限制功能,可以跨节点支持基于IP的设备限制,兼容所有面板。可在`ControllerConfig` 中配置如下项。
|
当XrayR版本>=v0.8.7,可以启用基于redis的全局设备限制功能,可以跨节点支持基于IP的设备限制,兼容所有面板。可在`ControllerConfig` 中配置如下项。
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
GlobalDeviceLimitConfig:
|
GlobalDeviceLimitConfig:
|
||||||
Limit: 0 # The global device limit of a user, 0 means disable
|
Enable: false # Enable the global device limit of a user
|
||||||
RedisAddr: 127.0.0.1:6379 # The redis server address
|
RedisAddr: 127.0.0.1:6379 # The redis server address
|
||||||
RedisPassword: YOUR PASSWORD # Redis password
|
RedisPassword: YOUR PASSWORD # Redis password
|
||||||
RedisDB: 0 # Redis DB
|
RedisDB: 0 # Redis DB
|
||||||
@ -30,24 +30,19 @@ GlobalDeviceLimitConfig:
|
|||||||
Expiry: 60 # Expiry time (second)
|
Expiry: 60 # Expiry time (second)
|
||||||
```
|
```
|
||||||
|
|
||||||
| 参数 | 说明 |
|
| 参数 | 说明 |
|
||||||
| ------------- | -------------------------------------------------------------------- |
|
| ------------- | ------------------------------------------------------------------------------- |
|
||||||
| Limit | 每个用户限制独立IP数量,设置为0则禁用 |
|
| Enable | 是否启用全局设备限制,设备限制数量由面板下发、或由配置文件中的`DeviceLimit`指定 |
|
||||||
| RedisAddr | redis连接地址,不同节点需要连接到同一redis数据库,来实现全局设备限制 |
|
| RedisAddr | redis连接地址,不同节点需要连接到同一redis数据库,来实现全局设备限制 |
|
||||||
| RedisPassword | redis密码 |
|
| RedisPassword | redis密码 |
|
||||||
| RedisDB | redis数据库编号 |
|
| RedisDB | redis数据库编号 |
|
||||||
| Timeout | 连接redis超时时间,单位:秒 |
|
| Timeout | 连接redis超时时间,单位:秒 |
|
||||||
| Expiry | redis中存储的在线用户过期时间,单位:秒 |
|
| Expiry | redis中存储的在线用户过期时间,单位:秒 |
|
||||||
|
|
||||||
{% hint style="info" %}
|
|
||||||
为保证最大效率,启用全局设备限制后,建议将其他设备限制相关配置设为0,包括配置文件中的`DeviceLimit`和面板相关配置。
|
|
||||||
{% endhint %}
|
|
||||||
|
|
||||||
{% hint style="info" %}
|
{% hint style="info" %}
|
||||||
如果同一redis下对接了多个面板结点,建议同一面板下的结点使用同一redis数据库编号,以保证不同面板之间独立限制。
|
如果同一redis下对接了多个面板结点,建议同一面板下的结点使用同一redis数据库编号,以保证不同面板之间独立限制。
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
|
|
||||||
XrayR全局设备限制需要访问Redis服务器,会引入额外的延迟。为了降低延迟,可以采用以下策略:
|
{% hint style="info" %}
|
||||||
1. 关闭XrayR的全局设备限制,只启用默认设备限制策略。
|
XrayR全局设备限制需要访问Redis服务器,用户第一次连接时会引入额外的延迟。我们实现了缓存机制,只会在用户第一次访问结点时和redis通讯,后续访问会直接从缓存中读取,因此不会引入额外的延迟。
|
||||||
2. 将Redis服务器部署在本地,或者和节点距离较近的位置。
|
{% endhint %}
|
||||||
3. 搭建[Redis集群](https://redis.io/docs/management/scaling/),使得节点始终可以访问距离较近的Redis服务器。
|
|
@ -24,7 +24,7 @@ ConnectionConfig:
|
|||||||
BufferSize: 64 # The internal cache size of each connection, kB
|
BufferSize: 64 # The internal cache size of each connection, kB
|
||||||
Nodes:
|
Nodes:
|
||||||
-
|
-
|
||||||
PanelType: "SSpanel" # Panel type: SSpanel, V2board, PMpanel, Proxypanel
|
PanelType: "SSpanel" # Panel type: SSpanel, NewV2board, V2board, PMpanel, Proxypanel
|
||||||
ApiConfig:
|
ApiConfig:
|
||||||
ApiHost: "http://127.0.0.1:667"
|
ApiHost: "http://127.0.0.1:667"
|
||||||
ApiKey: "123"
|
ApiKey: "123"
|
||||||
@ -53,7 +53,7 @@ Nodes:
|
|||||||
LimitSpeed: 0 # The speedlimit of a limited user (unit: mbps)
|
LimitSpeed: 0 # The speedlimit of a limited user (unit: mbps)
|
||||||
LimitDuration: 0 # How many minutes will the limiting last (unit: minute)
|
LimitDuration: 0 # How many minutes will the limiting last (unit: minute)
|
||||||
GlobalDeviceLimitConfig:
|
GlobalDeviceLimitConfig:
|
||||||
Limit: 0 # The global device limit of a user, 0 means disable
|
Enable: false # Enable the global device limit of a user
|
||||||
RedisAddr: 127.0.0.1:6379 # The redis server address
|
RedisAddr: 127.0.0.1:6379 # The redis server address
|
||||||
RedisPassword: YOUR PASSWORD # Redis password
|
RedisPassword: YOUR PASSWORD # Redis password
|
||||||
RedisDB: 0 # Redis DB
|
RedisDB: 0 # Redis DB
|
||||||
@ -291,9 +291,9 @@ Nodes:
|
|||||||
PanelType: "V2board" # Panel type: SSpanel, V2board, PMpanel, Proxypanel
|
PanelType: "V2board" # Panel type: SSpanel, V2board, PMpanel, Proxypanel
|
||||||
```
|
```
|
||||||
|
|
||||||
| 参数 | 选项 | 说明 |
|
| 参数 | 选项 | 说明 |
|
||||||
| ----------- | -------------------------------------------------------- | ---------------- |
|
| ----------- | ----------------------------------------------------------------------- | ---------------- |
|
||||||
| `PanelType` | `SSPanel`,`V2board`,`PMpanel`,`Proxypanel`, `V2RaySocks` | 对接前端面板类型 |
|
| `PanelType` | `SSPanel`, `NewV2board`, `V2board`,`PMpanel`,`Proxypanel`, `V2RaySocks` | 对接前端面板类型 |
|
||||||
|
|
||||||
#### 面板对接配置
|
#### 面板对接配置
|
||||||
|
|
||||||
@ -346,7 +346,7 @@ ControllerConfig:
|
|||||||
LimitSpeed: 0 # The speedlimit of a limited user (unit: mbps)
|
LimitSpeed: 0 # The speedlimit of a limited user (unit: mbps)
|
||||||
LimitDuration: 0 # How many minutes will the limiting last (unit: minute)
|
LimitDuration: 0 # How many minutes will the limiting last (unit: minute)
|
||||||
GlobalDeviceLimitConfig:
|
GlobalDeviceLimitConfig:
|
||||||
Limit: 0 # The global device limit of a user, 0 means disable
|
Enable: false # Enable the global device limit of a user
|
||||||
RedisAddr: 127.0.0.1:6379 # The redis server address
|
RedisAddr: 127.0.0.1:6379 # The redis server address
|
||||||
RedisPassword: YOUR PASSWORD # Redis password
|
RedisPassword: YOUR PASSWORD # Redis password
|
||||||
RedisDB: 0 # Redis DB
|
RedisDB: 0 # Redis DB
|
||||||
@ -361,22 +361,22 @@ ControllerConfig:
|
|||||||
ProxyProtocolVer: 0 # Send PROXY protocol version, 0 for dsable
|
ProxyProtocolVer: 0 # Send PROXY protocol version, 0 for dsable
|
||||||
```
|
```
|
||||||
|
|
||||||
| 参数 | 选项 | 说明 |
|
| 参数 | 选项 | 说明 |
|
||||||
| ---------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
| ------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
| `ListenIP` | 无 | 选择监听的IP地址,`0.0.0.0`会同时监听v6和v4 |
|
| `ListenIP` | 无 | 选择监听的IP地址,`0.0.0.0`会同时监听v6和v4 |
|
||||||
| `SendIP` | 无 | 用于发送数据的 IP 地址 |
|
| `SendIP` | 无 | 用于发送数据的 IP 地址 |
|
||||||
| `UpdatePeriodic` | 无 | 从前端更新节点、用户信息和上报用户使用信息的间隔,默认60秒 |
|
| `UpdatePeriodic` | 无 | 从前端更新节点、用户信息和上报用户使用信息的间隔,默认60秒 |
|
||||||
| `EnableDNS` | `true`,`false` | 是否为当前节点启用自定义DNS,默认使用系统DNS |
|
| `EnableDNS` | `true`,`false` | 是否为当前节点启用自定义DNS,默认使用系统DNS |
|
||||||
| `DNSType` | `AsIs`,`UseIP`,`UseIPv4`,`UseIPv6` | DNS解析类型,`AsIs`:使用系统DNS,`UseIP`,`UseIPv4`,`UseIPv6`为使用自定义DNS,请确保`EnableDNS`为`true`,且正确配置了`DnsConfigPath` |
|
| `DNSType` | `AsIs`,`UseIP`,`UseIPv4`,`UseIPv6` | DNS解析类型,`AsIs`:使用系统DNS,`UseIP`,`UseIPv4`,`UseIPv6`为使用自定义DNS,请确保`EnableDNS`为`true`,且正确配置了`DnsConfigPath` |
|
||||||
| `DisableUploadTraffic` | `false`, `true` | 是否禁止上传节点流量,默认`false` |
|
| `DisableUploadTraffic` | `false`, `true` | 是否禁止上传节点流量,默认`false` |
|
||||||
| `DisableGetRule` | `false`, `true` | 是否禁止获取远程规则,默认`false` |
|
| `DisableGetRule` | `false`, `true` | 是否禁止获取远程规则,默认`false` |
|
||||||
| `DisableIVCheck` | `false`, `true` | 是否关闭Shadowsocks用于防止重放攻击的布隆过滤器,默认`false` |
|
| `DisableIVCheck` | `false`, `true` | 是否关闭Shadowsocks用于防止重放攻击的布隆过滤器,默认`false` |
|
||||||
| `DisableSniffing` | `false`, `true` | 是否关闭domain sniffing,默认`false` |
|
| `DisableSniffing` | `false`, `true` | 是否关闭domain sniffing,默认`false` |
|
||||||
| `EnableProxyProtocol` | `true`,`false` | 是否为当前节点启用ProxyProtocol获取中转IP |
|
| `EnableProxyProtocol` | `true`,`false` | 是否为当前节点启用ProxyProtocol获取中转IP |
|
||||||
| `AutoSpeedLimitConfig` | list | 动态限速相关配置,请查看 [动态限速](../gong-neng-shuo-ming/speedlimit.md) |
|
| `AutoSpeedLimitConfig` | list | 动态限速相关配置,请查看 [动态限速](../gong-neng-shuo-ming/speedlimit.md) |
|
||||||
| `GlobalDeviceLimitConfig` | list | 全局设备限制相关配置,请查看 [全局设备限制](../gong-neng-shuo-ming/devicelimit.md) |
|
| `GlobalDeviceLimitConfig` | list | 全局设备限制相关配置,请查看 [全局设备限制](../gong-neng-shuo-ming/devicelimit.md) |
|
||||||
| `EnableFallback` | `true`,`false` | 是否为当前节点启用Fallback,只对Vless和Trojan协议有效 |
|
| `EnableFallback` | `true`,`false` | 是否为当前节点启用Fallback,只对Vless和Trojan协议有效 |
|
||||||
| `FallBackConfigs` | list | Fallback 相关配置,请查看 [Fallback功能说明](../gong-neng-shuo-ming/fallback.md) |
|
| `FallBackConfigs` | list | Fallback 相关配置,请查看 [Fallback功能说明](../gong-neng-shuo-ming/fallback.md) |
|
||||||
|
|
||||||
#### 证书申请相关配置
|
#### 证书申请相关配置
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user