Comparing version 2.1.5 to 2.1.6
{ | ||
"name": "js2ray", | ||
"version": "2.1.5", | ||
"version": "2.1.6", | ||
"description": "The v2ray vmess protocol, based on nodejs javascript which you can use on hosts and servers", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -84,5 +84,9 @@ | ||
const header = EncodeRequestHeader(app, randomuser) | ||
app.user.bytesRead += buffer.length | ||
const chunks = common.getChunks(buffer, 0x3fff).map(resolveChunk.bind(app)); | ||
this.message(Buffer.concat([header, ...chunks])) | ||
if (header) { | ||
if (app.user.deactive) | ||
return | ||
app.user.bytesRead += buffer.length | ||
const chunks = common.getChunks(buffer, 0x3fff).map(resolveChunk.bind(app)); | ||
this.message(Buffer.concat([header, ...chunks])) | ||
} | ||
} else { | ||
@@ -168,7 +172,7 @@ if (app.user.deactive) | ||
} else if (typeof random_user == "object") { | ||
var cipher = validator.SealVMessAEADHeader(random_user.id.cmdKey, command) | ||
if (cipher == undefined) { | ||
const aeadHeader = validator.SealVMessAEADHeader(random_user.id.cmdKey, command) | ||
if (aeadHeader == undefined) { | ||
return log(`AEAD read failed`, 1) | ||
} | ||
return cipher; | ||
return aeadHeader; | ||
} else { | ||
@@ -175,0 +179,0 @@ return log(`invalid user`, 1); |
@@ -78,2 +78,5 @@ | ||
} | ||
if (aeadUser.deactive) | ||
return | ||
if (aeadUser.ipCount != 0 && common.iplimit(app.ip, aeadUser)) | ||
@@ -80,0 +83,0 @@ return log(`maximum ip used by user ${aeadUser.id.UUID.toString("hex")}`, 1) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
125393
3226