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
path: root/web
diff options
context:
space:
mode:
authorMHSanaei <33454419+MHSanaei@users.noreply.github.com>2023-03-01 00:12:08 +0300
committerMHSanaei <33454419+MHSanaei@users.noreply.github.com>2023-03-01 00:12:08 +0300
commit44b74224ab6a82686f32d5c2ec7dfad07e80dfb5 (patch)
treec9a8566a359a1e45a1921177418e333f077baa33 /web
parent24af44ca6c887dcf9c99a68bd99bd9e2a80ca6c8 (diff)
Update xray.js
Diffstat (limited to 'web')
-rw-r--r--web/assets/js/model/xray.js29
1 files changed, 14 insertions, 15 deletions
diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js
index ea34e081..126967ec 100644
--- a/web/assets/js/model/xray.js
+++ b/web/assets/js/model/xray.js
@@ -1227,7 +1227,7 @@ class Inbound extends XrayCommonClass {
return url.toString();
}
- genLink(address='', remark='', clientIndex=0) {
+ genLink(address='', remark='') {
switch (this.protocol) {
case Protocols.VMESS:
if (this.settings.vmesses[clientIndex].email != ""){
@@ -1249,21 +1249,20 @@ class Inbound extends XrayCommonClass {
}
}
genInboundLinks(address = '', remark = '') {
- let link = '';
- JSON.parse(this.settings)
- switch (this.protocol) {
- case Protocols.VMESS:
- case Protocols.VLESS:
- case Protocols.TROJAN:
- JSON.parse(this.settings).clients.forEach((client,index) => {
- link += this.genLink(address, remark, index) + '\r\n';
- });
- return link;
- case Protocols.SHADOWSOCKS:
- return (this.genSSLink(address, remark) + '\r\n');
- default: return '';
+ let link = '';
+ switch (this.protocol) {
+ case Protocols.VMESS:
+ case Protocols.VLESS:
+ case Protocols.TROJAN:
+ JSON.parse(this.settings).clients.forEach((_,index) => {
+ link += this.genLink(address, remark, index) + '\r\n';
+ });
+ return link;
+ case Protocols.SHADOWSOCKS:
+ return (this.genSSLink(address, remark) + '\r\n');
+ default: return '';
+ }
}
-}
static fromJson(json={}) {
return new Inbound(