diff options
| author | MHSanaei <33454419+MHSanaei@users.noreply.github.com> | 2023-03-19 14:09:19 +0300 |
|---|---|---|
| committer | MHSanaei <33454419+MHSanaei@users.noreply.github.com> | 2023-03-19 14:09:19 +0300 |
| commit | fe7ce3f74bf84354bdd5eef0c3ef685f1013bff5 (patch) | |
| tree | 3b7015834beef208c794e0432c5b2c1992bc19a8 /web/assets | |
| parent | 63acd585ba8d5c85aa2ac67521f9d31a7db05ade (diff) | |
Update xray.js
Diffstat (limited to 'web/assets')
| -rw-r--r-- | web/assets/js/model/xray.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js index 7fdf557c..360f4bae 100644 --- a/web/assets/js/model/xray.js +++ b/web/assets/js/model/xray.js @@ -1157,8 +1157,11 @@ class Inbound extends XrayCommonClass { } if (this.XTLS) { - params.set("flow", this.settings.vlesses[clientIndex].flow); + if (!ObjectUtil.isEmpty(this.stream.tls.server)) { + address = this.stream.tls.server; } + params.set("flow", this.settings.vlesses[clientIndex].flow); + } const link = `vless://${uuid}@${address}:${port}`; const url = new URL(link); @@ -1246,8 +1249,11 @@ class Inbound extends XrayCommonClass { } } - if (this.XTLS) { - params.set("flow", this.settings.trojans[clientIndex].flow); + if (this.XTLS) { + if (!ObjectUtil.isEmpty(this.stream.tls.server)) { + address = this.stream.tls.server; + } + params.set("flow", this.settings.trojans[clientIndex].flow); } const link = `trojan://${settings.trojans[clientIndex].password}@${address}:${this.port}#${encodeURIComponent(remark)}`; |
