On this page
What Vision does
Open an HTTPS site through a VLESS server with TLS, and you get TLS inside TLS: the browser's own handshake travels inside the encrypted connection to the server. Encryption hides the content, not the sizes and timing of packets, and the first packets of a TLS handshake have well-known sizes. A filter that watches for this pattern can tell a proxy from an ordinary visit to a site.
Vision does two things. It adds random padding to the packets of the inner handshake, so their lengths no longer match the pattern. And once the inner TLS 1.3 connection is up, it stops wrapping that data in a second layer: bytes the site has already encrypted go on as they are, which saves processor work on both ends. Traffic that isn't TLS 1.3 inside goes the ordinary way, under the outer encryption.
XTLS is the name of the team behind Xray and of this family of techniques; vision is its current version. sing-box supports the same flow.
Vision and Reality: different layers
Reality replaces the server's own certificate: the server answers the TLS 1.3 handshake on behalf of a real website, and a prober without the key gets that site. Vision only changes what travels inside. So “Vision or Reality” is not a choice: in the most common setup they work together, each in its own field of the link.
securityWhat it decidesWhat protects the connection to the server
Typical values
reality,tls,noneflowWhat it decidesHow VLESS carries data inside that protection
Typical values
xtls-rprx-visionor emptytypeWhat it decidesThe transport: how the bytes travel
Typical values
tcp(raw),xhttp,ws,grpcencryptionWhat it decidesVLESS's own encryption
Typical values
none; a key in newer setups
Where Vision works
Newer Xray versions also run Vision on top of VLESS's own encryption (encryption other than none), and there the Xray docs set no limit on the transport. With TLS or Reality the rule stays: TCP (RAW) only.
- VLESS + TCP (RAW) + Reality + Vision — the most common setup today:
type=tcp&security=reality&flow=xtls-rprx-vision, no domain or certificate needed. - VLESS + TCP + TLS + Vision — the same with your own domain and certificate:
security=tls. - Other transports with TLS or Reality — xhttp, WebSocket, gRPC and the rest go without Vision: leave
flowempty in the link and on the server. - Without mux — Vision can't run inside a multiplexed stream, so mux stays off.
- TLS 1.3 outside — Xray checks that the outer TLS is 1.3. Reality always is; an ordinary TLS server must allow it.
Vision in a link and in a config
vless://UUID@203.0.113.10:443?encryption=none&flow=xtls-rprx-vision&security=reality&sni=www.example.com&fp=chrome&pbk=PUBLIC_KEY&sid=SHORT_ID&type=tcp#serverflow=xtls-rprx-vision stands next to security=reality and type=tcp. No flow in the link means no Vision.
"users": [{ "id": "UUID", "encryption": "none", "flow": "xtls-rprx-vision" }]Inside vnext; streamSettings has "network": "raw" (or tcp) and "security": "reality" or tls.
"clients": [{ "id": "UUID", "flow": "xtls-rprx-vision" }]Each user has its own flow, and it must match that user's link.
{ "type": "vless", "server": "203.0.113.10", "server_port": 443, "uuid": "UUID", "flow": "xtls-rprx-vision" }The flow sits next to uuid; the tls block with reality goes alongside, without multiplex.
xray run -test -config /usr/local/etc/xray/config.jsonLoads the config without starting it: an old or unknown flow is named in the error. /tools/link-to-json/ turns a link into an Xray or sing-box config with the flow in place.
Old flows and the udp443 variant
- xtls-rprx-origin, xtls-rprx-direct, xtls-rprx-splice — the first generation of XTLS, which came with its own
"security": "xtls". Xray removed them in version 1.8.0 (March 2023), and a config with them doesn't load. Old links and guides still carry them: change the flow toxtls-rprx-visionon the server and in every link, withtlsorreality. - xtls-rprx-vision-udp443 — a client-side variant in Xray: the same Vision, but it doesn't drop UDP to port 443. Plain Vision drops it on purpose: that is QUIC, and the browser falls back to ordinary HTTPS over TCP. The variant is for a program that works only over QUIC. The server knows only
xtls-rprx-vision, and sing-box doesn't know the variant.
Errors: what you see and what to do
journalctl -u xray -n 50 --no-pagerThe last 50 lines of the Xray log, where the account lines appear. If your attempts leave none, set "loglevel": "info" in log, restart Xray, and set it back afterwards.
Xray won't start:
VLESS users: "flow" doesn't support "xtls-rprx-direct" in this versionCauseAn old XTLS flow, removed in Xray 1.8.0
What to do
xtls-rprx-visionwithtlsorreality, on the server and in the linksunsupported flow: xtls-rprx-vision-udp443in a client built on sing-boxCausesing-box knows only
xtls-rprx-visionWhat to doChange the flow in the link to
xtls-rprx-vision; the server sees no differenceServer log:
account … is rejected since the client flow is emptyCauseThe server has Vision for this user, the link doesn't
What to doAdd
flow=xtls-rprx-visionto the linkServer log:
account … is not able to use the flow xtls-rprx-visionCauseThe link has Vision, the server's user doesn't
What to doRemove the flow from the link or add it on the server: both sides the same
Client log:
XTLS only supports TLS and REALITY directly for now.CauseThe flow is set, but
security=noneWhat to do
security=realityortlswithtype=tcp, or an empty flowThe flow is set with
type=ws,grpcorxhttpCauseWith TLS or Reality, Vision works only over TCP (RAW)
What to doLeave
flowempty in the link and on the server, or move to TCPfailed to use xtls-rprx-vision, found outer tls versionand a number, 771 for TLS 1.2CauseThe outer TLS came up as 1.2, and Vision needs 1.3
What to doAllow TLS 1.3 on the server; Reality always gives 1.3
Log line
XTLS rejected UDP/443 trafficCausePlain Vision drops QUIC on purpose, and the browser switches to TCP
What to doNothing; for a program that needs QUIC,
xtls-rprx-vision-udp443in an Xray clientThe link has
flow=xtls-rprx-visionand mux onCauseVision can't run inside a multiplexed stream
What to doTurn mux off for this profile