What is XTLS Vision: the xtls-rprx-vision flow explained

XTLS Vision is a flow of the VLESS protocol in Xray, written as flow=xtls-rprx-vision in a link. Most traffic inside a VPN is already TLS, the HTTPS of the sites you open: Vision pads the inner TLS handshake so its packet sizes don't stand out, then passes the encrypted data on without encrypting it a second time. It isn't an alternative to Reality: Reality or TLS protects the connection to the server, Vision decides how VLESS carries data inside it. It works over TCP (RAW) with TLS or Reality, without mux, and the link and the server need the same flow.

Updated

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.

  • security

    What it decidesWhat protects the connection to the server

    Typical valuesreality, tls, none

  • flow

    What it decidesHow VLESS carries data inside that protection

    Typical valuesxtls-rprx-vision or empty

  • type

    What it decidesThe transport: how the bytes travel

    Typical valuestcp (raw), xhttp, ws, grpc

  • encryption

    What it decidesVLESS's own encryption

    Typical valuesnone; 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 flow empty 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

Link
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#server

flow=xtls-rprx-vision stands next to security=reality and type=tcp. No flow in the link means no Vision.

Xray, client: the user in the outbound
"users": [{ "id": "UUID", "encryption": "none", "flow": "xtls-rprx-vision" }]

Inside vnext; streamSettings has "network": "raw" (or tcp) and "security": "reality" or tls.

Xray, server: the client in the inbound
"clients": [{ "id": "UUID", "flow": "xtls-rprx-vision" }]

Each user has its own flow, and it must match that user's link.

sing-box, client
{ "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.

On the server
xray run -test -config /usr/local/etc/xray/config.json

Loads 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 to xtls-rprx-vision on the server and in every link, with tls or reality.
  • 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

On the server
journalctl -u xray -n 50 --no-pager

The 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 version

    CauseAn old XTLS flow, removed in Xray 1.8.0

    What to doxtls-rprx-vision with tls or reality, on the server and in the links

  • unsupported flow: xtls-rprx-vision-udp443 in a client built on sing-box

    Causesing-box knows only xtls-rprx-vision

    What to doChange the flow in the link to xtls-rprx-vision; the server sees no difference

  • Server log: account … is rejected since the client flow is empty

    CauseThe server has Vision for this user, the link doesn't

    What to doAdd flow=xtls-rprx-vision to the link

  • Server log: account … is not able to use the flow xtls-rprx-vision

    CauseThe 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=none

    What to dosecurity=reality or tls with type=tcp, or an empty flow

  • The flow is set with type=ws, grpc or xhttp

    CauseWith TLS or Reality, Vision works only over TCP (RAW)

    What to doLeave flow empty in the link and on the server, or move to TCP

  • failed to use xtls-rprx-vision, found outer tls version and a number, 771 for TLS 1.2

    CauseThe 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 traffic

    CausePlain Vision drops QUIC on purpose, and the browser switches to TCP

    What to doNothing; for a program that needs QUIC, xtls-rprx-vision-udp443 in an Xray client

  • The link has flow=xtls-rprx-vision and mux on

    CauseVision can't run inside a multiplexed stream

    What to doTurn mux off for this profile

In Veli

Vision on your own server and in pasted links

When you install VLESS Reality on your own server from the app (Profiles → Add → “Your own server”), Veli sets "flow": "xtls-rprx-vision" for every device on the server and writes the same into each link: encryption=none&flow=xtls-rprx-vision&security=reality&…&type=tcp. The two sides match from the start; “Add a device” gives such a link and a QR code.

A link from elsewhere goes into Profiles → Add as it is. Veli reads flow from it and hands it to the core unchanged: on a computer VLESS over TCP runs on sing-box, while xhttp, mKCP and VLESS encryption run on Xray; on Android everything runs on the built-in Xray. If a Vision link also asks for mux, Veli doesn't turn multiplexing on. /tools/link-check/ shows a link's fields and warns about an old flow, Vision without TLS and Vision with another transport.

FAQ

What is XTLS Vision?

A flow of the VLESS protocol in Xray, xtls-rprx-vision. It pads the inner TLS handshake so its sizes don't stand out, and doesn't encrypt already encrypted TLS traffic a second time.

Is Vision needed with Reality?

Not required: Reality works with an empty flow. But without Vision the pattern of TLS inside TLS stays visible, so most Reality setups over TCP use it, the server Veli installs included.

Does Vision make the connection faster?

It saves processor work, because HTTPS traffic isn't encrypted twice. That shows on weak devices and at high speeds; on a typical connection the network and the server set the speed.

What is the difference between XTLS and TLS?

TLS protects the connection to the server. XTLS Vision works on top of TLS or Reality and changes how VLESS carries data inside; it doesn't replace them. The old XTLS with its own security type was removed from Xray in 2023.

Can I just remove flow from the link?

Only together with the server. If the server's user has Vision, a link without a flow is refused: remove it on both sides or on neither.

Is REALITY a protocol?

Not on its own. REALITY is a security layer for VLESS in Xray, used in place of TLS. The protocol is still VLESS, and Vision is its flow.

Reality with Vision, set up for you

Install VLESS Reality on your own server from Veli: keys, the Vision flow and a link for every device come ready, and both sides match.