v2.6.9 -------->>> Independent SpeedLimit
This commit is contained in:
parent
e5ec682dd1
commit
ddbbec9857
@ -1785,6 +1785,7 @@ Inbound.VmessSettings.VMESS = class extends XrayCommonClass {
|
|||||||
security = USERS_SECURITY.AUTO,
|
security = USERS_SECURITY.AUTO,
|
||||||
email = RandomUtil.randomLowerAndNum(8),
|
email = RandomUtil.randomLowerAndNum(8),
|
||||||
limitIp = 0,
|
limitIp = 0,
|
||||||
|
speedLimit = 0, // <--- 中文注释: 新增 speedLimit 属性
|
||||||
totalGB = 0,
|
totalGB = 0,
|
||||||
expiryTime = 0,
|
expiryTime = 0,
|
||||||
enable = true,
|
enable = true,
|
||||||
@ -1800,6 +1801,7 @@ Inbound.VmessSettings.VMESS = class extends XrayCommonClass {
|
|||||||
this.security = security;
|
this.security = security;
|
||||||
this.email = email;
|
this.email = email;
|
||||||
this.limitIp = limitIp;
|
this.limitIp = limitIp;
|
||||||
|
this.speedLimit = speedLimit; // <--- 中文注释: 赋值
|
||||||
this.totalGB = totalGB;
|
this.totalGB = totalGB;
|
||||||
this.expiryTime = expiryTime;
|
this.expiryTime = expiryTime;
|
||||||
this.enable = enable;
|
this.enable = enable;
|
||||||
@ -1811,12 +1813,33 @@ Inbound.VmessSettings.VMESS = class extends XrayCommonClass {
|
|||||||
this.updated_at = updated_at;
|
this.updated_at = updated_at;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 【建议增加】为 VMESS 添加完整的 toJson 方法
|
||||||
|
toJson() {
|
||||||
|
return {
|
||||||
|
id: this.id,
|
||||||
|
security: this.security,
|
||||||
|
email: this.email,
|
||||||
|
limitIp: this.limitIp,
|
||||||
|
speedLimit: this.speedLimit, // 中文注释: 序列化 speedLimit 字段
|
||||||
|
totalGB: this.totalGB,
|
||||||
|
expiryTime: this.expiryTime,
|
||||||
|
enable: this.enable,
|
||||||
|
tgId: this.tgId,
|
||||||
|
subId: this.subId,
|
||||||
|
comment: this.comment,
|
||||||
|
reset: this.reset,
|
||||||
|
created_at: this.created_at,
|
||||||
|
updated_at: this.updated_at,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
static fromJson(json = {}) {
|
static fromJson(json = {}) {
|
||||||
return new Inbound.VmessSettings.VMESS(
|
return new Inbound.VmessSettings.VMESS(
|
||||||
json.id,
|
json.id,
|
||||||
json.security,
|
json.security,
|
||||||
json.email,
|
json.email,
|
||||||
json.limitIp,
|
json.limitIp,
|
||||||
|
json.speedLimit || 0, // <--- 中文注释: 从 JSON 解析
|
||||||
json.totalGB,
|
json.totalGB,
|
||||||
json.expiryTime,
|
json.expiryTime,
|
||||||
json.enable,
|
json.enable,
|
||||||
@ -1900,6 +1923,7 @@ Inbound.VLESSSettings.VLESS = class extends XrayCommonClass {
|
|||||||
flow = '',
|
flow = '',
|
||||||
email = RandomUtil.randomLowerAndNum(8),
|
email = RandomUtil.randomLowerAndNum(8),
|
||||||
limitIp = 0,
|
limitIp = 0,
|
||||||
|
speedLimit = 0, // <--- 中文注释: 新增 speedLimit 属性
|
||||||
totalGB = 0,
|
totalGB = 0,
|
||||||
expiryTime = 0,
|
expiryTime = 0,
|
||||||
enable = true,
|
enable = true,
|
||||||
@ -1915,6 +1939,7 @@ Inbound.VLESSSettings.VLESS = class extends XrayCommonClass {
|
|||||||
this.flow = flow;
|
this.flow = flow;
|
||||||
this.email = email;
|
this.email = email;
|
||||||
this.limitIp = limitIp;
|
this.limitIp = limitIp;
|
||||||
|
this.speedLimit = speedLimit; // <--- 中文注释: 赋值
|
||||||
this.totalGB = totalGB;
|
this.totalGB = totalGB;
|
||||||
this.expiryTime = expiryTime;
|
this.expiryTime = expiryTime;
|
||||||
this.enable = enable;
|
this.enable = enable;
|
||||||
@ -1926,12 +1951,33 @@ Inbound.VLESSSettings.VLESS = class extends XrayCommonClass {
|
|||||||
this.updated_at = updated_at;
|
this.updated_at = updated_at;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 【建议增加】为 VLESS 添加完整的 toJson 方法
|
||||||
|
toJson() {
|
||||||
|
return {
|
||||||
|
id: this.id,
|
||||||
|
flow: this.flow,
|
||||||
|
email: this.email,
|
||||||
|
limitIp: this.limitIp,
|
||||||
|
speedLimit: this.speedLimit, // 中文注释: 序列化 speedLimit 字段
|
||||||
|
totalGB: this.totalGB,
|
||||||
|
expiryTime: this.expiryTime,
|
||||||
|
enable: this.enable,
|
||||||
|
tgId: this.tgId,
|
||||||
|
subId: this.subId,
|
||||||
|
comment: this.comment,
|
||||||
|
reset: this.reset,
|
||||||
|
created_at: this.created_at,
|
||||||
|
updated_at: this.updated_at,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
static fromJson(json = {}) {
|
static fromJson(json = {}) {
|
||||||
return new Inbound.VLESSSettings.VLESS(
|
return new Inbound.VLESSSettings.VLESS(
|
||||||
json.id,
|
json.id,
|
||||||
json.flow,
|
json.flow,
|
||||||
json.email,
|
json.email,
|
||||||
json.limitIp,
|
json.limitIp,
|
||||||
|
json.speedLimit || 0, // <--- 中文注释: 从 JSON 解析
|
||||||
json.totalGB,
|
json.totalGB,
|
||||||
json.expiryTime,
|
json.expiryTime,
|
||||||
json.enable,
|
json.enable,
|
||||||
@ -2045,6 +2091,7 @@ Inbound.TrojanSettings.Trojan = class extends XrayCommonClass {
|
|||||||
password = RandomUtil.randomSeq(10),
|
password = RandomUtil.randomSeq(10),
|
||||||
email = RandomUtil.randomLowerAndNum(8),
|
email = RandomUtil.randomLowerAndNum(8),
|
||||||
limitIp = 0,
|
limitIp = 0,
|
||||||
|
speedLimit = 0, // <--- 中文注释: 新增 speedLimit 属性
|
||||||
totalGB = 0,
|
totalGB = 0,
|
||||||
expiryTime = 0,
|
expiryTime = 0,
|
||||||
enable = true,
|
enable = true,
|
||||||
@ -2059,6 +2106,7 @@ Inbound.TrojanSettings.Trojan = class extends XrayCommonClass {
|
|||||||
this.password = password;
|
this.password = password;
|
||||||
this.email = email;
|
this.email = email;
|
||||||
this.limitIp = limitIp;
|
this.limitIp = limitIp;
|
||||||
|
this.speedLimit = speedLimit; // <--- 中文注释: 赋值
|
||||||
this.totalGB = totalGB;
|
this.totalGB = totalGB;
|
||||||
this.expiryTime = expiryTime;
|
this.expiryTime = expiryTime;
|
||||||
this.enable = enable;
|
this.enable = enable;
|
||||||
@ -2075,6 +2123,7 @@ Inbound.TrojanSettings.Trojan = class extends XrayCommonClass {
|
|||||||
password: this.password,
|
password: this.password,
|
||||||
email: this.email,
|
email: this.email,
|
||||||
limitIp: this.limitIp,
|
limitIp: this.limitIp,
|
||||||
|
speedLimit: this.speedLimit, // <--- 中文注释: 序列化到 JSON
|
||||||
totalGB: this.totalGB,
|
totalGB: this.totalGB,
|
||||||
expiryTime: this.expiryTime,
|
expiryTime: this.expiryTime,
|
||||||
enable: this.enable,
|
enable: this.enable,
|
||||||
@ -2092,6 +2141,7 @@ Inbound.TrojanSettings.Trojan = class extends XrayCommonClass {
|
|||||||
json.password,
|
json.password,
|
||||||
json.email,
|
json.email,
|
||||||
json.limitIp,
|
json.limitIp,
|
||||||
|
json.speedLimit || 0, // <--- 中文注释: 从 JSON 解析
|
||||||
json.totalGB,
|
json.totalGB,
|
||||||
json.expiryTime,
|
json.expiryTime,
|
||||||
json.enable,
|
json.enable,
|
||||||
@ -2214,6 +2264,7 @@ Inbound.ShadowsocksSettings.Shadowsocks = class extends XrayCommonClass {
|
|||||||
password = RandomUtil.randomShadowsocksPassword(),
|
password = RandomUtil.randomShadowsocksPassword(),
|
||||||
email = RandomUtil.randomLowerAndNum(8),
|
email = RandomUtil.randomLowerAndNum(8),
|
||||||
limitIp = 0,
|
limitIp = 0,
|
||||||
|
speedLimit = 0, // <--- 中文注释: 新增 speedLimit 属性
|
||||||
totalGB = 0,
|
totalGB = 0,
|
||||||
expiryTime = 0,
|
expiryTime = 0,
|
||||||
enable = true,
|
enable = true,
|
||||||
@ -2229,6 +2280,7 @@ Inbound.ShadowsocksSettings.Shadowsocks = class extends XrayCommonClass {
|
|||||||
this.password = password;
|
this.password = password;
|
||||||
this.email = email;
|
this.email = email;
|
||||||
this.limitIp = limitIp;
|
this.limitIp = limitIp;
|
||||||
|
this.speedLimit = speedLimit; // <--- 中文注释: 赋值
|
||||||
this.totalGB = totalGB;
|
this.totalGB = totalGB;
|
||||||
this.expiryTime = expiryTime;
|
this.expiryTime = expiryTime;
|
||||||
this.enable = enable;
|
this.enable = enable;
|
||||||
@ -2246,6 +2298,7 @@ Inbound.ShadowsocksSettings.Shadowsocks = class extends XrayCommonClass {
|
|||||||
password: this.password,
|
password: this.password,
|
||||||
email: this.email,
|
email: this.email,
|
||||||
limitIp: this.limitIp,
|
limitIp: this.limitIp,
|
||||||
|
speedLimit: this.speedLimit, // <--- 中文注释: 序列化到 JSON
|
||||||
totalGB: this.totalGB,
|
totalGB: this.totalGB,
|
||||||
expiryTime: this.expiryTime,
|
expiryTime: this.expiryTime,
|
||||||
enable: this.enable,
|
enable: this.enable,
|
||||||
@ -2264,6 +2317,7 @@ Inbound.ShadowsocksSettings.Shadowsocks = class extends XrayCommonClass {
|
|||||||
json.password,
|
json.password,
|
||||||
json.email,
|
json.email,
|
||||||
json.limitIp,
|
json.limitIp,
|
||||||
|
json.speedLimit || 0, // <--- 中文注释: 从 JSON 解析
|
||||||
json.totalGB,
|
json.totalGB,
|
||||||
json.expiryTime,
|
json.expiryTime,
|
||||||
json.enable,
|
json.enable,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user