Skip to main content
Fexyn
Fexyn
All posts

Xray-core explained: the engine that runs VLESS and REALITY

Updated 11 min read

Xray-core is not a VPN protocol. It is an open-source proxy platform, written in Go and released under the MPL-2.0 licence by Project X (XTLS/Xray-core). It runs protocols such as VLESS, VMess, Trojan and Shadowsocks, carries them over a choice of transports, and adds a security layer such as TLS or REALITY on top. Fexyn runs it on its servers for Fexyn Stealth, the mode built for networks that block VPNs.

In short:

  • Xray-core is the engine. VLESS, VMess, Trojan and Shadowsocks are protocols it runs.
  • REALITY decides what an observer sees, and XHTTP decides how the bytes travel. They can be combined.
  • We found no published study that says which design works best in a given country in 2026, so this page does not say either.

Everything below comes from the Xray documentation, the project's repositories and published research, checked on 8 November 2026. Xray changes quickly, so the dates matter.

Where Xray came from

V2Ray started in 2015; its licence reads "Copyright (c) 2015-2020 V2Fly Community" (LICENSE). It introduced VMess and a design where each protocol can use its own transport (v2fly.org). The original repository now points to the community project, v2fly (v2ray/v2ray-core).

XTLS, a way of handling traffic that is already TLS-encrypted, was part of v2fly until version 4.33.0. Its release notes, from 20 November 2020, list "Remove XTLS" as a breaking change (v4.33.0 notes). Xray's README says "Xray-core v1.0.0 was forked from v2fly-core 9a03cc5", and the project's own history page records "The first version of Xray" on 25 November 2020 (Xray news).

Since then the same history page records:

Date Release
29 October 2022 XTLS Vision flow control
9 March 2023 REALITY
19 June 2023 VMess MD5 authentication and MTProto removed
18 June 2024 A new HTTP transport, then called SplitHTTP
7 September 2024 QUIC and DomainSocket transports removed
31 October 2024 SplitHTTP renamed XHTTP, with separate upload and download paths

v2fly is still maintained. Its v5 documentation lists transports such as TCP, WebSocket, mKCP, gRPC, QUIC and Hysteria 2, but not REALITY, XTLS Vision or XHTTP (v2fly v5 docs).

How Xray is configured

Xray reads a JSON file: "The configuration file for Xray is in JSON format" (config docs). The main parts are:

  • Inbounds: what Xray listens for, such as a VLESS server or a local SOCKS proxy.
  • Outbounds: where it sends traffic, such as a remote server or straight to the internet.
  • Routing: rules that choose an outbound. "The routing module can send inbound data through different outbound connections based on different rules" (routing docs). A rule can match a domain and send it to a named outbound.

Protocols, transports and security

Each connection combines three choices, though not every combination is valid. XTLS Vision, for example, is documented for the RAW transport with TLS or REALITY.

Protocols decide how the client identifies itself and frames the traffic:

  • VLESS is "a stateless lightweight transport protocol". Its encryption setting "Cannot be left empty"; it is either none, which relies on the security layer, or VLESS Encryption, which offers the post-quantum mlkem768 (VLESS docs).
  • VMess, the V2Ray protocol, supports aes-128-gcm, chacha20-poly1305 and auto (VMess docs).
  • Shadowsocks includes the 2022 methods such as 2022-blake3-aes-128-gcm (Shadowsocks docs).
  • Trojan is supported as well (Trojan docs).

Transports decide how the bytes travel. The current list is "raw", "xhttp", "mkcp", "grpc", "websocket", "httpupgrade", "hysteria" and "masque" (transport docs). RAW is the old TCP transport under a new name. The QUIC transport went in September 2024, and the HTTP/2 transport was "Migrated to XHTTP 'stream-one' mode" in December 2024 (PR #4071). Older guides that list QUIC or h2 are out of date.

Security decides what an observer sees: TLS, or REALITY, described below.

XTLS Vision

A proxy that carries an HTTPS site inside its own TLS connection encrypts the same data twice. XTLS Vision addresses that. The VLESS docs describe it as "Use XTLS, including inner handshake random padding", and say that over TLS or REALITY, "if transmitting TLS 1.3, the core will attempt to Splice encrypted data at the bottom layer" (VLESS docs). On Linux that splice means "The system kernel forwards TCP directly, no longer passing through Xray's memory."

The padding is the other half. It changes the length of the handshake packets inside the tunnel (PR #1235). Handshakes carried inside a tunnel are one of the patterns that research on proxy detection studies (see below). The Xray docs give no throughput figures, so this page gives none either.

REALITY

REALITY is a security option, set where TLS would otherwise go. It answers a question disguised proxies face: what happens when someone who is not a client connects to the server?

According to the REALITY docs, "Xray directly forwards traffic that fails authentication" to a target, a real website chosen by the server operator. The REALITY README says that to an outside party the server behaves like port forwarding to that site, that the operator does not need to buy a domain or set up a TLS server, that the target must support TLS 1.3 and HTTP/2, and that the client imitates a browser's TLS fingerprint through uTLS, Chrome by default. The same README warns that protocols without XTLS still show a TLS-in-TLS pattern.

For how VLESS and REALITY work together in practice, see the VLESS Reality protocol guide.

XHTTP

XHTTP is Xray's HTTP-based transport. When it arrived as SplitHTTP in June 2024, the project said it "allows passing through CDNs that do not support WebSocket or gRPC" (Xray news). In October 2024 the project added the option of separating uploads and downloads, and XHTTP has several modes, including packet-up, stream-up and stream-one (XHTTP docs). Xray's developer RPRX has described running XHTTP together with REALITY (discussion #4113).

NaiveProxy compared with XHTTP and REALITY

People often weigh these against each other, but they are not the same kind of thing. NaiveProxy is a complete proxy. REALITY is a security layer, and XHTTP is a transport, so a single Xray connection can use both.

Their own documentation shows how NaiveProxy and REALITY differ:

NaiveProxy VLESS with REALITY
Browser fingerprint Reuses Chromium's network stack Imitates a browser's TLS fingerprint through uTLS, Chrome by default
Server setup Behind a web server you run, such as Caddy with its forwardproxy plugin, or HAProxy The Xray server itself, with a real third-party website set as its target
Own domain and certificate The README's example setup uses a domain with its own TLS certificate Not needed
A visitor without the key Answered by the front web server ("application fronting") Forwarded by the Xray server to the target website
Packet lengths "mitigated by padding and fragmentation" Padding of the inner handshake, with XTLS Vision

Sources: the NaiveProxy README, the REALITY README and the REALITY docs.

XHTTP is not an alternative to either. It is a transport that can run together with REALITY, or pass through a CDN, as described above.

No primary source we found measures these against each other. We also found no published detection rate or success rate, and nothing that says which one works better in a given country in 2026. A claim like that needs a published method behind it, and one test from one network is not enough.

Hysteria 2 takes a different route again, over QUIC, and Xray has included a Hysteria 2 inbound and transport since v26.3.27 (release notes). For that comparison, see Hysteria vs VLESS Reality.

What research has measured

Four peer-reviewed studies describe specific methods at specific times. Three measured the Great Firewall in China; the fourth tested a detection method the way a censor could use it:

  • 2020, Shadowsocks. The Great Firewall "uses the length and entropy of the first data packet" to flag probable Shadowsocks traffic, then sends active probes (Alice et al., IMC 2020).
  • From November 2021, fully encrypted traffic. The GFW blocked traffic that looks fully encrypted. It used heuristics, such as the fraction of set bits and the number and position of printable ASCII characters, to exempt traffic unlikely to be fully encrypted. The authors name "Shadowsocks, VMess, and Obfs4" as affected (Wu et al., USENIX Security 2023).
  • From March 2023, TLS inside TLS (a test, not a censor). Researchers acting as a censor ran a detector for 30 days inside a mid-size ISP serving over a million users. It looked for the TLS handshakes that proxies carry inside their tunnels. They tested 23 proxy configurations, including VLESS and XTLS Vision over TLS, but not REALITY. For padding schemes such as Vision's, they report that "censors could easily adapt their statistical models and rely only on packet order and direction, rather than size", while noting that this "inherently demands more from censors in terms of resources, efforts, and potential costs from collateral damage". They name stream multiplexing as a possible countermeasure, with limits (Xue et al., USENIX Security 2024, sections 1 and 7).
  • From April 2024, QUIC. The GFW "has begun blocking QUIC connections to specific domains since April 7, 2024", and decrypts QUIC Initial packets at scale (Zohaib et al., USENIX Security 2025). That is blocking by domain, not blocking all QUIC.

Each study describes one method at one time. The 2024 study is the only one of the four that tested an Xray setup, and we found none that tested REALITY.

The tools around Xray

  • Server panels. 3X-UI is "an advanced, open-source web control panel for managing Xray-core servers".
  • Desktop clients. v2rayN is "A GUI client for Windows, Linux and macOS", and supports Xray and sing-box. v2rayA is a web client whose "core is a fork of Xray-core".
  • Mobile apps. libXray wraps Xray-core for "all platforms", including Android and Apple devices. The Xray README lists Android and iOS clients.
  • sing-box is a separate project, "The universal proxy platform", which also speaks VLESS, VMess, Trojan, Shadowsocks, Hysteria 2 and TUIC (sing-box).

Releases

In August 2024 the project announced it would "use the release date as the version number (e.g., v24.8.30)" and said "We expect to release a version at the end of each month." The first release under the new scheme came out on 7 September 2024 (Xray news). The release marked Latest on 8 November 2026 was v26.10.31, a security update that turns MPTCP off by default (release notes). Recent additions include a MASQUE transport (transport docs) and XDRIVE, which carries traffic through remote storage services (PR #5645).

How Fexyn uses Xray-core

Fexyn Stealth is VLESS with REALITY and XTLS Vision, running on Xray-core. In plain terms, the connection to our server is set up to look like a TLS connection to a real website, and a visitor without the key is passed to that site.

  • Servers. Fexyn's servers run Xray-core. The Fexyn Agent on each server adds and removes VLESS users, and each of your devices gets its own user ID.
  • Windows. The app runs Xray-core as a local SOCKS proxy. tun2socks and a Wintun network adapter send your system's traffic into it, so apps do not need their own proxy settings.
  • Android. The app embeds Xray-core through a library we build with gomobile, inside Android's VPN service.

We do not publish server addresses or which target sites our servers use, because that would help anyone trying to block them.

For how Stealth compares with WireGuard and other protocols, see VPN protocols compared and censorship circumvention protocols compared. To try it, download Fexyn and choose Stealth.

Sources

Checked on 8 November 2026.

Xray-core explained: the engine that runs VLESS and REALITY | Fexyn VPN