{"record":{"id":"1b128f789938ad97","repo":"v2ray/v2ray-core","slug":"to-avoid-misunderstanding-you-must-fill-in-vless","errorCode":null,"errorMessage":"To avoid misunderstanding, you must fill in VLESS \"flow\" when using XTLS.","messagePattern":"To avoid misunderstanding, you must fill in VLESS \"flow\" when using XTLS\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"proxy/vless/outbound/outbound.go","lineNumber":158,"sourceCode":"\t\t\tif !allowUDP443 && request.Port == 443 {\n\t\t\t\treturn newError(requestAddons.Flow + \" stopped UDP/443\").AtInfo()\n\t\t\t}\n\t\t\trequestAddons.Flow = \"\"\n\t\tcase protocol.RequestCommandTCP:\n\t\t\tif xtlsConn, ok := iConn.(*xtls.Conn); ok {\n\t\t\t\txtlsConn.RPRX = true\n\t\t\t\txtlsConn.SHOW = xtls_show\n\t\t\t\txtlsConn.MARK = \"XTLS\"\n\t\t\t\tif requestAddons.Flow == vless.XRD {\n\t\t\t\t\txtlsConn.DirectMode = true\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn newError(`failed to use ` + requestAddons.Flow + `, maybe \"security\" is not \"xtls\"`).AtWarning()\n\t\t\t}\n\t\t}\n\tdefault:\n\t\tif _, ok := iConn.(*xtls.Conn); ok {\n\t\t\tpanic(`To avoid misunderstanding, you must fill in VLESS \"flow\" when using XTLS.`)\n\t\t}\n\t}\n\n\tsessionPolicy := h.policyManager.ForLevel(request.User.Level)\n\tctx, cancel := context.WithCancel(ctx)\n\ttimer := signal.CancelAfterInactivity(ctx, cancel, sessionPolicy.Timeouts.ConnectionIdle)\n\n\tclientReader := link.Reader // .(*pipe.Reader)\n\tclientWriter := link.Writer // .(*pipe.Writer)\n\n\tpostRequest := func() error {\n\t\tdefer timer.SetTimeout(sessionPolicy.Timeouts.DownlinkOnly)\n\n\t\tbufferWriter := buf.NewBufferedWriter(buf.NewWriter(conn))\n\t\tif err := encoding.EncodeRequestHeader(bufferWriter, request, requestAddons); err != nil {\n\t\t\treturn newError(\"failed to encode request header\").Base(err).AtWarning()\n\t\t}\n","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/v2ray/v2ray-core/blob/d80440f3d57b45c829dbf513306f7adf9a0f3f76/proxy/vless/outbound/outbound.go#L140-L176","documentation":"Error \"To avoid misunderstanding, you must fill in VLESS \"flow\" when using XTLS.\" thrown in v2ray/v2ray-core.","triggerScenarios":"Thrown at proxy/vless/outbound/outbound.go:158 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add a \"flow\" field (e.g. \"xtls-rprx-vision\") to each VLESS user in the outbound when \"security\" is \"xtls\"; XTLS requires flow to be set explicitly.","If you do not intend to use XTLS, change the stream security from \"xtls\" to \"tls\" (or \"reality\") and remove any XTLS-only settings.","Make the flow value consistent between client and server VLESS configurations."],"exampleFix":"{\"protocol\":\"vless\",\"settings\":{\"vnext\":[{\"address\":\"example.com\",\"port\":443,\"users\":[{\"id\":\"uuid\",\"encryption\":\"none\",\"flow\":\"xtls-rprx-vision\"}]}]},\"streamSettings\":{\"security\":\"xtls\"}}","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d80440f3d57b45c829dbf513306f7adf9a0f3f76","analyzedAt":"2026-08-15T10:08:13.480Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}