On this page
What XHTTP is and why it appeared
VLESS itself only names the user and the address; how the bytes travel is up to the transport, the type field of the link. Plain TCP with the Vision flow is the lightest, but it can't pass through a CDN. WebSocket, gRPC and HTTPUpgrade can, yet each keeps one long connection of a recognizable kind.
SplitHTTP started in the Xray community as a way to send the stream as plain HTTP requests that almost any CDN or reverse proxy lets through. The XTLS team later took it over, made upload and download truly separable and renamed it XHTTP. It is a transport, not a protocol: VLESS, or Trojan, rides on it.
How the data travels: the four modes
The mode field decides how upload and download are split into HTTP requests. It is also the setting that most often breaks a connection through a CDN.
packet-up— upload goes as a series of separate POST requests, download as one long streaming response. It passes almost every HTTP middlebox, HTTP/1.1 included: the one to try when a CDN breaks the others.stream-up— upload goes as one long streaming POST, download as a separate streaming GET. Upload loses nothing in efficiency, but behind a CDN it usually needs the CDN's gRPC support turned on.stream-one— a single POST carries both directions: the request body goes up, the response comes down, much like gRPC. Some CDNs throttle it.auto— the default. The client picks by itself:stream-upwith TLS over HTTP/2,stream-onewith Reality (stream-upif a separate download path is set),packet-upotherwise.- On the server —
autoaccepts all three modes, while a fixed mode accepts only itself (stream-upalso takesstream-one). So the simplest setup isautoon the server and whatever the client needs in the link.
XHTTP with Reality, or with TLS behind a CDN
- With Reality — no domain or certificate: the client connects straight to the server's IP with the handshake of a real third-party website, with HTTP/2 inside. Reality can't go through a CDN. The traffic has a different shape from TCP with Vision, so where one doesn't get through, the other is worth a try.
- With TLS — your own domain and certificate, held by Xray itself or by a web server such as nginx in front, which passes requests on the path to Xray. Behind a CDN the network sees a connection to the CDN, and the server's own IP stays hidden.
- HTTP versions — by default HTTP/2.
alpn=http/1.1in the link makes it HTTP/1.1, andalpn=h3HTTP/3 over QUIC, which needs UDP to get through. - Split upload and download —
downloadSettingsinsideextracan send the download over another address: upload through a CDN, download directly with Reality, say. Most links don't use it. - No Vision — the
xtls-rprx-visionflow works only over raw TCP, so with xhttp the flow stays empty in the link and on the server.
An xhttp link, field by field
A typical XHTTP link with Reality. The address is from a range reserved for documentation, and the ID and keys are made up.
vless://b084aee0-3421-4499-a473-f4ecbba7b3b8@203.0.113.10:443?encryption=none&security=reality&sni=www.example.com&fp=chrome&pbk=eGjsq-1bTItSi448hnpbXv6_8OamCZWoemCtrZMB3KU&sid=07759ef874c6d4f8&type=xhttp&path=%2Fxh&mode=auto#XHTTP-Realitytype=xhttp— the transport. Older links may saytype=splithttp, the old name of the same thing.path=%2Fxh— the HTTP path, here /xh;%2Fis an encoded slash. It must match the server's path exactly: a wrong path is the most common reason an xhttp link connects nowhere.host— the host name in the requests, your domain behind a CDN. Often left out, and then the address orsniis used.mode=auto— one of the four modes; it has to be one the server accepts.extra— the advanced settings as URL-encoded JSON: padding (xPaddingBytes), connection reuse (xmux), a separate download path (downloadSettings) and others. A share link carries onlyhost,path,modeandextra, and decoded,extramust be valid JSON.security,sni,fp,pbk,sid— as in any Reality link; there is noflow. With TLS:security=tls, your domain insni, oftenalpn.- Behind a CDN — a TLS link looks like
security=tls&sni=cdn.example.com&host=cdn.example.com&type=xhttp&path=%2Fx&mode=packet-up.
The server side
The server is Xray with an inbound whose streamSettings has "network": "xhttp" and an xhttpSettings block with the path. Users have UUIDs and an empty flow. With Reality the realitySettings are the same as for TCP: dest, serverNames, privateKey and shortIds. A minimal example on port 443:
{
"inbounds": [
{
"port": 443,
"protocol": "vless",
"settings": {
"clients": [
{"id": "UUID"}
],
"decryption": "none"
},
"streamSettings": {
"network": "xhttp",
"xhttpSettings": {"path": "/xh"},
"security": "reality",
"realitySettings": {
"dest": "SITE:443",
"serverNames": ["SITE"],
"privateKey": "PRIVATE_KEY",
"shortIds": ["SHORT_ID"]
}
}
}
],
"outbounds": [
{"protocol": "freedom"}
]
}Without a mode the server stays on auto and accepts all three. With TLS instead of Reality, Xray holds the certificate in tlsSettings, or listens locally behind a web server that passes it the requests on the path. Check the file with xray run -test -config /usr/local/etc/xray/config.json before restarting; keys, UUID and short ID are made as for VLESS Reality over TCP.
Which clients open it
- Xray and the apps built on it — yes: the transport comes from there.
- sing-box and the apps built on it — no. A sing-box config can't describe an xhttp server, and converters that write sing-box configs skip such servers.
- A ready Xray config from a link — the free converter /tools/link-to-json/ turns an xhttp link into an Xray outbound or a whole config.json with a local SOCKS on 127.0.0.1:10808, and says plainly that sing-box can't take it.
When an xhttp link doesn't connect
The client doesn't know the transport or skips the server
CauseThe app runs on sing-box, which has no xhttp
What to doUse Xray or an app that carries Xray
It connects nowhere, a timeout
CauseThe path in the link differs from the server's, or the server accepts another mode
What to doTake a fresh link from the server; keep
autoon the serverAn error that
extrais not JSONCauseThe link was cut off or damaged when copied
What to doCopy the link again, whole, with no line breaks
It works directly but not through the CDN
CauseThe CDN doesn't pass the streaming mode
What to doTry
mode=packet-upAn error about the flow
CauseVision is set together with xhttp
What to doLeave
flowempty in the link and on the serverA Reality xhttp link stopped connecting at all
CauseThe server's IP address is blocked
What to doNo transport helps a blocked address: xhttp with TLS behind a CDN, or another server