Integrity requirements
Description
While the same connection works with both versions being the same (v24.12.31 as both client and server), when a client is upgraded to v25.x.x (in my case, v25.3.6), it cannot connect to the upstream and will experience REALITY transport layer dropping their connections (actually, forwarding to imitated server) with the following error:
REALITY: received real certificate (potential MITM or redirection)
I think this might be related to carrying "Xray-core version" in REALITY's ClientHello instead of defining separate "REALITY Protocol versions" to keep compatibility between Xray releases and between major releases.
If you use same versions on both sides, you won't experience such problems, but with a client having gone through a major release cycle, it will fail. (Haven't tested it the other way around with 24.12.31 client and 25.x.x server)
Reproduction Method
- Run a simple REALITY server with SNI and short ID being set to some values.
- Run a client configured to use that REALITY server as outbound.
- You will see errors indicating "received real certificate (potential MITM or redirection)" in the log.
Client config
Outbound:
{
"protocol": "vless",
"settings": {
"vnext": [
{
"address": "REDACTED",
"port": REDACTED,
"users": [
{
"id": "REDACTED",
"encryption": "none"
}
]
}
]
},
"streamSettings": {
"network": "tcp",
"security": "reality",
"realitySettings": {
"fingerprint": "chrome",
"serverName": "www.REDACTED.com",
"publicKey": "REDACTED",
"spiderX": "",
"shortId": "REDACTED"
}
},
"tag": "proxy"
},
Server config
Inbound:
{
"tag": "REALITY_INBOUND",
"listen": "0.0.0.0",
"port": REDACTED,
"protocol": "vless",
"settings": {
"clients": [],
"decryption": "none"
},
"streamSettings": {
"network": "tcp",
"security": "reality",
"realitySettings": {
"show": false,
"dest": "REDACTED:443",
"xver": 0,
"serverNames": [
"www.REDACTED.com",
"REDACTED.com"
],
"privateKey": "REDACTED",
"shortIds": [
"REDACTED"
]
}
},
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls",
"quic"
]
}
},
Client log
Copied from journalctl:
REDACTED:23:39.790268 [Error] [1736950196] transport/internet/reality: REALITY: received real certificate (potential MITM or redirection)
REDACTED:23:39.790429 [Error] [4050634846] transport/internet/reality: REALITY: received real certificate (potential MITM or redirection)
REDACTED:23:39.790500 [Error] [4228015039] transport/internet/reality: REALITY: received real certificate (potential MITM or redirection)
Server log
Nothing related to these problematic connections.
Integrity requirements
Description
While the same connection works with both versions being the same (v24.12.31 as both client and server), when a client is upgraded to v25.x.x (in my case, v25.3.6), it cannot connect to the upstream and will experience REALITY transport layer dropping their connections (actually, forwarding to imitated server) with the following error:
I think this might be related to carrying "Xray-core version" in REALITY's ClientHello instead of defining separate "REALITY Protocol versions" to keep compatibility between Xray releases and between major releases.
If you use same versions on both sides, you won't experience such problems, but with a client having gone through a major release cycle, it will fail. (Haven't tested it the other way around with 24.12.31 client and 25.x.x server)
Reproduction Method
Client config
Outbound:
Server config
Inbound:
Client log
Copied from journalctl:
Server log
Nothing related to these problematic connections.