Skip to content

REALITY client (v25.3.6) fails to connect to upstream server (v24.12.31) #6386

Description

@hadi77ir

Integrity requirements

  • I have read all the comments in the issue template and ensured that this issue meet the requirements.
  • I confirm that I have read the documentation, understand the meaning of all the configuration items I wrote, and did not pile up seemingly useful options or default values.
  • I provided the complete config and logs, rather than just providing the truncated parts based on my own judgment.
  • I searched issues and did not find any similar issues.
  • The problem can be successfully reproduced in the latest Release

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions