1
0

2 Commity c81c27073c ... ce76cedb0d

Autor SHA1 Správa Dátum
  mhsanaei ce76cedb0d fixed: mux #3185 1 týždeň pred
  mhsanaei 24a313d605 fixed: type #3186 1 týždeň pred

+ 1 - 2
web/assets/js/model/inbound.js

@@ -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') {

+ 18 - 2
web/assets/js/model/outbound.js

@@ -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() {