跳转至
编辑此页

VMess 出站(type: vmess)

  • 编译特性:全平台内置。
  • connect-via / dialer-proxy:支持 TCP 与 UDP。
  • mTLS:支持通过成对的 tls-cert 与 tls-key 配置客户端证书。

共享传输层配置块(ws-opts、h2-opts、grpc-opts、xhttp-opts)的完整字段请参阅 通用类型与传输层。

字段

YAML 键名 别名 类型 必填 默认值 说明
name、server、port、connect-via dialer-proxy 通用字段 是(connect-via 可选) — 标准出站选项。
uuid — string 是 — 标准 UUID。
alter-id alterId u16 是 — 设为 0 启用 AEAD。
cipher — string 强烈建议显式填写 "" 仅接受 auto、aes-128-gcm、chacha20-poly1305 或 none(大小写不敏感)。若省略,建连时会因空串报 invalid security;auto 在 x86_64/aarch64/s390x 上选用 aes-128-gcm,其余架构选用 chacha20-poly1305。
udp — bool 否 true 是否启用 UDP 转发。
tls — bool 否 false 是否启用 TLS。
skip-cert-verify — bool 否 false 是否跳过 TLS 证书校验。
server-name servername string 否 ws-opts.headers.Host → xhttp-opts.host → server TLS SNI。
network — "ws" | "h2" | "grpc" | "xhttp" | "splithttp" 否 裸 TCP 底层传输协议(开启 tls: true 时,ws 默认 ALPN 为 ["http/1.1"],h2/grpc/xhttp/splithttp 为 ["h2"])。
ws-opts — WsOpt network: ws 时必填 无 WebSocket 配置。
h2-opts — H2Opt network: h2 时必填 无 HTTP/2 配置。
grpc-opts — GrpcOpt network: grpc 时必填 无 gRPC 配置。
xhttp-opts splithttp-opts XhttpOpt xhttp/splithttp 时可选 默认 XhttpOpt XHTTP / SplitHTTP 配置。
tls-cert、tls-key — string 否 无 成对的 mTLS 客户端证书与私钥。

配置示例

proxies:
  - name: vmess-ws-tls
    type: vmess
    server: vmess.example.com
    port: 443
    uuid: "00000000-0000-0000-0000-000000000000"
    alterId: 0
    cipher: auto
    udp: true
    tls: true
    servername: vmess.example.com
    network: ws
    ws-opts:
      path: /ws
      headers:
        Host: vmess.example.com