v2rayN/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxStatisticService.cs
DHR60 9c82df5b49
Refactor core config gen (#8768)
* Refactor core config gen

* Update tag naming

* Support sing-box 1.11 DNS

* Fix

* Optimize ProfileItem acquisition speed

* Fix

* Fix
2026-02-24 19:48:59 +08:00

27 lines
862 B
C#

namespace ServiceLib.Services.CoreConfig;
public partial class CoreConfigSingboxService
{
private void GenExperimental()
{
//if (_config.guiItem.enableStatistics)
{
_coreConfig.experimental ??= new Experimental4Sbox();
_coreConfig.experimental.clash_api = new Clash_Api4Sbox()
{
external_controller = $"{Global.Loopback}:{AppManager.Instance.StatePort2}",
};
}
if (_config.CoreBasicItem.EnableCacheFile4Sbox)
{
_coreConfig.experimental ??= new Experimental4Sbox();
_coreConfig.experimental.cache_file = new CacheFile4Sbox()
{
enabled = true,
path = Utils.GetBinPath("cache.db"),
store_fakeip = context.SimpleDnsItem.FakeIP == true
};
}
}
}