{"record":{"id":"7537d03b3fe87e21","repo":"XTLS/Xray-core","slug":"0-rtt-is-not-allowed","errorCode":null,"errorMessage":"0-RTT is not allowed","messagePattern":"0-RTT is not allowed","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"proxy/vless/encryption/server.go","lineNumber":200,"sourceCode":"\tif fallback != nil {\n\t\t*fallback = append(*fallback, encryptedLength...)\n\t}\n\tdecryptedLength := make([]byte, 2)\n\tif _, err := nfsAEAD.Open(decryptedLength[:0], nil, encryptedLength, nil); err != nil {\n\t\tc.UseAES = !c.UseAES\n\t\tnfsAEAD = NewAEAD(iv, nfsKey, c.UseAES)\n\t\tif _, err := nfsAEAD.Open(decryptedLength[:0], nil, encryptedLength, nil); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tif fallback != nil {\n\t\t*fallback = nil\n\t}\n\tlength := DecodeLength(decryptedLength)\n\n\tif length == 32 {\n\t\tif i.SecondsFrom == 0 && i.SecondsTo == 0 {\n\t\t\treturn nil, errors.New(\"0-RTT is not allowed\")\n\t\t}\n\t\tencryptedTicket := make([]byte, 32)\n\t\tif _, err := io.ReadFull(conn, encryptedTicket); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tticket, err := nfsAEAD.Open(nil, nil, encryptedTicket, nil)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\ti.RWLock.RLock()\n\t\ts := i.Sessions[[16]byte(ticket)]\n\t\ti.RWLock.RUnlock()\n\t\tif s == nil {\n\t\t\tnoises := make([]byte, crypto.RandBetween(1279, 2279)) // matches 1-RTT's server hello length for \"random\", though it is not important, just for example\n\t\t\tvar err error\n\t\t\tfor err == nil {\n\t\t\t\trand.Read(noises)\n\t\t\t\t_, err = DecodeHeader(noises)","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/XTLS/Xray-core/blob/7d214f8b094f75322fa3990f8aadad1c912f24f5/proxy/vless/encryption/server.go#L182-L218","documentation":"Error \"0-RTT is not allowed\" thrown in XTLS/Xray-core.","triggerScenarios":"Thrown at proxy/vless/encryption/server.go:200 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7d214f8b094f75322fa3990f8aadad1c912f24f5","analyzedAt":"2026-08-15T14:26:24.325Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}