انتقل إلى المحتوى
Vunio

V2Ray and Xray Explained: Cores, Protocols and Transports

V2Ray and Xray aren't protocols: they're platforms that run protocols like VLESS and VMess over transports like WebSocket. How the pieces fit together, and how the two projects differ.

VPNSocket Tunnel Xبقلم Vunio Teamتاريخ النشر مدة القراءة: 3 د
في هذه الصفحة

هذا المقال غير متوفر بالعربية بعد، لذا يظهر بلغته الأصلية، وهي الإنجليزية.

"V2Ray" shows up in VPN app server lists next to protocol names, so it's easy to assume it's a protocol too. It isn't. V2Ray, and Xray, which grew out of it, are platforms: programs that accept connections, decide where they go, and send them on with whichever protocol and transport they're configured to use. This guide explains those layers and how the two projects differ.

Platform, protocol, transport: different layers

LayerWhat it doesExamples
Platform (core)The program that runs everything: accepts connections, applies routing rules, sends traffic outV2Ray (v2fly-core), Xray-core
Proxy protocolHow client and server identify each other and describe the trafficVMess, VLESS, Trojan, Shadowsocks, SOCKS, HTTP
TransportCarries the protocol's bytes across the networkTCP, WebSocket, gRPC, mKCP, HTTPUpgrade, XHTTP
Security layerEncrypts and authenticates the transportTLS; REALITY in Xray

A working configuration picks one of each, for example VLESS over WebSocket with TLS, running on Xray. Change the transport and the protocol stays the same. Change the platform and, as long as both ends support the protocol and transport, client and server still understand each other. Not every core supports every transport, though, as the table further down shows.

V2Ray (Project V)

V2Ray began as Project V, a set of tools for building your own proxy network. Its core combines several inbound and outbound protocols, a routing engine that can send different traffic different ways, and a choice of transports. VMess was its original protocol; VLESS was added later. Today the V2Ray codebase is maintained by the V2Fly community as v2fly-core, under the MIT license.

Xray (Project X)

Xray grew out of V2Ray. Its README states that "Xray-core v1.0.0 was forked from v2fly-core", and it has added a large number of enhancements since. The project, called Project X, "originates from XTLS protocol" and publishes Xray-core and REALITY. Xray-core is released under the Mozilla Public License 2.0.

Xray's main additions include:

  • XTLS Vision, a VLESS flow that recognises TLS traffic inside the tunnel and avoids encrypting it a second time.
  • REALITY, a TLS-based security layer that borrows the handshake of a real website, so a server doesn't need its own domain or certificate.
  • XHTTP, a transport that carries traffic in ordinary HTTP requests.
  • XUDP, which improves how UDP traffic is carried over proxy connections.

V2Ray vs Xray at a glance

V2Ray (v2fly-core)Xray-core
ProjectProject V, maintained by V2FlyProject X (XTLS)
OriginThe originalForked from v2fly-core
LicenseMITMPL 2.0
VMess, Trojan, Shadowsocks, SOCKS, HTTPYesYes
VLESSYesYes, plus XTLS Vision flows
REALITYNoYes
XHTTP transportNoYes

Because Xray started as a fork, a basic VMess or VLESS setup usually works with either core on the client side. Xray-only features such as REALITY, Vision and XHTTP need an Xray server and a client that supports them.

How Android apps use them

Most V2Ray and Xray apps on Android run the core inside the app and use Android's VPN interface to capture the phone's traffic. The app turns that traffic into connections, and the core sends them to the server with the configured protocol, transport and security. To you, it behaves like any other VPN: one switch, and a key icon in the status bar while it's on.

Where Socket Tunnel X fits

Socket Tunnel X, SBRK Dev Team's Android VPN, lists servers labelled VLESS-WS-TLS (VLESS over WebSocket and TLS) and V2RAY, alongside SSH and OpenVPN servers. You don't configure a core yourself: each server comes with its settings, and you choose by picking a server. Which VPN protocol should you use on Android? compares these options with SSH, OpenVPN and WireGuard.

FAQ

Is V2Ray a VPN?

Not in the strict sense: it's a proxy platform. Android apps make it behave like a VPN by routing the phone's traffic into it through Android's VPN interface.

Is Xray better than V2Ray?

Xray has features V2Ray doesn't, such as REALITY and XTLS Vision. Whether they matter depends on the server, because the client has to support what the server uses.

Can an Xray client connect to a V2Ray server?

Usually, for protocols both support, such as VMess, or VLESS without Xray-only extras. REALITY and Vision need Xray on the server.

What's the difference between VLESS and V2Ray?

VLESS is a protocol; V2Ray is a platform that can run it. See VLESS vs VMess for how VLESS works.

Sources

شارك هذا المقال

التطبيقات المذكورة في هذا المقال

VLESS vs VMess: How They Work and How They Differ

VLESS and VMess both come from the V2Ray project, but they protect traffic differently. How each one authenticates and encrypts, and when each makes sense.

VPNمدة القراءة: 5 د

Which VPN Protocol Should You Use on Android?

A practical comparison of the protocols in Android VPN and tunnel apps (WireGuard, OpenVPN, VLESS, VMess and SSH): what each is good at, where each struggles, and how to choose.

VPNمدة القراءة: 4 د

تطبيقاتك، على كل شاشة.

مجانية ورسمية، على هاتفك خلال دقيقة تقريبًا وعلى تلفازك في ثلاث خطوات.

رمز Downloader لتطبيق ڤونيو دراما

اكتبه في تطبيق Downloader.