This commit is contained in:
心隨緣動 2025-09-08 22:40:51 +08:00 committed by GitHub
parent 04c4b91c68
commit 84f1d08ff9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1812,25 +1812,6 @@ 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(
@ -1974,25 +1955,7 @@ 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(