0
0
mirror of https://github.com/XTLS/REALITY.git synced 2025-08-22 14:38:35 +00:00

Update README: New config file style

This commit is contained in:
Meo597 2025-06-08 14:57:53 +08:00
parent e195acb047
commit 4b636d90bd
2 changed files with 146 additions and 134 deletions

View File

@ -11,57 +11,63 @@ TODO List: TODO
[中文](README.md) | English [中文](README.md) | English
```json5 ```jsonc
{ {
inbounds: [ "inbounds": [
// Server Inbound Configuration // Server Inbound Configuration
{ {
listen: "0.0.0.0", "listen": "0.0.0.0",
port: 443, "port": 443,
protocol: "vless", "protocol": "vless",
settings: { "settings": {
clients: [ "clients": [
{ {
id: "", // Required, execute ./xray uuid to generate, or a string of 1-30 characters "id": "", // Required, execute ./xray uuid to generate, or a string of 1-30 characters
flow: "xtls-rprx-vision", // Optional, if any, client must enable XTLS "flow": "xtls-rprx-vision" // Optional, if any, client must enable XTLS
}, }
], ],
decryption: "none", "decryption": "none"
}, },
streamSettings: { "streamSettings": {
network: "tcp", "network": "tcp",
security: "reality", "security": "reality",
realitySettings: { "realitySettings": {
show: false, // Optional, if true, output debugging information "show": false, // Optional, if true, output debugging information
dest: "example.com:443", // Required, the format is the same as the dest of VLESS fallbacks "dest": "example.com:443", // Required, the format is the same as the dest of VLESS fallbacks
xver: 0, // Optional, the format is the same as xver of VLESS fallbacks "xver": 0, // Optional, the format is the same as xver of VLESS fallbacks
serverNames: [ "serverNames": [
// Required, the acceptable serverName list, does not support * wildcards for now // Required, the acceptable serverName list, does not support * wildcards for now
"example.com", "example.com",
"www.example.com", "www.example.com"
], ],
privateKey: "", // Required, execute ./xray x25519 to generate "privateKey": "", // Required, execute ./xray x25519 to generate
minClientVer: "", // Optional, minimum client Xray version, format is x.y.z "minClientVer": "", // Optional, minimum client Xray version, format is x.y.z
maxClientVer: "", // Optional, the highest version of client Xray, the format is x.y.z "maxClientVer": "", // Optional, the highest version of client Xray, the format is x.y.z
maxTimeDiff: 0, // Optional, the maximum time difference allowed, in milliseconds "maxTimeDiff": 0, // Optional, the maximum time difference allowed, in milliseconds
shortIds: [ "shortIds": [
// Required, the acceptable shortId list, which can be used to distinguish different clients // Required, the acceptable shortId list, which can be used to distinguish different clients
"", // If there is this item, the client shortId can be empty "", // If there is this item, the client shortId can be empty
"0123456789abcdef", // 0 to f, the length is a multiple of 2, the maximum length is 16 "0123456789abcdef" // 0 to f, the length is a multiple of 2, the maximum length is 16
], ],
// The six limit below are optional for rate limiting falling REALITY connections. Default are 0 means disabled // The two limit below are optional for rate limiting falling REALITY connections. Default are 0 means disabled
// WARNING: Enabling rate limiting may create detectable patterns for GFW! // WARNING: Enabling rate limiting may create detectable patterns for Great-Firewall!
// If you're a GUI/panel/one-click script developer, RANDOMIZE these parameters! // If you're a GUI/panel/one-click script developer, RANDOMIZE these parameters!
limitFbUploadRate: 0, // Base upload speed (bytes/s) "limitFallbackUpload": {
limitFbUploadBurst: 0, // Upload burst capacity (bytes) // Limit upload for falling REALITY connections
limitFbUploadAfter: 0, // Start upload throttling after (bytes) "afterBytes": 0, // Start throttling after (bytes)
limitFbDownloadRate: 0, // Base download speed (bytes/s) "bytesPerSec": 0, // Base speed (bytes/s)
limitFbDownloadBurst: 0, // Download burst capacity (bytes) "burstBytesPerSec": 0 // Burst capacity (bytes)
limitFbDownloadAfter: 0, // Start download throttling after (bytes)
}, },
}, "limitFallbackDownload": {
}, // Limit download for falling REALITY connections
], "afterBytes": 0, // Start throttling after (bytes)
"bytesPerSec": 0, // Base speed (bytes/s)
"burstBytesPerSec": 0 // Burst capacity (bytes)
}
}
}
}
]
} }
``` ```
@ -75,41 +81,41 @@ Configuration bonus items: **Block the proxy traffic back to China, TCP/80, UDP/
**REALITY can also be used with proxy protocols other than XTLS**, but this is not recommended due to their obvious and already targeted TLS in TLS characteristics **REALITY can also be used with proxy protocols other than XTLS**, but this is not recommended due to their obvious and already targeted TLS in TLS characteristics
The next main goal of REALITY is "**pre-built mode**", that is, to collect and build the characteristics of the target website in advance, and the next main goal of XTLS is **0-RTT** The next main goal of REALITY is "**pre-built mode**", that is, to collect and build the characteristics of the target website in advance, and the next main goal of XTLS is **0-RTT**
```json5 ```jsonc
{ {
outbounds: [ "outbounds": [
// Client outbound configuration // Client outbound configuration
{ {
protocol: "vless", "protocol": "vless",
settings: { "settings": {
vnext: [ "vnext": [
{ {
address: "", // The domain name or IP of the server "address": "", // The domain name or IP of the server
port: 443, "port": 443,
users: [ "users": [
{ {
id: "", // consistent with the server "id": "", // consistent with the server
flow: "xtls-rprx-vision", // consistent with the server "flow": "xtls-rprx-vision", // consistent with the server
encryption: "none", "encryption": "none"
}
]
}
]
}, },
], "streamSettings": {
}, "network": "tcp",
], "security": "reality",
}, "realitySettings": {
streamSettings: { "show": false, // Optional, if true, output debugging information
network: "tcp", "fingerprint": "chrome", // Required, use uTLS library to emulate client TLS fingerprint
security: "reality", "serverName": "", // One of the server serverNames
realitySettings: { "publicKey": "", // The public key corresponding to the private key of the server
show: false, // Optional, if true, output debugging information "shortId": "", // One of the server shortIds
fingerprint: "chrome", // Required, use uTLS library to emulate client TLS fingerprint "spiderX": "" // The initial path and parameters of the crawler, recommended to be different for each client
serverName: "", // One of the server serverNames }
publicKey: "", // The public key corresponding to the private key of the server }
shortId: "", // One of the server shortIds }
spiderX: "", // The initial path and parameters of the crawler, recommended to be different for each client ]
},
},
},
],
} }
``` ```

138
README.md
View File

@ -11,56 +11,62 @@ TODO List: TODO
中文 | [English](README.en.md) 中文 | [English](README.en.md)
```json5 ```jsonc
{ {
inbounds: [ "inbounds": [
// 服务端入站配置 // 服务端入站配置
{ {
listen: "0.0.0.0", "listen": "0.0.0.0",
port: 443, "port": 443,
protocol: "vless", "protocol": "vless",
settings: { "settings": {
clients: [ "clients": [
{ {
id: "", // 必填,执行 ./xray uuid 生成,或 1-30 字节的字符串 "id": "", // 必填,执行 ./xray uuid 生成,或 1-30 字节的字符串
flow: "xtls-rprx-vision", // 选填,若有,客户端必须启用 XTLS "flow": "xtls-rprx-vision" // 选填,若有,客户端必须启用 XTLS
}, }
], ],
decryption: "none", "decryption": "none"
}, },
streamSettings: { "streamSettings": {
network: "tcp", "network": "tcp",
security: "reality", "security": "reality",
realitySettings: { "realitySettings": {
show: false, // 选填,若为 true输出调试信息 "show": false, // 选填,若为 true输出调试信息
dest: "example.com:443", // 必填,格式同 VLESS fallbacks 的 dest "dest": "example.com:443", // 必填,格式同 VLESS fallbacks 的 dest
xver: 0, // 选填,格式同 VLESS fallbacks 的 xver "xver": 0, // 选填,格式同 VLESS fallbacks 的 xver
serverNames: [ "serverNames": [
// 必填,客户端可用的 serverName 列表,暂不支持 * 通配符 // 必填,客户端可用的 serverName 列表,暂不支持 * 通配符
"example.com", "example.com",
"www.example.com", "www.example.com"
], ],
privateKey: "", // 必填,执行 ./xray x25519 生成 "privateKey": "", // 必填,执行 ./xray x25519 生成
minClientVer: "", // 选填,客户端 Xray 最低版本,格式为 x.y.z "minClientVer": "", // 选填,客户端 Xray 最低版本,格式为 x.y.z
maxClientVer: "", // 选填,客户端 Xray 最高版本,格式为 x.y.z "maxClientVer": "", // 选填,客户端 Xray 最高版本,格式为 x.y.z
maxTimeDiff: 0, // 选填,允许的最大时间差,单位为毫秒 "maxTimeDiff": 0, // 选填,允许的最大时间差,单位为毫秒
shortIds: [ "shortIds": [
// 必填,客户端可用的 shortId 列表,可用于区分不同的客户端 // 必填,客户端可用的 shortId 列表,可用于区分不同的客户端
"", // 若有此项,客户端 shortId 可为空 "", // 若有此项,客户端 shortId 可为空
"0123456789abcdef", // 0 到 f长度为 2 的倍数,长度上限为 16 "0123456789abcdef" // 0 到 f长度为 2 的倍数,长度上限为 16
], ],
// 下列六个 limit 为选填,可对回落的 REALITY 连接限速。默认为 0 即不启用 // 下列两个 limit 为选填,可对回落的 REALITY 连接限速。默认为 0 即不启用
// 警告启用限速可能会引入新的特征被GFW探测到如果您是GUI/面板/一键脚本开发者,请务必让这些参数随机化! // 警告:启用限速可能会引入新的特征被 GFW 探测到如果您是GUI/面板/一键脚本开发者,请务必让这些参数随机化!
limitFbUploadRate: 0, // 上行基准速率 (字节/秒) "limitFallbackUpload": {
limitFbUploadBurst: 0, // 上行突发速率 (字节/秒) // 限制回落上行
limitFbUploadAfter: 0, // 上行指定字节后开始限速 "afterBytes": 0, // 传输指定字节后开始限速
limitFbDownloadRate: 0, // 下行基准速率 (字节/秒) "bytesPerSec": 0, // 基准速率 (字节/秒)
limitFbDownloadBurst: 0, // 下行突发速率 (字节/秒) "burstBytesPerSec": 0 // 突发速率 (字节/秒)
limitFbDownloadAfter: 0, // 下行指定字节后开始限速
}, },
}, "limitFallbackDownload": {
}, // 限制回落下行
], "afterBytes": 0, // 传输指定字节后开始限速
"bytesPerSec": 0, // 基准速率 (字节/秒)
"burstBytesPerSec": 0 // 突发速率 (字节/秒)
}
}
}
}
]
} }
``` ```
@ -74,41 +80,41 @@ TODO List: TODO
**REALITY 也可以搭配 XTLS 以外的代理协议使用**,但不建议这样做,因为它们存在明显且已被针对的 TLS in TLS 特征 **REALITY 也可以搭配 XTLS 以外的代理协议使用**,但不建议这样做,因为它们存在明显且已被针对的 TLS in TLS 特征
REALITY 的下一个主要目标是“**预先构建模式**”即提前采集目标网站特征XTLS 的下一个主要目标是 **0-RTT** REALITY 的下一个主要目标是“**预先构建模式**”即提前采集目标网站特征XTLS 的下一个主要目标是 **0-RTT**
```json5 ```jsonc
{ {
outbounds: [ "outbounds": [
// 客户端出站配置 // 客户端出站配置
{ {
protocol: "vless", "protocol": "vless",
settings: { "settings": {
vnext: [ "vnext": [
{ {
address: "", // 服务端的域名或 IP "address": "", // 服务端的域名或 IP
port: 443, "port": 443,
users: [ "users": [
{ {
id: "", // 与服务端一致 "id": "", // 与服务端一致
flow: "xtls-rprx-vision", // 与服务端一致 "flow": "xtls-rprx-vision", // 与服务端一致
encryption: "none", "encryption": "none"
}
]
}
]
}, },
], "streamSettings": {
}, "network": "tcp",
], "security": "reality",
}, "realitySettings": {
streamSettings: { "show": false, // 选填,若为 true输出调试信息
network: "tcp", "fingerprint": "chrome", // 必填,使用 uTLS 库模拟客户端 TLS 指纹
security: "reality", "serverName": "", // 服务端 serverNames 之一
realitySettings: { "publicKey": "", // 服务端私钥对应的公钥
show: false, // 选填,若为 true输出调试信息 "shortId": "", // 服务端 shortIds 之一
fingerprint: "chrome", // 必填,使用 uTLS 库模拟客户端 TLS 指纹 "spiderX": "" // 爬虫初始路径与参数,建议每个客户端不同
serverName: "", // 服务端 serverNames 之一 }
publicKey: "", // 服务端私钥对应的公钥 }
shortId: "", // 服务端 shortIds 之一 }
spiderX: "", // 爬虫初始路径与参数,建议每个客户端不同 ]
},
},
},
],
} }
``` ```