Add mux settings for per-server, VMess/Shadowsocks/VLESS/Trojan

If you want to use global settings, do not set per-server
This commit is contained in:
2dust
2025-06-29 15:06:02 +08:00
parent b3874a78b9
commit 30c09a7b54
8 changed files with 129 additions and 6 deletions
@@ -246,6 +246,7 @@ public class ConfigHandler
item.ShortId = profileItem.ShortId;
item.SpiderX = profileItem.SpiderX;
item.Extra = profileItem.Extra;
item.MuxEnabled = profileItem.MuxEnabled;
}
var ret = item.ConfigType switch
+1
View File
@@ -94,4 +94,5 @@ public class ProfileItem: ReactiveObject
public string ShortId { get; set; }
public string SpiderX { get; set; }
public string Extra { get; set; }
public bool? MuxEnabled { get; set; }
}
@@ -751,7 +751,8 @@ public class CoreConfigSingboxService
{
try
{
if (_config.CoreBasicItem.MuxEnabled && _config.Mux4SboxItem.Protocol.IsNotEmpty())
var muxEnabled = node.MuxEnabled ?? _config.CoreBasicItem.MuxEnabled;
if (muxEnabled && _config.Mux4SboxItem.Protocol.IsNotEmpty())
{
var mux = new Multiplex4Sbox()
{
@@ -631,7 +631,7 @@ public class CoreConfigV2rayService
{
try
{
var muxEnabled = _config.CoreBasicItem.MuxEnabled;
var muxEnabled = node.MuxEnabled ?? _config.CoreBasicItem.MuxEnabled;
switch (node.ConfigType)
{
case EConfigType.VMess: