diff options
| author | MHSanaei <mc.sanaei@gmail.com> | 2023-02-12 13:15:43 +0300 |
|---|---|---|
| committer | MHSanaei <mc.sanaei@gmail.com> | 2023-02-12 13:15:43 +0300 |
| commit | 920259b6f8345f30c6a4bd40205c18a37b867f0f (patch) | |
| tree | aeb26ed583cb6255d3328f9d7c5a0bdd5c822fe1 | |
| parent | 9b85ec26f12ed61b064db3f3543309d7af0326f0 (diff) | |
Client email as remark in multi-user
| -rw-r--r-- | web/assets/js/model/xray.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js index cfa82368..f5cbb1e0 100644 --- a/web/assets/js/model/xray.js +++ b/web/assets/js/model/xray.js @@ -1039,7 +1039,8 @@ class Inbound extends XrayCommonClass { address = this.stream.tls.server; } } - + + remark = this.settings.vmesses[clientIndex].email ?? remark; let obj = { v: '2', ps: remark, @@ -1062,6 +1063,7 @@ 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"); @@ -1154,6 +1156,7 @@ 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"); @@ -1215,7 +1218,7 @@ class Inbound extends XrayCommonClass { if (this.xtls) { params.set("flow", this.settings.trojans[clientIndex].flow); } - const link = `trojan://${settings.trojans[clientIndex].password}@${address}:${this.port}#${encodeURIComponent(remark+"-"+settings.trojans[clientIndex].email)}`; + const link = `trojan://${settings.trojans[clientIndex].password}@${address}:${this.port}#${encodeURIComponent(remark)}`; const url = new URL(link); for (const [key, value] of params) { url.searchParams.set(key, value) |
