On this page
What happens in a Reality handshake
A Reality client opens the connection like a browser visiting the masking site: the site's name goes into the sni, and a hidden tag goes into the handshake, made with the server's public key (pbk) and the short ID (sid). The server checks the tag with its private key. If it fits, the server answers with its own temporary certificate and the VPN starts. If not, the server quietly passes the connection on to the real website.
So to the client every mismatch looks the same: the real website's certificate came back instead of your server's. sing-box and the clients built on it (Hiddify, NekoBox and others) write reality verification failed; Xray-based clients such as v2rayN and v2rayNG write a REALITY line about a real certificate, and the connection breaks off.
On the server the same event leaves REALITY: processed invalid connection in the Xray log. A few such lines from unknown addresses are normal: scanners knock on every server and get the masking site, as intended. A line at each of your own attempts means your client is being turned away.
What you see, why, and what to do
reality verification failedat once, the address and port openCause
pbkdoesn't match the server's private key: the server got new keys, or the link is from another serverWhat to doDerive the public key from the server's private key and compare it with
pbkThe same after the server's settings were changed
Cause
sidisn't in the server'sshortIdsWhat to doPut one of the
shortIdsintosid, or add yours on the server and restart XrayThe same, and the server's log shows a line at each attempt
Cause
sniisn't in the server'sserverNamesWhat to doTake
snifromserverNamesexactly, with or withoutwww.as written thereThe client refuses the profile and asks for uTLS or a fingerprint
CauseThe link has no
fpWhat to doAdd
fp=chrometo the linkEOFor a timeout for every client, even with a fresh linkCauseThe server can't reach its masking site (
dest)What to doRun
xray tls pingfor that site on the server; pick another site with TLS 1.3Verification passes, then
EOF; the server's log saysinvalid request user idCauseThe UUID in the link isn't among the server's clients
What to doCompare the id before the @ in the link with the server's
clientslistVerification passes, then the server drops the connection
Cause
flowdiffers:xtls-rprx-visionon one side onlyWhat to doSet the same
flowin the link and in the server's client entryreality verification failedwith any link to this addressCauseThe server isn't Reality: plain TLS, another program or another port
What to doCheck
securityin the server's settings and that the link's port is Reality's
How to read a Reality link
The whole profile fits in one line:
vless://9e2a4c1d-7b3f-4e8a-a1c5-2f6d8b0e3a71@203.0.113.5:443?encryption=none&flow=xtls-rprx-vision&security=reality&sni=www.example.com&fp=chrome&pbk=public-key&sid=6ba85179e30d4fc2&type=tcp#reality- The id before the @ — the UUID, the client's ID. It must be in the server's
clientslist. security=reality— this is what makes the link Reality. Withsecurity=tlsit is ordinary TLS, and pbk and sid are not used.pbk— the server's public key, 43 characters. It is derived from the server's private key, and only from it.sid— the short ID: up to 16 characters from 0–9 and a–f, an even number of them. It must be one of the server'sshortIds; an empty sid works only if that list has an empty entry.sni— the masking site's name, exactly as in the server'sserverNames.fp— the browser fingerprint the client imitates: chrome, firefox, safari and others. Reality needs one.flowandtype— usuallyxtls-rprx-visionand tcp. Both must be the same as on the server.
Check the server: the log and the keys
If the server is yours and Xray was installed with the official script, the settings are in /usr/local/etc/xray/config.json, in the realitySettings block: privateKey, shortIds, serverNames and dest.
journalctl -u xray -n 50 --no-pagerThe last 50 lines of the Xray log. REALITY: processed invalid connection at each of your attempts — the client isn't recognized: compare pbk, sid and sni. invalid request user id — Reality passed, but the UUID is wrong. If your attempts leave no lines, set "log": { "loglevel": "info" } in config.json and restart Xray; afterwards set it back to warning.
xray x25519 -i "PRIVATE_KEY"Put the privateKey from realitySettings in place of PRIVATE_KEY. The public key line it prints (Password (PublicKey) in current Xray, Public key in older versions) must equal pbk in the link character for character.
xray tls ping www.example.comChecks the masking site from the server; the answer should show TLS 1.3. If it can't connect, the server doesn't reach the site: pick another and change both dest and serverNames, then the sni in every link.
xray run -test -config /usr/local/etc/xray/config.jsonChecks the settings file without starting it. After any change: systemctl restart xray, one connection attempt, and the log again.
Less common causes
- The link got damaged — a pbk missing one character or a line break inside the link gives the same error, and sing-box may write
invalid public_keyorinvalid short_id. Copy it again, whole. - TLS fragmentation is on in the client — it breaks the Reality handshake. Turn it off for Reality profiles.
- The server limits the time difference — with
maxTimeDiffin realitySettings, a device whose clock is off by more than that is turned away. Turn on automatic time on the device. - The server limits client versions —
minClientVerandmaxClientVerturn away Xray clients that are too old or too new. - Another program holds port 443 — nginx or a panel answers instead of Xray.
ss -tlnp | grep :443shows who listens there. - The masking site changed — the server worked for months and then stopped: the site changed its TLS settings. Pick another site.