Skip to content

Transports

A transport changes how the proxy stream is carried between MeowX and the server. Instead of raw bytes on a TCP connection, the stream can travel as WebSocket messages, a gRPC stream or plain HTTP requests (XHTTP). Transports are mainly used to pass through CDNs and web servers.

Transports apply to VMess, VLESS and Trojan. They are chosen with the network field and run on top of whatever security layer the node uses: TLS, REALITY, or none. See TLS and REALITY.

network Status Options
tcp or omitted ✅ No transport: the protocol runs directly on the TCP / TLS / REALITY connection. —
ws ✅ WebSocket ws-opts
grpc ✅ gRPC (“gun” mode) grpc-opts
xhttp ✅ XHTTP, packet-up mode only path taken from ws-opts.path
h2 ❌ Not supported —
httpupgrade (or ws with v2ray-http-upgrade) ❌ Not supported —
http, quic, kcp, splithttp and others ❌ Not supported —

The proxy stream is carried in binary WebSocket frames after an HTTP/1.1 Upgrade request.

proxies:
- name: vless-ws
type: vless
server: example.com
port: 443
uuid: 00000000-0000-0000-0000-000000000000
tls: true
servername: cdn.example.com
network: ws
ws-opts:
path: /ws
headers:
Host: cdn.example.com
User-Agent: Mozilla/5.0
ws-opts field Type Default Description
path string / Request path of the Upgrade request. It is sent exactly as written, including any query string.
headers map of strings — Extra request headers sent with the Upgrade request. A Host entry (spelled exactly Host) sets the Host header. Without it, the TLS server name is used (servername / sni, else server).

Ignored ws-opts fields: max-early-data, early-data-header-name, v2ray-http-upgrade and v2ray-http-upgrade-fast-open. MeowX does not send WebSocket early data. A path such as /ws?ed=2048 is sent literally, which servers accept, but no data is sent early.

The proxy stream is carried as a bidirectional gRPC stream over HTTP/2, in the “gun” format used by V2Ray, Xray and mihomo.

proxies:
- name: trojan-grpc
type: trojan
server: example.com
port: 443
password: "your-password"
sni: example.com
network: grpc
grpc-opts:
grpc-service-name: my-service
grpc-opts field Type Default Description
grpc-service-name string GunService Service name. Requests go to /<service name>/Tun.

Behavior:

  • Over TLS, MeowX offers ALPN h2 automatically when you have not set alpn. If you do set alpn, include h2.
  • Over REALITY, h2 is always offered.
  • Without TLS, HTTP/2 is spoken directly in cleartext (prior knowledge).
  • The HTTP/2 :authority is the TLS server name (servername / sni, else server).
  • Each proxied connection uses its own HTTP/2 connection with a single stream. Connections are not multiplexed onto one HTTP/2 connection.

Ignored grpc-opts fields: grpc-user-agent, ping-interval, max-connections, min-streams, max-streams. The “multi” gRPC mode is not supported.

XHTTP (formerly SplitHTTP) carries the proxy stream in ordinary HTTP requests. MeowX implements the packet-up mode:

  • Download: one long-lived GET <path><session-id> request whose response body streams the downstream data.
  • Upload: every chunk of upstream data is sent as a separate POST <path><session-id>/<sequence> request.
  • Every request carries a Referer header with random padding of 100–900 characters, which current Xray servers require.
proxies:
- name: vless-xhttp
type: vless
server: example.com
port: 443
uuid: 00000000-0000-0000-0000-000000000000
tls: true
servername: example.com
network: xhttp
ws-opts:
path: /xhttp # XHTTP path is read from ws-opts.path
Option Type Default Description
ws-opts.path string / XHTTP base path. A leading and trailing / are added if missing.

Requirements and limitations:

  • The server must accept the packet-up mode, for example Xray with XHTTP mode: auto or mode: packet-up. The stream-one and stream-up modes are not implemented.
  • Requests are sent as HTTP/1.1. With TLS, leave alpn unset or set it to [http/1.1]. If you offer h2 and the server picks it, the connection fails.
  • Each upload chunk opens a new connection (including a TLS or REALITY handshake), so uploads have much more overhead than with ws or grpc. Prefer those transports if the server offers them.
  • XHTTP can run over TLS, REALITY or plain TCP, and through dialer-proxy.