Xray: “failed to dial” or “TLS handshake timeout”
VLESS + Reality troubleshooting
Updated
What you see
Your client's log — in v2rayNG, Hiddify, NekoBox or a desktop Xray — shows lines like these when you try to connect:
failed to find an available destination > common/retry: [dial tcp 203.0.113.24:443: i/o timeout] > common/retry: all retry attempts failed dial tcp 203.0.113.24:443: connect: connection refused net/http: TLS handshake timeout
What it means
“Failed to dial” means Xray couldn't open a connection to your server. The words at the end say why, and each points to a different fix. “i/o timeout” means nothing answered at all. “Connection refused” means the server answered, but nothing is listening on that port. A TLS handshake timeout means the connection opened, but the encrypted handshake on top of it stalled.
Quick fix
Read the end of the error. Timeout: check the firewalls, and whether your network blocks the server. Refused: check that Xray is running on the port in your link. TLS handshake timeout: try a different server name (SNI), and check the server can reach its Reality target.
Causes and how to fix them
1. “i/o timeout”: something drops the packets
Your hosting company's firewall, the server's own firewall or the network you're on is silently dropping the connection. Open TCP 443 at the host and on the server, then test from your device:
Test-NetConnection 203.0.113.24 -Port 443
If the test works on mobile data but not on your Wi-Fi, or the other way round, that network is blocking the server.
2. “connection refused”: nothing is listening
The server is reachable, but Xray isn't running, or it listens on a different port from the one in your link. On the server:
sudo systemctl status xray sudo ss -tlpn | grep xray
If Xray won't start, its log says why. Often another program, such as a web server, already holds port 443.
3. “no such host”: the address doesn't resolve
If your link uses a domain name rather than an IP address, that name has to point at the server. Look it up and compare the answer with the server's IP:
nslookup vpn.example.com
4. TLS handshake timeout: the server name is filtered
The server name (SNI) is the one part of a TLS handshake sent in plain text, and some networks filter on it. If the site your server imitates is blocked or throttled where you are, the handshake stalls. Change the server's Reality target and server name to another large site that loads normally in your country, then import the new link.
5. TLS handshake timeout: the server can't reach its target
Reality borrows the TLS handshake of a real website — its target, or dest, such as www.microsoft.com:443. If the server can't connect to that site, because of a DNS problem or an outbound block at the host, handshakes hang. On the server, using your own target's address:
curl -sI https://www.microsoft.com | head -1
Using Nullsify?
On Nullsify you set the Reality target and server names in the server's VLESS settings, and you can switch the transport to XHTTP if TCP tunnels are being filtered. Changing those settings regenerates the server's keys, so get each device's link again with Get Config afterwards.
Free for 1 server. Bring your own VPS — Nullsify configures WireGuard, AmneziaWG or VLESS on it for you.
Related problems
- “context deadline exceeded” / timeout VLESS + Reality
- “bind: address already in use” VLESS + Reality
- Xray service won't start VLESS + Reality