Compare commits

..

2 commits

Author SHA1 Message Date
mhsanaei
ce76cedb0d
fixed: mux #3185
Some checks failed
Release 3X-UI / build (386) (push) Has been cancelled
Release 3X-UI / build (amd64) (push) Has been cancelled
Release 3X-UI / build (arm64) (push) Has been cancelled
Release 3X-UI / build (armv5) (push) Has been cancelled
Release 3X-UI / build (armv6) (push) Has been cancelled
Release 3X-UI / build (armv7) (push) Has been cancelled
Release 3X-UI / build (s390x) (push) Has been cancelled
2025-07-04 14:02:33 +02:00
mhsanaei
24a313d605
fixed: type #3186 2025-07-04 13:25:24 +02:00
2 changed files with 19 additions and 4 deletions

View file

@ -1249,7 +1249,6 @@ class Inbound extends XrayCommonClass {
id: clientId,
scy: security,
net: this.stream.network,
type: 'none',
tls: tls,
};
const network = this.stream.network;
@ -1284,7 +1283,7 @@ class Inbound extends XrayCommonClass {
const xhttp = this.stream.xhttp;
obj.path = xhttp.path;
obj.host = xhttp.host?.length > 0 ? xhttp.host : this.getHeader(xhttp, 'host');
obj.mode = xhttp.mode;
obj.type = xhttp.mode;
}
if (tls === 'tls') {

View file

@ -616,11 +616,27 @@ class Outbound extends CommonClass {
}
canEnableMux() {
if (this.settings.flow && this.settings.flow != '') {
// Disable Mux if flow is set
if (this.settings.flow && this.settings.flow !== '') {
this.mux.enabled = false;
return false;
}
return [Protocols.VMess, Protocols.VLESS, Protocols.Trojan, Protocols.Shadowsocks, Protocols.HTTP, Protocols.Socks].includes(this.protocol);
// Disable Mux if network is xhttp
if (this.stream.network === 'xhttp') {
this.mux.enabled = false;
return false;
}
// Allow Mux only for these protocols
return [
Protocols.VMess,
Protocols.VLESS,
Protocols.Trojan,
Protocols.Shadowsocks,
Protocols.HTTP,
Protocols.Socks
].includes(this.protocol);
}
hasVnext() {