@@ -337,16 +337,16 @@ private int GenOutboundMux(ProfileItem node, Outbound4Sbox outbound)
337
337
{
338
338
try
339
339
{
340
- // if (_config.coreBasicItem.muxEnabled)
341
- // {
342
- // var mux = new Multiplex4Sbox()
343
- // {
344
- // enabled = true,
345
- // protocol = _config.mux4SboxItem.protocol,
346
- // max_connections = _config.mux4SboxItem.max_connections,
347
- // };
348
- // outbound.multiplex = mux;
349
- // }
340
+ if ( _config . coreBasicItem . muxEnabled && ! Utils . IsNullOrEmpty ( _config . mux4SboxItem . protocol ) )
341
+ {
342
+ var mux = new Multiplex4Sbox ( )
343
+ {
344
+ enabled = true ,
345
+ protocol = _config . mux4SboxItem . protocol ,
346
+ max_connections = _config . mux4SboxItem . max_connections ,
347
+ } ;
348
+ outbound . multiplex = mux ;
349
+ }
350
350
}
351
351
catch ( Exception ex )
352
352
{
@@ -822,7 +822,7 @@ private int GenDns(ProfileItem node, SingboxConfig singboxConfig)
822
822
return 0 ;
823
823
}
824
824
825
- private int GenExperimentalStatistic ( SingboxConfig singboxConfig )
825
+ private int GenExperimental ( SingboxConfig singboxConfig )
826
826
{
827
827
if ( _config . guiItem . enableStatistics )
828
828
{
@@ -831,39 +831,8 @@ private int GenExperimentalStatistic(SingboxConfig singboxConfig)
831
831
{
832
832
external_controller = $ "{ Global . Loopback } :{ LazyConfig . Instance . StatePort } ",
833
833
} ;
834
- // singboxConfig.experimental.v2ray_api = new V2ray_Api4Sbox()
835
- // {
836
- // listen = $"{Global.Loopback}:{Global.StatePort}",
837
- // stats = new Stats4Sbox()
838
- // {
839
- // enabled = true,
840
- // }
841
- // };
842
- // singboxConfig.experimental = new Experimental4Sbox()
843
- // {
844
- // cache_file = new CacheFile4Sbox()
845
- // {
846
- // enabled = true
847
- // },
848
- // //v2ray_api = new V2ray_Api4Sbox()
849
- // //{
850
- // // listen = $"{Global.Loopback}:{Global.StatePort}",
851
- // // stats = new Stats4Sbox()
852
- // // {
853
- // // enabled = true,
854
- // // }
855
- // //},
856
- // clash_api = new Clash_Api4Sbox()
857
- // {
858
- // external_controller = $"{Global.Loopback}:{LazyConfig.Instance.StatePort}",
859
- // }
860
- // };
861
834
}
862
- return 0 ;
863
- }
864
835
865
- private int GenExperimentalCacheFile ( SingboxConfig singboxConfig )
866
- {
867
836
if ( _config . coreBasicItem . enableCacheFile4Sbox )
868
837
{
869
838
singboxConfig . experimental ??= new Experimental4Sbox ( ) ;
@@ -876,15 +845,6 @@ private int GenExperimentalCacheFile(SingboxConfig singboxConfig)
876
845
return 0 ;
877
846
}
878
847
879
- private int GenExperimental ( SingboxConfig singboxConfig )
880
- {
881
- var r = GenExperimentalStatistic ( singboxConfig ) ;
882
- if ( r != 0 ) return r ;
883
- r = GenExperimentalCacheFile ( singboxConfig ) ;
884
- if ( r != 0 ) return r ;
885
- return 0 ;
886
- }
887
-
888
848
private int ConvertGeo2Ruleset ( SingboxConfig singboxConfig )
889
849
{
890
850
var geosite = "geosite" ;
0 commit comments