{"record":{"id":"e120771ceb48bad6","repo":"XTLS/Xray-core","slug":"vless-users-please-use-simplified-outbound-s-conf","errorCode":null,"errorMessage":"VLESS users: please use simplified outbound's config style to use \"reverse\"","messagePattern":"VLESS users: please use simplified outbound's config style to use \"reverse\"","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"infra/conf/vless.go","lineNumber":316,"sourceCode":"\t\t\t\taccount.Id = c.Id\n\t\t\t\taccount.Flow = c.Flow\n\t\t\t\t//account.Seed = c.Seed\n\t\t\t\taccount.Encryption = c.Encryption\n\t\t\t\tif c.Reverse != nil {\n\t\t\t\t\trvs, err := c.Reverse.Build()\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn nil, err\n\t\t\t\t\t}\n\t\t\t\t\taccount.Reverse = rvs\n\t\t\t\t}\n\t\t\t\taccount.Testpre = c.Testpre\n\t\t\t\taccount.Testseed = c.Testseed\n\t\t\t} else {\n\t\t\t\tif err := json.Unmarshal(rawUser, account); err != nil {\n\t\t\t\t\treturn nil, errors.New(`VLESS users: invalid user`).Base(err)\n\t\t\t\t}\n\t\t\t\tif account.Reverse != nil { // may not be reached: error json unmarshal\n\t\t\t\t\treturn nil, errors.New(`VLESS users: please use simplified outbound's config style to use \"reverse\"`)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tu, err := uuid.ParseString(account.Id)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\taccount.Id = u.String()\n\n\t\t\tswitch account.Flow {\n\t\t\tcase \"\":\n\t\t\tcase vless.XRV, vless.XRV + \"-udp443\":\n\t\t\tdefault:\n\t\t\t\treturn nil, errors.New(`VLESS users: \"flow\" doesn't support \"` + account.Flow + `\" in this version`)\n\t\t\t}\n\n\t\t\tif !func() bool {\n\t\t\t\ts := strings.Split(account.Encryption, \".\")","sourceCodeStart":298,"sourceCodeEnd":334,"githubUrl":"https://github.com/XTLS/Xray-core/blob/7d214f8b094f75322fa3990f8aadad1c912f24f5/infra/conf/vless.go#L298-L334","documentation":"Returned by VLessOutboundConfig.Build() when, in full style, the decoded vless.Account carries a non-nil Reverse field. Reverse tunnels are only supported through the simplified outbound config (top-level \"reverse\" object); the full-style users JSON path is not an accepted way to configure them. The code comment itself notes this branch may be unreachable because vless.Account's Reverse usually does not populate from JSON unmarshal.","triggerScenarios":"Attempting \"users\":[{\"id\":\"...\",\"reverse\":{\"tag\":\"x\"}}] in a full-style outbound; practically rare — the account unmarshal typically ignores/skips the reverse field rather than populating it.","commonSituations":"Experimenting with reverse tunnel configs by inlining reverse into the user object after reading the protobuf definition; hand-crafted JSON aimed at internal field names.","solutions":["Remove \"reverse\" from the users entry","Configure reverse via the simplified style: put \"reverse\":{\"tag\":\"...\"} at the outbound top level next to \"address\"/\"id\"","Keep the full-style outbound for normal proxying; use a separate simplified outbound for the reverse bridge"],"exampleFix":"// before\n\"settings\": { \"vnext\": [ { \"address\": \"s\", \"users\": [ { \"id\": \"...\", \"reverse\": { \"tag\": \"t\" } } ] } ] }\n// after (simplified style)\n\"settings\": { \"address\": \"s\", \"id\": \"...\", \"reverse\": { \"tag\": \"t\" } }","handlingStrategy":"validation","validationCode":"func rejectReverseInUsers(cfg map[string]any) error {\n\toutbounds, _ := cfg[\"outbounds\"].([]any)\n\tfor _, ob := range outbounds {\n\t\tm, _ := ob.(map[string]any)\n\t\tif p, _ := m[\"protocol\"].(string); p != \"vless\" { continue }\n\t\tsettings, _ := m[\"settings\"].(map[string]any)\n\t\tif _, simplified := settings[\"address\"]; simplified { continue }\n\t\tvnext, _ := settings[\"vnext\"].([]any)\n\t\tfor _, v := range vnext {\n\t\t\tep, _ := v.(map[string]any)\n\t\t\tusers, _ := ep[\"users\"].([]any)\n\t\t\tfor _, u := range users {\n\t\t\t\tum, _ := u.(map[string]any)\n\t\t\t\tif _, has := um[\"reverse\"]; has {\n\t\t\t\t\treturn fmt.Errorf(\"outbound %v: reverse inside users is not supported; use simplified outbound style\", m[\"tag\"])\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}","typeGuard":"func userHasReverse(u map[string]any) bool {\n\t_, ok := u[\"reverse\"]\n\treturn ok\n}","tryCatchPattern":null,"preventionTips":["Configure reverse only via the top-level \"reverse\" object in a simplified-style outbound","Do not hand-craft internal protobuf field names inside users JSON","Keep reverse-tunnel outbounds separate from normal proxy outbounds"],"tags":["vless","reverse","outbound","config","xray"],"backgroundTag":null,"analyzedSha":"7d214f8b094f75322fa3990f8aadad1c912f24f5","analyzedAt":"2026-08-15T14:26:24.325Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}