From a58b20b5b86f068d5f80c46ac2f24e1dd3359b28 Mon Sep 17 00:00:00 2001 From: Shelikhoo Date: Mon, 8 Jun 2020 10:23:59 +0800 Subject: [PATCH] Reserve sign bit --- proxy/vmess/aead/authid.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/proxy/vmess/aead/authid.go b/proxy/vmess/aead/authid.go index c357d6fc1..74ba43485 100644 --- a/proxy/vmess/aead/authid.go +++ b/proxy/vmess/aead/authid.go @@ -96,7 +96,11 @@ func (a *AuthIDDecoderHolder) Match(AuthID [16]byte) (interface{}, error) { continue } - if math.Abs(float64(t-time.Now().Unix())) > 120 { + if t < 0 { + continue + } + + if math.Abs(math.Abs(float64(t))-float64(time.Now().Unix())) > 120 { continue }