Who writes this line
The text comes from the REALITY handler inside Xray, and it is emitted on the side that owns the private key — the server. A client running v2rayN does not print it. If you are seeing it, one of three things is true: you are reading your own server's journal, you are reading a provider's log panel, or you are reading someone else's paste.
This matters before any diagnosis, because the usual first reaction is to reinstall the client. The client is not the component that produced the message.
| Where you see it | What it means |
|---|---|
| Server journal / provider panel | An inbound connection failed REALITY authentication and was relayed to dest |
| Client log | Rare. Either the client is echoing a server banner, or it is not REALITY at all |
| Log of a self-hosted server you also use | Usually internet background noise hitting the port |
Why the line is normal most of the time
REALITY listens on a port and behaves like the TLS site it borrows. Anything that connects without the correct authentication data is treated as a visitor and proxied to dest — the real site. That includes port scanners, crawlers, active probes, and health checkers. Every one of them produces exactly one processed invalid connection line.
A busy server on a public port will emit these continuously. The rate correlates with scanning activity, not with your users. So the line is only diagnostic when it appears at the same moment a client fails, and repeats with the same cadence as the client's reconnect attempts.
The test: note the client's retry interval. If the server lines arrive in the same rhythm, it is your client. If they arrive in bursts unrelated to it, it is noise.
The five fields that must match
REALITY authenticates a client with data carried inside the TLS handshake. Five values from the client must agree with the server's inbound block. Any one of them wrong produces the same generic line, which is why the log alone cannot localise the fault.
| Client field | Server counterpart | Failure signature |
|---|---|---|
publicKey (pbk) | privateKey | Always fails, every attempt |
shortId | shortIds list | Fails only if the server list is non-empty and yours is absent |
serverName (SNI) | serverNames list | Fails when SNI is not in the allowed set |
fingerprint | uTLS profile name | Usually works, occasionally rejected — mismatched ClientHello shape |
flow | flow | Handshake completes, then the connection dies at first data |
Two of these are copied by hand most often: the public key and the short ID. A public key is 43 characters of base64url with no padding. A single transposed character still looks structurally valid — it will not be rejected at paste time, only at connect time. Compare against the server's config by diffing the exact strings, not by eye.
The shortId trap
shortIds is a list on the server and a single value on the client. The client's value must match one entry exactly — REALITY does not do prefix matching across entries. Two situations produce silent failures:
- The server lists
["", "ab12"]and the client sendsab12— this works. - The server lists
[""]only, meaning "empty short ID allowed", and the client sendsab12— this fails, because the empty entry only accepts empty.
So if the server has an empty string in the list and the client sends anything non-empty, authentication fails. Either leave the client's short ID blank to match the empty entry, or add the client's value to the server list. Do not assume the empty entry acts as a wildcard.
Clock skew, and why it is not usually the answer
REALITY binds authentication to the handshake, and certificates carry validity windows. A client whose clock is far off can fail on the borrowed certificate rather than on the authentication token — but that produces a certificate error on the client, not processed invalid connection on the server. Do not chase clock skew unless the client also reports a time-related TLS error. This message points at the key material, not at time.
Reading the sequence, not the line
A single line proves nothing. The useful pattern is the pairing of a server line with a client failure in the same second, repeated. If you have shell access to the server, watch both at once:
journalctl -u xray -f | grep -i reality
Keep the client's log window open next to it and retry once. If one server line appears per client attempt, the client is failing authentication — go through the five fields in order, starting with the public key. If no line appears at all while the client fails, REALITY authentication never completed: the handshake died earlier, and the cause is the transport, the port, or an interception device, not the keys.
What to change, in order
- Diff the client's
publicKeyagainst the server'sprivateKeyby deriving the public half, or by re-copying from the sharing link rather than from a screenshot. - Check
shortIdagainst the full server list, including the empty-string case above. - Check
serverNameagainstserverNames. The SNI must be one the server accepts; a borrowed site name from a different server will not do. - Confirm the client's REALITY support matches the server's. Older clients cannot complete the handshake with newer server builds.
- Only then consider the transport: if no server line appears, move to a port-reachability test.
Frequently asked
Is this message a sign the server is under attack?
No. It is what the server writes for any unauthenticated visitor, which includes ordinary scanners. Judge by volume relative to your own connection attempts, not by the line's presence.
My client connects fine but the server keeps printing it. Why?
Because other traffic is hitting the port. A REALITY port on a public address receives constant background scanning. The lines are the fallback doing its job.
Does a wrong shortId always fail?
Only when the server's list is non-empty. If the list contains only an empty string, the client must also send an empty value — a non-empty shortId is rejected, not accepted as a wildcard.
Can a wrong fingerprint cause this?
It can change the ClientHello enough to fail, but it is a much rarer cause than a wrong public key. Change one field at a time so the result is attributable.
Why does the log not name which field failed?
By design. REALITY makes a failed authentication indistinguishable from a normal visitor being relayed, otherwise the port would be fingerprintable. Localisation has to come from comparing configs, not from the log.