VLESS Encryption: Improve server-side tickets' expiration mechanism

https://github.com/XTLS/Xray-core/pull/5067#issuecomment-3253717319
This commit is contained in:
RPRX
2025-09-04 14:03:55 +00:00
committed by GitHub
parent d20397c15d
commit cbade89ab1
5 changed files with 72 additions and 31 deletions

View File

@@ -101,13 +101,13 @@ func (c *VLessInboundConfig) Build() (proto.Message, error) {
if err != nil {
return false
}
config.SecondsFrom = uint32(i)
if len(t) > 1 {
config.SecondsFrom = int64(i)
if len(t) == 2 {
i, err := strconv.Atoi(t[1])
if err != nil {
return false
}
config.SecondsTo = uint32(i)
config.SecondsTo = int64(i)
}
padding := 0
for _, r := range s[3:] {