What is VLESS xhttp: the XHTTP transport, its modes and its link

XHTTP, formerly SplitHTTP, is an Xray transport that carries the VLESS stream inside ordinary HTTP requests and responses instead of one bare TCP connection. It works with TLS or Reality, over HTTP/1.1, HTTP/2 or HTTP/3, and with TLS it goes through CDNs and web servers. A link with type=xhttp opens only in Xray and in apps built on it: sing-box doesn't have this transport.

Updated

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-up with TLS over HTTP/2, stream-one with Reality (stream-up if a separate download path is set), packet-up otherwise.
  • On the server — auto accepts all three modes, while a fixed mode accepts only itself (stream-up also takes stream-one). So the simplest setup is auto on 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.1 in the link makes it HTTP/1.1, and alpn=h3 HTTP/3 over QUIC, which needs UDP to get through.
  • Split upload and download — downloadSettings inside extra can 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-vision flow 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.

Example
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-Reality
  • type=xhttp — the transport. Older links may say type=splithttp, the old name of the same thing.
  • path=%2Fxh — the HTTP path, here /xh; %2F is 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 or sni is 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 only host, path, mode and extra, and decoded, extra must be valid JSON.
  • security, sni, fp, pbk, sid — as in any Reality link; there is no flow. With TLS: security=tls, your domain in sni, often alpn.
  • 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:

config.json
{
  "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 auto on the server

  • An error that extra is not JSON

    CauseThe 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-up

  • An error about the flow

    CauseVision is set together with xhttp

    What to doLeave flow empty in the link and on the server

  • A 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

In Veli

An xhttp link in Veli runs on Xray

In Veli an xhttp link goes into the same field as any other: Profiles → Add, paste it and press “Continue”. The app reads the transport, mode, path and extra by itself and recognizes the link as VLESS xhttp, or VLESS Reality xhttp; type=splithttp is read the same way. On a computer sing-box can't open such links, so this server runs on Xray: the first time, the app offers to install the Xray module, which Settings → Advanced lists as “Special VLESS keys: xhttp, mKCP, encryption”. sing-box keeps the virtual adapter and hands this server's traffic to Xray, so rules in Apps and sites keep working. On Android Xray is built into the app.

With ordinary TLS, Settings → Security → “Fragment the TLS handshake” works on xhttp profiles too; Reality ones are left alone. On your own server the app installs VLESS Reality over TCP with Vision, not xhttp: an xhttp server is set up by hand and added by its link.

FAQ

What is xhttp in VLESS?

A transport from Xray, formerly SplitHTTP, that carries the VLESS stream inside ordinary HTTP requests. It works with TLS or Reality and, with TLS, through CDNs.

Does sing-box support xhttp?

No. Only Xray has the xhttp transport, so a link with type=xhttp needs Xray or an app that carries Xray inside.

Which xhttp mode should I choose?

Leave auto unless something breaks: the client picks a mode by itself and the server accepts all three. Behind a CDN that cuts the connection, try packet-up.

Can xhttp use the Vision flow?

No. Vision works only over raw TCP, so the flow stays empty in xhttp links and in the server's user entries.

Is XHTTP with Reality better than Reality over TCP?

Not better in general: TCP with Vision is lighter, while XHTTP gives the traffic a different shape and more settings. Where a network stops one of them, try the other.

An xhttp link goes in as it is

Paste it into Profiles → Add: Veli reads the mode, path and extra and runs the server on Xray by itself.