Skip to content

Commit

Permalink
code inconsistencies and parameter mismatch in inbound.VLESSSettings …
Browse files Browse the repository at this point in the history
…class
  • Loading branch information
MHSanaei committed Dec 9, 2023
1 parent 56e456f commit 4db42ba
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions web/assets/js/model/xray.js
Original file line number Diff line number Diff line change
Expand Up @@ -1776,10 +1776,10 @@ Inbound.VLESSSettings = class extends Inbound.Settings {
constructor(protocol,
vlesses=[new Inbound.VLESSSettings.VLESS()],
decryption='none',
fallbacks=[],) {
fallbacks=[]) {
super(protocol);
this.vlesses = vlesses;
this.decryption = 'none'; // Using decryption is not implemented here
this.decryption = decryption;
this.fallbacks = fallbacks;
}

Expand All @@ -1796,20 +1796,20 @@ Inbound.VLESSSettings = class extends Inbound.Settings {
return new Inbound.VLESSSettings(
Protocols.VLESS,
json.clients.map(client => Inbound.VLESSSettings.VLESS.fromJson(client)),
'none',
Inbound.VLESSSettings.Fallback.fromJson(json.fallbacks),
json.decryption || 'none',
json.fallbacks.map(fallback => Inbound.VLESSSettings.Fallback.fromJson(fallback)),
);
}

toJson() {
return {
clients: Inbound.VLESSSettings.toJsonArray(this.vlesses),
decryption: 'none',
decryption: this.decryption,
fallbacks: Inbound.VLESSSettings.toJsonArray(this.fallbacks),
};
}

};

Inbound.VLESSSettings.VLESS = class extends XrayCommonClass {
constructor(id=RandomUtil.randomUUID(), flow='', email=RandomUtil.randomLowerAndNum(8),limitIp=0, totalGB=0, expiryTime=0, enable=true, tgId='', subId=RandomUtil.randomLowerAndNum(16), reset=0) {
super();
Expand Down

0 comments on commit 4db42ba

Please sign in to comment.