Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2023-12-09 19:36:12 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2023-12-09 19:36:12 +0300
commit4db42ba40976328c4cb5dac7de623b2f08c20b75 (patch)
treed0271a67c1eefc96641733a433f78e0793912dae
parent56e456ff472bb406772c30b655657c7b9328aeaf (diff)
code inconsistencies and parameter mismatch in inbound.VLESSSettings class
-rw-r--r--web/assets/js/model/xray.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js
index ec701354..52205a6c 100644
--- a/web/assets/js/model/xray.js
+++ b/web/assets/js/model/xray.js
@@ -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;
}
@@ -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();