1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-27 01:45:23 +00:00

Check replay only for AEAD connection, and later

This commit is contained in:
Shelikhoo 2020-06-06 20:54:29 +08:00
parent 9fc37646b6
commit 78d7b4f183
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316

View File

@ -96,13 +96,14 @@ func (a *AuthIDDecoderHolder) Match(AuthID [16]byte) (interface{}, error) {
continue
}
if math.Abs(float64(t-time.Now().Unix())) > 120 {
continue
}
if !a.apw.Check(AuthID[:]) {
return nil, ErrReplay
}
if math.Abs(float64(t-time.Now().Unix())) > 120 {
continue
}
_ = r
return v.ticket, nil