Back to Blog

XHTTP vs WebSocket vs gRPC for VLESS

Technical Editorial Team · Published October 3, 2026

XHTTP, WebSocket, and gRPC are transports: they carry proxy data between client and server. VLESS is the proxy protocol carried over them, while TLS or REALITY handles connection security.

For most users, there is no need to choose a transport in isolation. If your provider gives you a working subscription, use the transport included in that profile. But if you are setting up a server, comparing providers, or troubleshooting compatibility, the differences matter.

For a quick explanation of the layers, see What Is VLESS?.

WebSocket: mature and widely supported

WebSocket starts as an HTTP connection and upgrades to a persistent two-way connection. It has been used with VLESS for years and is supported by a large number of clients, reverse proxies, and CDN configurations.

Its biggest advantage is compatibility. If you already have a stable VLESS + WebSocket deployment behind a reverse proxy or CDN, there may be little reason to replace it just because a newer transport exists.

The trade-off is that WebSocket has a recognizable HTTP/1.1 upgrade pattern. Current Xray documentation recommends considering XHTTP for compatible deployments rather than treating WebSocket as the default for new setups.

If you use a CDN, remember that the hostname, path, TLS settings, CDN rules, and origin must all agree. See VLESS with Cloudflare CDN for that architecture.

gRPC: HTTP/2 and structured streams

gRPC is based on HTTP/2. It works well when the network path already supports HTTP/2 and gRPC correctly, and it can carry proxy traffic through compatible reverse proxies.

Compared with WebSocket, the setup is more dependent on the infrastructure in front of the server. The service name, HTTP/2 support, TLS configuration, and proxy behavior all need to match.

Xray's current documentation recommends XHTTP for new compatible deployments and notes limitations around gRPC, including fallback behavior. That does not mean an existing gRPC server needs to be replaced if it is already stable.

XHTTP: the newer Xray direction

XHTTP is a newer Xray transport designed around HTTP traffic. It supports several operating modes that can handle upload and download traffic differently, rather than using one fixed connection pattern.

For users, the important point is simpler: XHTTP is becoming the preferred direction for modern Xray deployments when both the server and client support it. Current Mihomo versions also support VLESS XHTTP configurations.

The main limitation is compatibility. Older clients, older bundled cores, subscription converters, or other proxy cores may not understand the same XHTTP profile. Before migrating, check the complete client-to-server path.

XHTTP vs WebSocket vs gRPC

TransportMain strengthMain consideration
WebSocketBroad support and familiar CDN/reverse-proxy setupsOlder HTTP upgrade model
gRPCWorks naturally with HTTP/2 infrastructureMore demanding proxy and HTTP/2 configuration
XHTTPNewer Xray transport with flexible HTTP modesRequires sufficiently recent client and server support

This is not a speed ranking. A nearby, well-routed WebSocket server can easily outperform a distant XHTTP server. Routing, congestion, packet loss, server load, and the network you are using usually matter more than the transport name alone.

Which transport should you choose?

Keep WebSocket if your current deployment is stable, your clients support it well, or you depend on an existing CDN/reverse-proxy setup.

Keep gRPC if your HTTP/2 infrastructure is already working reliably and all of your clients support the profile.

Consider XHTTP for a new Xray deployment when both client and server support it. It is the direction current Xray documentation recommends over WebSocket and gRPC for compatible new configurations.

There is little value in migrating a stable server only to use the newest transport. The better reason to move is when XHTTP fits your current clients and infrastructure better.

What about TLS and REALITY?

Transport and security are separate choices. Xray documents TLS with WebSocket, gRPC, and XHTTP. REALITY is currently documented with RAW, XHTTP, and gRPC, not WebSocket.

So a VLESS + WebSocket + TLS profile cannot simply become a REALITY profile by changing one setting. VLESS REALITY vs TLS explains the difference.

If your provider supplies a subscription, the easiest approach is usually to import the profile as provided rather than rebuilding it manually. The VLESS client comparison can help you choose an app, and WahooVPN users can follow the third-party app import guide.

Sources: Xray transport compatibility, Xray WebSocket, Xray gRPC, and Mihomo XHTTP configuration.