Tech 5 min read

VLESS + REALITY without a domain: working Xray + 3X-UI setup for China-facing VPS

IkesanContents

Notes on getting VLESS + REALITY actually running between a VPS and a client, written as a follow-up to the VPN comparison article where I picked it as the strongest candidate for China-facing connections. This covers the Xray side: server setup directions, client app choices, how the TLS camouflage works in practice, fallback handling, and the gotchas to know before relying on it. For an alternative, see the Hysteria2 setup notes.

What VLESS + REALITY is

This is a protocol developed by Xray, a fork of V2Ray. It communicates by “borrowing” TLS certificates from real HTTPS sites.

Problems with conventional TLS spoofing:

  • Self-signed certificates or Let’s Encrypt certificates are easy to flag as “looks real, but suspicious”
  • You need to obtain and manage your own domain and certificate

What REALITY solves:

  • It uses the TLS certificate of a real site such as microsoft.com or cloudflare.com
  • From the GFW’s point of view, it looks like normal access to microsoft.com
  • You do not need to prepare your own domain or certificate

Note: REALITY and Hysteria2 are not compatible. They cannot be combined.

Server setup overview

What you need

  • A Linux VPS
  • Open ports: TCP/443 (other ports are also possible)
  • No domain required - that is one of REALITY’s big advantages

Installation methods

3X-UI (recommended):

A web UI panel that makes user management and traffic monitoring easy.

bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh)

After installation, open the web UI and add a VLESS + REALITY inbound.

Direct Xray-core install:

bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install

You will need to create the config file manually.

Key settings

Parameters you need when configuring REALITY:

ParameterDescription
destThe spoofed destination site, such as www.microsoft.com:443
serverNamesThe domain used for SNI
privateKey / publicKeyREALITY key pair, generated with xray x25519
shortIdsClient authentication ID

How to choose the spoofed site:

  • It must support TLS 1.3 and HTTP/2
  • It must not be blocked from China
  • Examples: microsoft.com, cloudflare.com, www.lovelive-anime.jp

Management panels

PanelNotes
3X-UIRecommended. Feature-rich, Japanese supported
X-UISimpler, but development has slowed
MarzbanMulti-node support

Client apps

The easiest option is to use an existing client app.

Windows / macOS / Linux

AppNotes
v2rayNWindows/macOS/Linux, Xray core recommended
HiddifyCross-platform, free, open source
NekoRayQt-based GUI client
ClashX MetamacOS client with Clash Meta core

If you choose the Xray core in v2rayN, it supports VLESS + REALITY.

Android

AppNotes
v2rayNGAndroid version of v2rayN
HiddifyRecommended. Free and ad-free
NekoBoxDownload the APK from GitHub

iOS

AppNotes
ShadowrocketPaid (about $3), most feature-rich
FoXrayFree, based on Xray
StashPaid, Clash-compatible

Connection methods

Add the config to the client app in any of these ways:

  1. URI scheme: paste a vless://uuid@server:443?... URL
  2. Subscription: generate a subscription URL in 3X-UI or another panel and import it
  3. QR code: scan a QR code generated by the panel
  4. Manual setup: enter the server address, port, UUID, public key, and so on

Custom app development

Libraries and SDKs if you want to build your own app.

Go

XTLS/Xray-core - the official implementation and the reference for VLESS + REALITY.

go get github.com/xtls/xray-core

sing-box, for multiple protocols

sing-box - a Go library that supports many protocols, including REALITY.

  • Supports Hysteria2, Trojan, Shadowsocks, and more at the same time
  • Requires Go 1.21 or later
  • Used internally by Hiddify and NekoBox

This is the better choice if you are building an app that handles multiple protocols.

Mobile app development

If you are building a VPN app for iOS or Android:

  1. Call Xray-core or sing-box through FFI
  2. Use a VPNclient Engine - Swift for iOS, Kotlin for Android, with a Go/C++ engine
  3. Use LibXray - a C binding for Xray-core

In practice, forking and modifying an existing open-source client such as v2rayNG or Hiddify is the more realistic path.

Comparison with Hysteria2

ItemVLESS + REALITYHysteria2
Base protocolTCP (TLS 1.3)UDP (QUIC)
Spoofing methodBorrow real-site certificatesQUIC spoofing
SpeedFastVery fast
DomainNot requiredNot required
Setup difficultySlightly higherMedium
CompatibilityCannot be combinedCannot be combined

Which one you choose depends on the environment. Use REALITY if UDP is blocked; choose Hysteria2 if speed matters more.

References