Skip to content

Commit

Permalink
Merge pull request #34 from MHSanaei/dev
Browse files Browse the repository at this point in the history
i hate myself
  • Loading branch information
MHSanaei committed Mar 19, 2023
2 parents 63acd58 + fe7ce3f commit c5bbee3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions web/assets/js/model/xray.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)}`;
Expand Down

0 comments on commit c5bbee3

Please sign in to comment.