xtls bug fixed

This commit is contained in:
MHSanaei 2023-03-19 12:39:14 +03:30
parent b7f476568b
commit e68317c6bd

View file

@ -1156,14 +1156,11 @@ class Inbound extends XrayCommonClass {
} }
} }
if (this.xtls) { if (this.XTLS) {
if (!ObjectUtil.isEmpty(this.stream.tls.server)) {
address = this.stream.tls.server;
if (type === "tcp") { if (type === "tcp") {
params.set("flow", this.settings.vlesses[clientIndex].flow); params.set("flow", this.settings.vlesses[clientIndex].flow);
} }
} }
}
const link = `vless://${uuid}@${address}:${port}`; const link = `vless://${uuid}@${address}:${port}`;
const url = new URL(link); const url = new URL(link);
@ -1251,14 +1248,11 @@ class Inbound extends XrayCommonClass {
} }
} }
if (this.xtls) { if (this.XTLS) {
if (!ObjectUtil.isEmpty(this.stream.tls.server)) {
address = this.stream.tls.server;
if (type === "tcp" && this.settings.trojans[clientIndex].flow.length > 0) { if (type === "tcp" && this.settings.trojans[clientIndex].flow.length > 0) {
params.set("flow", this.settings.trojans[clientIndex].flow); params.set("flow", this.settings.trojans[clientIndex].flow);
} }
} }
}
const link = `trojan://${settings.trojans[clientIndex].password}@${address}:${this.port}#${encodeURIComponent(remark)}`; const link = `trojan://${settings.trojans[clientIndex].password}@${address}:${this.port}#${encodeURIComponent(remark)}`;
const url = new URL(link); const url = new URL(link);