On this page
What a core is
A VPN client is usually two layers. The app is the window: the server list, the buttons and the settings. The core is the program underneath that opens the connection to the server, speaks the protocol and decides where each packet goes. Many popular clients are built on one of these two cores, and some carry both and pick one per server.
That is why two different apps can open the same vless:// link: the link is a common format, and the core inside each one reads it. It is also why an app sometimes says it needs to download a module, a component or a core: the window is there, but the program that speaks the protocol isn't yet. Both cores are free and open source, both are written in Go, and both run on Windows, macOS, Linux and Android.
Xray: the XTLS team's core
Xray (Xray-core) appeared in 2020 as a fork of V2Ray, made by the XTLS team, the authors of VLESS. It kept V2Ray's structure and config format and grew its own features on top. Most new ideas around VLESS appeared in Xray first.
- Reality — the disguise that borrows a real website's TLS handshake. It was created in Xray.
- XTLS Vision — the
xtls-rprx-visionflow that hides the TLS-inside-TLS pattern. - xhttp — an HTTP transport that can split upload and download into separate requests and goes through CDNs. sing-box doesn't have it.
- mKCP — a transport over UDP, also missing from sing-box.
- VLESS encryption — an optional encryption layer of VLESS itself, added in newer versions. Such links carry a long value in
encryptioninstead of none. - Server panels — 3x-ui, Marzban and Remnawave run Xray servers, and many subscriptions come straight out of them, sometimes as Xray JSON instead of links.
sing-box: the universal core
sing-box is made by SagerNet and was written from scratch as a universal platform: one program, one config format and many protocols, on the client side and the server side. It supports VLESS with Reality and Vision too, so for a typical VLESS Reality link it makes no difference which of the two cores opens it.
- Protocols — VLESS, VMess, Trojan, Shadowsocks, Hysteria2, TUIC, WireGuard, ShadowTLS, AnyTLS, plus SOCKS, HTTP and others.
- Hysteria2 and TUIC — the QUIC protocols for lossy networks are first-class here. Recent Xray versions added Hysteria2, but TUIC, ShadowTLS and AnyTLS are found in sing-box, not in Xray.
- TUN — sing-box has had its own TUN inbound from early on: a virtual network adapter that takes the traffic of the whole system and sets up the routes by itself. That is a big reason apps use it for a system-wide VPN.
- Rules — routing by domain, IP address, process and app, with rule sets in its own
.srsformat, plus groups that test servers and take the fastest (urltest) or let you pick one (selector).
What each core has
VLESS, VMess, Trojan, Shadowsocks
XrayYes
sing-boxYes
Reality and the Vision flow
XrayYes, both were created here
sing-boxYes
WebSocket, gRPC, HTTPUpgrade
XrayYes
sing-boxYes
xhttp and mKCP transports
XrayYes
sing-boxNo
VLESS encryption (ML-KEM)
XrayYes, in newer versions
sing-boxNo
Hysteria2
XrayIn recent versions
sing-boxYes
TUIC, ShadowTLS, AnyTLS
XrayNo
sing-boxYes
Config format
XrayJSON with inbounds, outbounds, streamSettings, routing
sing-boxJSON with inbounds, outbounds, tls, transport, route
The same server in each config
Both cores are set up with JSON, but the files are not interchangeable: an Xray config won't start in sing-box, nor the other way round. Here is one VLESS Reality server in each. First Xray: the protocol is named in protocol, the server and user sit in settings, and the transport and security in streamSettings.
{
"outbounds": [
{
"tag": "proxy",
"protocol": "vless",
"settings": {
"vnext": [
{
"address": "203.0.113.10",
"port": 443,
"users": [
{
"id": "b084aee0-3421-4499-a473-f4ecbba7b3b8",
"encryption": "none",
"flow": "xtls-rprx-vision"
}
]
}
]
},
"streamSettings": {
"network": "tcp",
"security": "reality",
"realitySettings": {
"serverName": "www.example.com",
"fingerprint": "chrome",
"publicKey": "eGjsq-1bTItSi448hnpbXv6_8OamCZWoemCtrZMB3KU",
"shortId": "07759ef874c6d4f8"
}
}
}
]
}The same server for sing-box: the protocol is type, the address and UUID sit at the top of the outbound, security goes into a tls block with reality inside, and a transport, when there is one, into a transport block.
{
"outbounds": [
{
"type": "vless",
"tag": "proxy",
"server": "203.0.113.10",
"server_port": 443,
"uuid": "b084aee0-3421-4499-a473-f4ecbba7b3b8",
"flow": "xtls-rprx-vision",
"tls": {
"enabled": true,
"server_name": "www.example.com",
"utls": {"enabled": true, "fingerprint": "chrome"},
"reality": {
"enabled": true,
"public_key": "eGjsq-1bTItSi448hnpbXv6_8OamCZWoemCtrZMB3KU",
"short_id": "07759ef874c6d4f8"
}
}
}
]
}Routing differs too. Xray keeps its rules under routing and matches sites with the geosite.dat and geoip.dat files; sing-box keeps them under route and uses rule sets in .srs files. Share links such as vless:// are the common ground: apps on either core read them, which is why services hand out links and subscriptions rather than raw configs.
Which one you need
- An ordinary VLESS Reality, VMess, Trojan or Shadowsocks link — either core opens it, so the app decides.
- A link with
type=xhttportype=kcp, or VLESS with encryption turned on — Xray only. - Hysteria2, TUIC, ShadowTLS or AnyTLS — sing-box. For Hysteria2 a recent Xray also works.
- A ready config file — the core it was written for. An Xray JSON has
protocolandstreamSettings, a sing-box JSON hastypeandtls. - A subscription in the wrong format — convert it. The free subscription converter on this site, /tools/subscription/, turns links, base64 subscriptions, Clash / mihomo YAML and sing-box JSON into one another right in the browser. It doesn't read Xray JSON yet, and xhttp servers can't be written for sing-box, so it lists them as skipped.