Guides

VLESS transports compared: HTTPUpgrade, WebSocket, gRPC, XHTTP, RAW

VLESS can run over six Xray transports. For a direct connection, RAW (plain TCP) with REALITY and the Vision flow is the fastest setup, and Vision works only on RAW. For a CDN or a reverse proxy, Xray now recommends XHTTP, which also works with REALITY. HTTPUpgrade, WebSocket and gRPC still work, but Xray-core v26 prints a deprecation warning for each. HTTPUpgrade is the WebSocket opening handshake without WebSocket framing: it passes the same proxies with a little less overhead.

ST Muntaha11 min read

The transport is the layer under VLESS: how its bytes travel between client and server. It is set in streamSettings and appears in links as type=. The choice decides whether you can use REALITY, whether a CDN can carry the traffic, whether Vision works, and which client apps can import the link at all. This post compares the options as of Xray-core v26.10.31 and sing-box 1.14.4, the current releases on 1 November 2026. If you are new to VLESS itself, start with VLESS protocol explained.

Which transports can VLESS use in Xray-core?

Six transports carry VLESS in practice:

  • RAW (raw, formerly tcp): VLESS directly on a TCP connection.
  • XHTTP (xhttp, formerly SplitHTTP, renamed at the end of 2024): VLESS inside HTTP requests and streaming responses.
  • gRPC (grpc): VLESS inside gRPC streams over HTTP/2.
  • WebSocket (websocket or ws): an HTTP/1.1 upgrade, then WebSocket frames.
  • HTTPUpgrade (httpupgrade): an HTTP/1.1 upgrade, then a raw stream.
  • mKCP (mkcp or kcp): a reliable stream over UDP.

Xray-core v26 also has hysteria (the QUIC layer of Hysteria2) and masque methods. They require TLS, don't support REALITY, and are mostly used with their own protocols, so I leave them out here.

Two transports are gone. The HTTP/2 transport (h2, http) was removed in v24.12.18, and Xray now fails with The feature HTTP transport (without header padding, etc.) has been removed and migrated to XHTTP stream-one H2 & H3. QUIC was removed in v24.9.7. Old links with type=http or type=quic won't load in a current client.

One naming note for configs: the transport docs now call the network key method (since v26.7.11). v26.10.31 accepts both. I use network below so the snippets also load on older cores.

How do the transports compare?

Transport type= in links Runs over REALITY Vision Through a CDN or reverse proxy sing-box 1.14.4 Xray-core v26 status
RAW tcp TCP Yes Yes No Yes Current
XHTTP xhttp HTTP/1.1, HTTP/2 or HTTP/3 Yes No Yes No Recommended
gRPC grpc HTTP/2 Yes No Yes, if gRPC is allowed Yes Deprecation warning
WebSocket ws HTTP/1.1 upgrade No No Yes Yes Deprecation warning
HTTPUpgrade httpupgrade HTTP/1.1 upgrade No No Yes Yes Deprecation warning
mKCP kcp UDP No No No No Current

All six work with TLS. The Vision column assumes VLESS Encryption is off; with it on, Vision works on any transport. The sing-box column comes from its V2Ray transport docs, which list HTTP, WebSocket, QUIC, gRPC and HTTPUpgrade, and say there is no mKCP. VLESS without a transport covers RAW. XHTTP is not in that list, so an XHTTP link will not work in an app that runs sing-box.

The deprecation warning is printed at startup, for example: The feature WebSocket transport (with ALPN http/1.1, etc.) is deprecated, not recommended for using and might be removed. Please migrate to XHTTP H2 & H3 as soon as possible. The gRPC one points to "XHTTP stream-up H2". These transports still work today. The warning says where the project is going.

What is HTTPUpgrade, and how is it different from WebSocket?

HTTPUpgrade does the first half of WebSocket and skips the second. The client sends an HTTP/1.1 request with Connection: Upgrade, Upgrade: websocket and a valid Sec-WebSocket-Key, and the server answers 101 Switching Protocols, so the opening looks like a WebSocket handshake. After that, WebSocket would wrap every message in a frame with a small header, and every frame from client to server would be masked (XORed with a key, as RFC 6455 requires). HTTPUpgrade sends the bytes as they are.

So HTTPUpgrade passes the same CDNs and reverse proxies that pass a WebSocket upgrade, because the handshake is the same, and it saves the framing work on every packet. The HTTPUpgrade docs say it is not meant for standalone use: run it with TLS.

A server inbound behind nginx, listening only on localhost:

{
  "listen": "127.0.0.1",
  "port": 10000,
  "protocol": "vless",
  "settings": {
    "clients": [{ "id": "4358779f-fff8-4c7c-8051-8103abe626fb" }],
    "decryption": "none"
  },
  "streamSettings": {
    "network": "httpupgrade",
    "httpupgradeSettings": { "path": "/hu-7f3a" }
  }
}

The nginx location that terminates TLS and passes the upgrade through. It is the same as for WebSocket:

location /hu-7f3a {
    proxy_pass http://127.0.0.1:10000;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host;
    proxy_read_timeout 300s;
}

The client side:

"streamSettings": {
  "network": "httpupgrade",
  "security": "tls",
  "tlsSettings": { "serverName": "vpn.yourdomain.com", "fingerprint": "chrome" },
  "httpupgradeSettings": { "host": "vpn.yourdomain.com", "path": "/hu-7f3a?ed=2560" }
}

And as a link:

vless://4358779f-fff8-4c7c-8051-8103abe626fb@vpn.yourdomain.com:443?type=httpupgrade&encryption=none&security=tls&sni=vpn.yourdomain.com&fp=chrome&host=vpn.yourdomain.com&path=%2Fhu-7f3a%3Fed%3D2560#de-fra-hu

The ?ed=2560 on the client's path turns on early data: if the first packet is 2,560 bytes or less, it travels inside the upgrade request, which saves a round trip when the connection opens. The server path stays /hu-7f3a. The weak point is the one the Xray docs name. With WebSocket and HTTPUpgrade, the TLS ALPN is http/1.1 by default (an h2 ALPN would break the upgrade), and Xray's docs call that ALPN a clear traffic pattern. It is the main reason they now recommend XHTTP.

When does WebSocket still make sense?

When you need the widest compatibility. Practically every client app imports type=ws, sing-box supports it as well as Xray, and most CDNs pass WebSocket. It also has a few extras: the server reads X-Forwarded-For from the request to get the user's real IP, and heartbeatPeriod sends WebSocket pings so idle connections are not cut. If your users run a mix of Xray-based and sing-box-based apps through a CDN, WebSocket or HTTPUpgrade over TLS is still the setup that works for all of them. If they all run current Xray, XHTTP is the better choice.

How does gRPC work as a VLESS transport?

gRPC carries VLESS inside HTTP/2 streams. The request path is /<serviceName>/Tun, or /<serviceName>/TunMulti in multi mode, so a reverse proxy can route it by path. HTTP/2 multiplexes many proxied connections over one TCP connection, so don't also turn on Xray's mux with it. The gRPC docs list the catches: gRPC has no Host header setting, so put the real domain in the address or in serverName; a gRPC inbound can't fall back to another service; and the docs recommend a reverse proxy in front because a bare gRPC service can be probed.

Behind nginx, use grpc_pass, and make sure the TLS server block has HTTP/2 on (http2 on; in nginx 1.25.1 and later):

location /grpc-7f3a/ {
    grpc_pass grpc://127.0.0.1:10001;
}

The Xray inbound uses "network": "grpc" with "grpcSettings": {"serviceName": "grpc-7f3a"}. In links, gRPC uses serviceName and mode (gun or multi), and optionally authority. Through a CDN, gRPC needs the CDN to accept gRPC traffic, which on some CDNs is a setting you have to turn on.

gRPC also works with REALITY, which made "VLESS gRPC REALITY" a popular combination. Xray now points those users to XHTTP: the XHTTP write-up says its stream-up mode needs no gRPC library, so it performs better, and its download is a separate request, so it is not affected by CDN limits on gRPC traffic.

What is XHTTP, and why does Xray recommend it?

XHTTP sends VLESS as HTTP requests. Download is always one long streaming response. Upload has three modes:

  • packet-up: the client sends upload data as a series of POST requests. The most compatible mode: it passes almost any HTTP middlebox, including CDNs that buffer whole requests.
  • stream-up: one streaming POST for upload. It carries a gRPC content type by default, which lets it pass Cloudflare's HTTP/2 if gRPC is enabled in the dashboard.
  • stream-one: one request carries both directions.

The default mode is auto. The client picks stream-up with TLS over HTTP/2, stream-one with REALITY, and packet-up otherwise, and the server accepts all three. With TLS or REALITY the client uses HTTP/2. With TLS and alpn set to only h3, it uses HTTP/3 over QUIC. Requests and responses carry random-length padding headers so their sizes don't form a fixed pattern, and XMUX controls how proxied connections share and rotate the underlying HTTP connections. Don't turn on mux with XHTTP. All of this is in XHTTP: Beyond REALITY, the design write-up by the Xray developers.

Two things make XHTTP the default recommendation. It works both with REALITY and through CDNs, so one transport covers a direct connection and a CDN path. And upload and download can take different routes (downloadSettings), for example upload through a CDN and download directly. The write-up's own quick start says that in most setups you only need to set path.

VLESS over XHTTP with REALITY, server side:

"streamSettings": {
  "network": "xhttp",
  "security": "reality",
  "realitySettings": {
    "target": "www.example.com:443",
    "serverNames": ["www.example.com"],
    "privateKey": "WIjetb6W4iVMPUNHFgXWPNIwcHmyAZmYKnjpnN5nCl0",
    "shortIds": ["48047fad2a02cd24"]
  },
  "xhttpSettings": { "path": "/x-7f3a" }
}

Client side:

"streamSettings": {
  "network": "xhttp",
  "security": "reality",
  "realitySettings": {
    "serverName": "www.example.com",
    "fingerprint": "chrome",
    "password": "DVm-D2KuvBWxtDYfTW6rxE-9YY7q53V9HQ413NryNw0",
    "shortId": "48047fad2a02cd24"
  },
  "xhttpSettings": { "path": "/x-7f3a", "mode": "auto" }
}

The keys are examples; generate your own with xray x25519. In links, XHTTP carries only path, host, mode and extra. Everything else goes in extra as JSON, which the operator writes once and puts in the link. Through Cloudflare, keep in mind that it cuts an HTTP response that sends no data for 100 seconds, so long idle connections need keepalives at the application level.

Can I use the Vision flow on these transports?

Only on RAW, with TLS or REALITY. Vision works by reaching into the TLS layer directly under VLESS, and on XHTTP, gRPC, WebSocket or HTTPUpgrade there is an HTTP layer in between. Without VLESS Encryption, a flow on any other transport fails with XTLS only supports TLS and REALITY directly for now. on both sides.

This catches panel setups. A user who has xtls-rprx-vision on a RAW inbound can't keep that flow on an XHTTP inbound. Users on XHTTP, gRPC, WebSocket or HTTPUpgrade need an empty flow on both sides. If the server's user has Vision and the client sends none, the server logs account ... is rejected since the client flow is empty.

Which transports work behind a CDN?

XHTTP, WebSocket, HTTPUpgrade and gRPC, since a CDN only forwards HTTP. WebSocket and HTTPUpgrade need the CDN to support WebSocket, and gRPC needs it to accept gRPC. XHTTP's packet-up mode needs neither, which is why the XHTTP write-up calls it the most compatible mode.

RAW and mKCP never work through a CDN: one is plain TCP and the other is UDP. REALITY never works through a CDN either. The CDN ends the TLS connection with its own certificate, so the REALITY handshake never reaches your server. A CDN setup always uses security=tls, with your domain on the CDN as the SNI.

What do the transports cost in latency and detection?

Each one makes a different trade:

  • RAW + REALITY + Vision: no HTTP layer and no extra round trips. With Vision, TLS 1.3 traffic is not encrypted a second time, and on Linux it can be spliced in the kernel, so CPU use is lowest. To an observer it is a TLS 1.3 connection to the target site's name.
  • WebSocket and HTTPUpgrade: one HTTP round trip for the upgrade on each new connection, unless early data carries the first packet. The ALPN http/1.1 is the known pattern.
  • gRPC: new streams share an existing HTTP/2 connection, so they skip the TCP and TLS handshakes. But over TCP, one lost packet stalls every stream on that connection, and the XHTTP write-up blames stalls in long sessions on gRPC always reusing the same connection.
  • XHTTP: HTTP/2 or HTTP/3 multiplexing, but XMUX opens fresh connections from time to time by default, and padding varies the header sizes. Over HTTP/3, there is no TCP head-of-line blocking, and the connection survives a network change.
  • mKCP: lower latency on lossy links, paid for with more bandwidth than TCP for the same data.

Where does mKCP fit?

mKCP is a reliable stream over UDP. The mKCP docs put it plainly: it "sacrifices bandwidth to reduce latency". Defaults are an MTU of 1350, a TTI of 50 ms, 5 MB/s uplink and 20 MB/s downlink capacity, and the speed you get is the lower of the sender's uplink and the receiver's downlink value. It helps on lossy links where TCP stalls, and it needs the server's UDP port open.

Watch out when mixing versions. In Xray-core v26, mKCP's header and seed settings were removed and moved to FinalMask, and the old default obfuscation is gone too. Current Xray still parses the old fields but ignores them, so an old config loads without an error and then cannot talk to an old server. To connect to a legacy mKCP server, add mkcp-legacy under finalmask. sing-box has no mKCP at all.

How do I choose a transport?

Start from where your users connect from and which apps they run:

  1. Direct to your server, users on Xray-based apps: RAW + REALITY + Vision. It is the fastest, and it is the combination the REALITY README uses as its example.
  2. The server's IP is blocked or you need a CDN: XHTTP over TLS through the CDN. If some users run sing-box-based apps, add WebSocket or HTTPUpgrade over TLS for them, since sing-box has no XHTTP.
  3. One transport for both direct and CDN: XHTTP, with REALITY for direct and TLS for the CDN path.
  4. sing-box users and REALITY: REALITY servers on Xray-core v26.9.9 and later reject sing-box clients for now, whatever the transport. See Xray REALITY not working for the cause and the workarounds.
  5. TCP is throttled but UDP works: mKCP is an option. So is a QUIC-based protocol such as Hysteria2, which is built for lossy links.

Whichever you pick, test it the way users connect: through the CDN if users go through the CDN, with the same path and SNI as in their links. How to check a VLESS key shows how to test a link layer by layer. Full disclosure: TunnelHQ does this continuously. It takes the vless:// link itself, completes the real handshake over the link's transport and security, and sends requests through the tunnel every 1 to 5 minutes depending on plan. VLESS monitoring explains the check, and every plan starts with a 14-day free trial.