On this page
Side by side
Transport
AnyTLSTCP
ShadowTLSTCP
RealityTCP, usually with VLESS
Disguise
AnyTLSYour own TLS; pads the first 8 packets, reuses connections
ShadowTLSA real site's handshake, then TLS records with a 4-byte HMAC
RealityTLS 1.3 under a real site's name, with a temporary certificate
What a censor sees
AnyTLSTLS to your domain; a stranger is cut off or sent to a fallback
ShadowTLSTLS to a third-party site; a stranger is relayed to it
RealityTLS 1.3 to a third-party name on your IP; a stranger gets that site
Speed on lossy links
AnyTLSTCP; reused sessions save a handshake per new site
ShadowTLSTCP; Shadowsocks inside, 4 bytes more per record
RealityTCP; with Vision, inner TLS 1.3 isn't encrypted twice
Setup
AnyTLSA certificate and a password
ShadowTLSA ShadowTLS server in front of Shadowsocks, a TLS 1.3 site, two passwords
RealityAn x25519 key pair, short IDs, a target with TLS 1.3 and HTTP/2
Clients
AnyTLSsing-box 1.12+, mihomo; not Xray
ShadowTLSsing-box, mihomo (a Shadowsocks plugin); not Xray
RealityXray, sing-box, mihomo
How each one works
Reality takes the place of TLS on the server. The client proves itself inside an ordinary-looking TLS 1.3 ClientHello with the server's x25519 public key and a short ID. A recognised client receives a temporary certificate that only it can check; anyone else is forwarded to the target site and sees that site's real certificate and pages. The project's minimum for a target: a site with TLS 1.3 and HTTP/2 whose domain isn't a redirect. Reality appeared in Xray 1.8.0 in March 2023, and its authors don't recommend pairing it with anything but XTLS, that is VLESS with the Vision flow.
ShadowTLS does no handshake of its own. The server stands between the client and a real site and relays the TLS handshake between them, so a filter sees that site's real certificate. In version 3 the client marks its ClientHello: the last 4 bytes of the 32-byte session ID are an HMAC made with the shared password, and unmarked connections are simply relayed to the site. After the handshake the server takes the connection over: data goes in TLS records, each with a 4-byte HMAC chained from record to record, and a wrong tag ends the connection. ShadowTLS doesn't encrypt your data: its README says encryption isn't its goal, and its example puts a Shadowsocks server behind it.
AnyTLS is the newest of the three: its repository appeared in February 2025. It runs inside an ordinary TLS connection to your server; right after the handshake the client sends a SHA-256 hash of the password and some padding. Inside, it carries many streams and keeps idle sessions for the next request, so a new site doesn't mean a new TLS handshake. A padding scheme sets the sizes of the first packets, by default packets 0 to 7, and the server can push its own scheme to clients. The look of the TLS handshake itself is left to the client's TLS settings, such as a uTLS fingerprint.
What a filter sees: the TLS inside TLS
All three hide the content equally well. What gives a proxy away is shape: when a browser opens an HTTPS site through a TLS proxy, the browser's own TLS handshake travels inside the proxy's TLS, and the sizes and round trips of that inner handshake are typical. Xue and colleagues (USENIX Security 2024) built classifiers for exactly this and ran them for 30 days from March 2023 at Merit, an ISP with over a million users.
- ShadowTLS with Shadowsocks inside: about 83% of flows detected. Relaying a real handshake doesn't change what comes after it.
- XTLS Vision, the flow used with Reality: about 51%, with a classifier adapted to its padding of early packets to 900 to 1400 bytes and at a higher rate of false alarms. Reality itself wasn't part of the test.
- Multiplexing, several connections in one: detection fell to about 13 to 37% of flows. The authors still warn that padding and multiplexing alone can't hide the size of bursts or the number of round trips.
- AnyTLS appeared after the study and wasn't tested. It combines padding with connection reuse, and its own FAQ lists what remains: the extra round trips of TLS in TLS, bursts of packets right after the handshake, and downstream traffic that isn't padded.
Names, certificates and strangers
The outer handshake differs too. Reality and ShadowTLS show a third-party site's name on your server's IP address, and a careful observer can compare the two; Xray's docs advise borrowing a site from the same network (ASN) as your server. AnyTLS shows your own domain and certificate, which is ordinary, unless the certificate is self-signed and the client skips the check.
A stranger who connects without the key gets the real site from Reality and ShadowTLS. AnyTLS closes the connection or passes it to a fallback web service, if one is set; its FAQ admits that active probing of the server is still possible.
Links and configs
vless://0b6c6f2e-8a1d-4c55-9e3b-2f7d1a4c9e10@203.0.113.10:443?encryption=none&flow=xtls-rprx-vision&security=reality&sni=www.example.com&fp=chrome&pbk=Fq8vT3xR1mZq0cJb7WkLs2nYd9pHa4uEo6iVg5tKx0M&sid=6ba85179e30d4fc2&type=tcp#Reality- Reality:
security=reality, the public key inpbk, the short ID insid(up to 16 hex digits), the borrowed name insni, the browser fingerprint infp(it must not be left out) and the Vision flow inflow. - AnyTLS: a link of its own,
anytls://password@vpn.example.com:443/?sni=vpn.example.com, modelled on Hysteria2's. Onlysniandinsecureare defined, and without a port it is 443. - ShadowTLS: no link format; the project doesn't define one. In sing-box it is two outbounds: a
shadowtlsone withversion3, apasswordand atlsblock with the handshake site's name, and ashadowsocksone whosedetourpoints to it. In mihomo it is a Shadowsocks proxy with theshadow-tlsplugin. - Versions must match. ShadowTLS v2 and v3 don't talk to each other, and sing-box takes version 1 unless told otherwise.
When to pick which
- No domain, any client: Reality. No certificate is needed, and Xray, sing-box and mihomo all know it.
- An app built on Xray only, such as v2rayNG: Reality; Xray has neither AnyTLS nor ShadowTLS.
- You have a domain and a certificate: AnyTLS is the simplest server of the three, a password and TLS.
- You already run Shadowsocks: ShadowTLS v3 in front of it adds a real site's handshake. Mind that the reference server's last release, v0.2.25, is from December 2023 and has no Windows build; sing-box has its own implementation.
- A mihomo client and a new Xray server: mihomo's docs say it won't follow an incompatible Reality change in Xray 26.7.11 and newer, and suggest a sing-box or mihomo server instead.
- A lossy mobile line: none of the three stands out, since all are TCP. Where UDP gets through, a QUIC protocol such as Hysteria2 copes with loss better.