mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-12-17 20:54:40 +03:00
en lang edit, new designed
This commit is contained in:
@@ -151,9 +151,9 @@ class DBInbound {
|
||||
}
|
||||
}
|
||||
|
||||
genLink() {
|
||||
genLink(clientIndex) {
|
||||
const inbound = this.toInbound();
|
||||
return inbound.genLink(this.address, this.remark);
|
||||
return inbound.genLink(this.address, this.remark, clientIndex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1040,7 +1040,6 @@ class Inbound extends XrayCommonClass {
|
||||
}
|
||||
}
|
||||
|
||||
remark = this.settings.vmesses[clientIndex].email ?? remark;
|
||||
let obj = {
|
||||
v: '2',
|
||||
ps: remark,
|
||||
@@ -1063,7 +1062,6 @@ class Inbound extends XrayCommonClass {
|
||||
const port = this.port;
|
||||
const type = this.stream.network;
|
||||
const params = new Map();
|
||||
remark = settings.vlesses[clientIndex].email ?? remark;
|
||||
params.set("type", this.stream.network);
|
||||
if (this.xtls) {
|
||||
params.set("security", "xtls");
|
||||
@@ -1156,7 +1154,6 @@ class Inbound extends XrayCommonClass {
|
||||
const port = this.port;
|
||||
const type = this.stream.network;
|
||||
const params = new Map();
|
||||
remark = settings.trojans[clientIndex].email ?? remark;
|
||||
params.set("type", this.stream.network);
|
||||
if (this.xtls) {
|
||||
params.set("security", "xtls");
|
||||
@@ -1229,10 +1226,22 @@ class Inbound extends XrayCommonClass {
|
||||
|
||||
genLink(address='', remark='', clientIndex=0) {
|
||||
switch (this.protocol) {
|
||||
case Protocols.VMESS: return this.genVmessLink(address, remark, clientIndex);
|
||||
case Protocols.VLESS: return this.genVLESSLink(address, remark, clientIndex);
|
||||
case Protocols.VMESS:
|
||||
if (this.settings.vmesses[clientIndex].email != ""){
|
||||
remark += '-' + this.settings.vmesses[clientIndex].email
|
||||
}
|
||||
return this.genVmessLink(address, remark, clientIndex);
|
||||
case Protocols.VLESS:
|
||||
if (this.settings.vlesses[clientIndex].email != ""){
|
||||
remark += '-' + this.settings.vlesses[clientIndex].email
|
||||
}
|
||||
return this.genVLESSLink(address, remark, clientIndex);
|
||||
case Protocols.SHADOWSOCKS: return this.genSSLink(address, remark);
|
||||
case Protocols.TROJAN: return this.genTrojanLink(address, remark, clientIndex);
|
||||
case Protocols.TROJAN:
|
||||
if (this.settings.trojans[clientIndex].email != ""){
|
||||
remark += '-' + this.settings.trojans[clientIndex].email
|
||||
}
|
||||
return this.genTrojanLink(address, remark, clientIndex);
|
||||
default: return '';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user