Add a minimal VLESS-XHTTP-Reality configuration

This commit is contained in:
rnotlnglgq 2025-06-05 19:20:46 +00:00
parent db8ac0e00f
commit d00b801385
6 changed files with 300 additions and 0 deletions

View File

@ -0,0 +1,9 @@
# VLESS-XHTTP-Reality-steal_others
[Reality](https://github.com/XTLS/REALITY) and [XHTTP](https://github.com/XTLS/Xray-core/discussions/4113) are two major techniques of Project X which are up-to-date. This example provides a minimal configuration, which can be used for new versions of Xray-core (and cannot be used for low versions, recommended >= [v25.3.6](https://github.com/XTLS/Xray-core/releases/tag/v25.3.6) ). There are also more complicated configurations provided by other community repositories.
#### Note
* Leave the fields blank as much as possible to ensure that users who have not configured their own will be responded to by xray-core with an error.
* Considering practicality, [domain name sniffing](https://xtls.github.io/config/inbound.html#sniffingobject) is enabled.
* The `"fingerprint"` field for Reality has a safe default value of `"chrome"` since version 24.12.18, so it is omitted in this example. Old versions of Xray-Core without a default value should not be able to recognize this configuration file (due to the `"target"` field), so it should be safe to omit it here.

View File

@ -0,0 +1,12 @@
# VLESS-XHTTP-Reality-steal_others
[Reality](https://github.com/XTLS/REALITY)与[XHTTP](https://github.com/XTLS/Xray-core/discussions/4113)是XTLS项目的两项主要且较新的技术。本示例配置提供一个极简配置其可在较新版本的Xray-core使用且无法在低版本使用建议版本不旧于[v25.3.6](https://github.com/XTLS/Xray-core/releases/tag/v25.3.6))。目前亦有社区成员在其他仓库提供更复杂的配置方案。
另外根据[一些经验](https://github.com/XTLS/Xray-core/issues/1027),对于中国大陆用户建议使用[禁回国流量的路由规则](server-block-cn.jsonc),以避免服务器向境内网站发起连接而被标记为代理。
#### 备注
* 待填字段尽可能留空了确保未自行配置的用户将被xray-core回应以报错。
* 考虑到实用性,开启了[域名嗅探](https://xtls.github.io/config/inbound.html#sniffingobject)。
* Reality设定的`"fingerprint"`字段自24.12.18版本已有安全的默认值`"chrome"`故不再标注。没有默认值的旧版Xray-core应该会因无法识别这个配置文件因target字段所以此处省略应该是安全的。

View File

@ -0,0 +1,77 @@
{
"routing": {
"rules": [
{
"ip": [
"geoip:private"
],
"outboundTag": "direct"
},
{
"type": "field",
"ip": [
"geoip:cn"
],
"outboundTag": "direct"
},
{
"type": "field",
"domain": [
"geosite:cn"
],
"outboundTag": "direct"
}
]
},
"inbounds": [
{
"listen": "127.0.0.1",
"port": 10808,
"protocol": "socks"
}
],
"outbounds": [
{
"protocol": "vless",
"settings": {
"vnext": [
{
"address": "", // IP
"port": 443, //
"users": [
{
"id": "", //
"encryption": "none",
"flow": ""
}
]
}
]
},
"streamSettings": {
"network": "xhttp",
"xhttpSettings": {
"path": "/yourpath" //
},
"security": "reality",
"realitySettings": {
"serverName": "", // serverNames
"publicKey": "", // xray x25519 "Public key"
"shortId": "", // shortIds
"spiderX": "/somepath", //
"fingerprint": "chrome" // 使 uTLS TLS
}
},
"tag": "proxy"
},
{
"protocol": "freedom",
"tag": "direct"
},
{
"protocol": "blackhole",
"tag": "block"
}
]
}

View File

@ -0,0 +1,63 @@
{
"routing": {
"rules": [
{
"ip": [
"geoip:private"
],
"outboundTag": "direct"
}
]
},
"inbounds": [
{
"listen": "127.0.0.1",
"port": 10808,
"protocol": "socks"
}
],
"outbounds": [
{
"protocol": "vless",
"settings": {
"vnext": [
{
"address": "", // IP
"port": 443, //
"users": [
{
"id": "", //
"encryption": "none",
"flow": ""
}
]
}
]
},
"streamSettings": {
"network": "xhttp",
"xhttpSettings": {
"path": "/yourpath" //
},
"security": "reality",
"realitySettings": {
"serverName": "", // serverNames
"publicKey": "", // xray x25519 "Public key"
"shortId": "", // shortIds
"spiderX": "/somepath", //
"fingerprint": "chrome" // 使 uTLS TLS
}
},
"tag": "proxy"
},
{
"protocol": "freedom",
"tag": "direct"
},
{
"protocol": "blackhole",
"tag": "block"
}
]
}

View File

@ -0,0 +1,79 @@
{
"routing": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"ip": [
"geoip:cn"
],
"outboundTag": "block"
},
{
"type": "field",
"domain": [
"geosite:cn"
],
"outboundTag": "block"
}
]
},
"inbounds": [
{
"listen": "0.0.0.0",
"port": 443, //
"protocol": "vless",
"settings": {
"clients": [
{
"id": "", // 1-30 xray uuid
"flow": ""
}
],
"decryption": "none"
},
"streamSettings": {
"network": "xhttp",
"xhttpSettings": {
"path": "/yourpath" //
},
"security": "reality",
"realitySettings": {
// targetdest24.10.31使
// TLSv1.3 H2 www https://github.com/XTLS/REALITY
"target": "example.com:443",
"serverNames": [
// serverName *
// xray tls ping "Allowed domains"
],
"privateKey": "", // xray x25519 "Private key"
"shortIds": [ // shortId
// "", // shortId
"00", // 0 f 2 16
"01",
"02"
]
}
},
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls",
"quic"
]
}
}
],
"outbounds": [
{
"protocol": "freedom",
"tag": "direct"
},
{
"protocol": "blackhole",
"tag": "block"
}
]
}

View File

@ -0,0 +1,60 @@
{
"inbounds": [
{
"listen": "0.0.0.0",
"port": 443, //
"protocol": "vless",
"settings": {
"clients": [
{
"id": "", // 1-30 xray uuid
"flow": ""
}
],
"decryption": "none"
},
"streamSettings": {
"network": "xhttp",
"xhttpSettings": {
"path": "/yourpath" //
},
"security": "reality",
"realitySettings": {
// targetdest24.10.31使
// TLSv1.3 H2 www https://github.com/XTLS/REALITY
"target": "example.com:443",
"serverNames": [
// serverName *
// xray tls ping "Allowed domains"
],
"privateKey": "", // xray x25519 "Private key"
"shortIds": [ // shortId
// "", // shortId
"00", // 0 f 2 16
"01",
"02"
]
}
},
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls",
"quic"
]
}
}
],
"outbounds": [
{
"protocol": "freedom",
"tag": "direct"
},
{
"protocol": "blackhole",
"tag": "block"
}
]
}