Browse Source

Check replay only for AEAD connection, and later

pull/2561/head
Shelikhoo 5 years ago
parent
commit
78d7b4f183
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316
  1. 7
      proxy/vmess/aead/authid.go

7
proxy/vmess/aead/authid.go

@ -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

Loading…
Cancel
Save