3x-ui3x-ui

Transports & Security

Every transport 3x-ui exposes — TCP, mKCP, WebSocket, gRPC, HTTPUpgrade, XHTTP, Hysteria — with their settings, plus FinalMask obfuscation, sockopt, TLS/REALITY, XTLS-Vision, and VLESS encryption.

A transport decides how packets are carried between client and server, a security layer decides how they're encrypted and disguised, and FinalMask can obfuscate what's left. The panel only offers valid combinations; this page lists every transport's settings and the rules the panel enforces.

Transports

Pick the transport (the inbound's network) in the inbound/outbound form. Each network writes its own settings key on the wire (tcpSettings, kcpSettings, …).

TransportSettings keyWhen to use it
TCP (Raw)tcpSettingsLowest overhead. The basis for REALITY + XTLS-Vision and fallbacks; optional HTTP/1.1 header camouflage.
mKCPkcpSettingsReliable protocol over UDP — trades bandwidth for lower latency on lossy links. Carries no TLS/REALITY.
WebSocketwsSettingsWorks through CDNs and HTTP reverse proxies; very compatible.
gRPCgrpcSettingsHTTP/2-based; multiplexes well and proxies cleanly through Nginx.
HTTPUpgradehttpupgradeSettingsCDN-friendly HTTP/1.1 Upgrade; lighter than full WebSocket.
XHTTPxhttpSettingsModern stream-multiplexed HTTP transport; CDN-friendly and REALITY-capable.
HysteriahysteriaSettingsQUIC-based transport — only for the Hysteria2 protocol.

WireGuard and Tunnel (dokodemo-door) inbounds expose no transport selector — their stream carries only security/sockopt. Earlier panels also exposed a raw HTTP/2 (http) transport; it has been superseded by XHTTP and is no longer selectable.

TCP (Raw) — tcpSettings

FieldDefaultMeaning
acceptProxyProtocolfalseAccept the PROXY protocol from an upstream proxy so the real client IP is preserved.
header.typenonenone, or http for HTTP/1.1 camouflage.
header.request / responseWhen type: http: method, path, version and a header map that mimic a normal HTTP exchange.

mKCP — kcpSettings

FieldDefaultMeaning
mtu1350Maximum transmission unit, in bytes (576–1460).
tti20Transmission time interval, in ms (10–100). Lower = more responsive, more overhead.
uplinkCapacity5Upload bandwidth budget, in MB/s.
downlinkCapacity20Download bandwidth budget, in MB/s.
cwndMultiplier1Congestion-window multiplier; raise to push harder on good links.
maxSendingWindow2097152Upper bound on in-flight packets.

mKCP can't carry TLS or REALITY. To disguise it, add a FinalMask UDP mask — the mkcp-legacy mask reproduces the classic header obfuscation that older Xray stored in kcpSettings.header/seed (those fields no longer exist here).

WebSocket — wsSettings

FieldDefaultMeaning
path/Request path — route on it when several services share one host.
host(none)Host header override (useful behind a CDN).
headers{}Extra request headers.
heartbeatPeriod0Seconds between keepalive pings; 0 disables them.
acceptProxyProtocolfalseAccept the PROXY protocol from an upstream.

gRPC — grpcSettings

FieldDefaultMeaning
serviceName(none)gRPC service path; acts like a secret route.
authority(none):authority pseudo-header override.
multiModefalseMultiplex several streams over one connection.

HTTPUpgrade — httpupgradeSettings

FieldDefaultMeaning
path/Request path.
host(none)Host header override.
headers{}Extra request headers.
acceptProxyProtocolfalseAccept the PROXY protocol from an upstream.

HTTPUpgrade is a one-shot HTTP/1.1 Upgrade with no WebSocket framing — there's no heartbeat field.

XHTTP — xhttpSettings

XHTTP (SplitHTTP) has a large field set; the panel fills sensible defaults. The ones you'll usually touch:

FieldDefaultMeaning
path/Request path.
host(none)Host header override.
modeautoauto, packet-up, stream-up, or stream-one. packet-up is the most CDN-compatible; stream-* are lower latency.
xPaddingBytes100-1000Random padding range that blurs packet sizes.
scMaxBufferedPosts30Server-side buffer for uploaded POSTs.
scStreamUpServerSecs20-80Stream-up server window (dash range).
xmux (enableXmux)(off)Connection multiplexing — maxConcurrency 16-32, maxConnections 6, … Turn on for high concurrency.

Session-ID fields (sessionIDPlacement, sessionIDKey, sessionIDTable, sessionIDLength) and the scMin/MaxEachPostBytes knobs are advanced; leave them empty unless you're matching a specific upstream.

Hysteria — hysteriaSettings

Only valid when the protocol is Hysteria2.

FieldDefaultMeaning
version2Hysteria protocol version.
auth(none)Shared authentication string.
udpIdleTimeout60Seconds (2–600) before idle UDP sessions are dropped.
masqueradeDisguise as an HTTP/3 server: type proxy/file/string with url/dir/content, plus headers and statusCode.

FinalMask — late-layer obfuscation

FinalMask wraps traffic after the transport and security layers, so it can disguise transports that don't carry TLS (like mKCP) or add a second skin on top of TLS. Masks are configured per direction:

  • TCP masksfragment, sudoku, header-custom, xmc (disguises the stream as Minecraft protocol traffic; requires a password, with optional hostname and player usernames).
  • UDP maskssalamander, mkcp-legacy, header-custom, xdns, xicmp, noise, sudoku, realm. (mkcp-legacy reproduces the old mKCP header obfuscation.)
  • QUIC params — congestion control (reno, bbr, brutal, force-brutal), Brutal up/down rates, udpHop (rotate the QUIC port across a range to dodge port blocking), and receive-window tuning.

FinalMask replaces the per-transport header/seed obfuscation that older Xray builds exposed.

sockopt — low-level socket options

sockopt rides alongside any transport and tunes the underlying socket. The most useful fields:

FieldDefaultMeaning
tcpFastOpenfalseEnable TCP Fast Open.
tcpcongestionbbrCongestion control: bbr, cubic, or reno.
tproxyoffTransparent proxy mode: off, redirect, or tproxy.
domainStrategyAsIsHow addresses resolve (UseIP, ForceIPv4, …).
dialerProxy(none)Chain this outbound's dialing through another outbound tag.
interface(none)Bind to a specific network interface.
mark0SO_MARK for policy routing (0 = unset).

Numeric fields left at 0 are omitted on the wire so Xray keeps OS defaults. Advanced entries (happyEyeballs, customSockopt[], keepalive timers) are available for special cases.

Security

The security layer is one of none, tls, or reality, with these eligibility rules:

SecurityEligible transportsEligible protocols
TLStcp, ws, grpc, httpupgrade, xhttpVLESS, VMess, Trojan, Shadowsocks (Hysteria2 is always TLS)
REALITYtcp, grpc, xhttpVLESS, Trojan

mKCP and Hysteria don't take a separate TLS/REALITY layer — mKCP runs plaintext (obfuscate with FinalMask), and Hysteria is QUIC/TLS by design. REALITY disguises your server as a real TLS site and needs no certificate — see REALITY.

XTLS-Vision flow

The xtls-rprx-vision flow is fast and DPI-resistant. It's available for VLESS when either:

  • the transport is raw TCP with TLS or REALITY security (classic XTLS-Vision), or
  • the transport is XHTTP with VLESS encryption enabled (see below).

Set the flow on the VLESS client, not the inbound. With classic Vision on TCP, the panel can also offer a Vision seed once a client uses the flow.

VLESS encryption (ML-KEM)

VLESS supports post-quantum encryption (ML-KEM / mlkem768x25519), stored in the inbound's decryption (server) and clients' encryption (for link generation). When enabled, it unlocks the Vision flow over XHTTP. Generate the keys from the panel's VLESS settings.

Shadowsocks ciphers

Shadowsocks inbounds support both classic ciphers and Shadowsocks-2022 (method names starting with 2022-blake3-). Most ciphers are multi-user; 2022-blake3-chacha20-poly1305 is single-user.

Transports and security must match on both ends. The client's share link encodes them (type=ws, security=reality, flow=xtls-rprx-vision, …) — decode any link with the share-link inspector.

On this page