Browse Source

Reserve sign bit

Shelikhoo 5 years ago
parent
commit
a58b20b5b8
1 changed files with 5 additions and 1 deletions
  1. 5 1
      proxy/vmess/aead/authid.go

+ 5 - 1
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
 		}