mirror of
https://github.com/2dust/v2rayN.git
synced 2025-10-27 02:34:41 +00:00
Compare commits
2 commits
8a19128e7f
...
f952d2383c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f952d2383c | ||
|
|
8a29e147d3 |
2 changed files with 12 additions and 12 deletions
|
|
@ -28,6 +28,5 @@
|
|||
|
||||
<UseSystemResourceKeys>true</UseSystemResourceKeys>
|
||||
<PublishSingleFile>true</PublishSingleFile>
|
||||
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ namespace ServiceLib.Services.CoreConfig
|
|||
//Mixin
|
||||
try
|
||||
{
|
||||
MixinContent(fileContent, node);
|
||||
await MixinContent(fileContent, node);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -158,20 +158,21 @@ namespace ServiceLib.Services.CoreConfig
|
|||
}
|
||||
}
|
||||
|
||||
private void MixinContent(Dictionary<string, object> fileContent, ProfileItem node)
|
||||
private async Task MixinContent(Dictionary<string, object> fileContent, ProfileItem node)
|
||||
{
|
||||
//if (!_config.clashUIItem.enableMixinContent)
|
||||
//{
|
||||
// return;
|
||||
//}
|
||||
|
||||
var path = Utils.GetConfigPath(Global.ClashMixinConfigFileName);
|
||||
if (!File.Exists(path))
|
||||
if (!_config.ClashUIItem.EnableMixinContent)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var txtFile = File.ReadAllText(Utils.GetConfigPath(Global.ClashMixinConfigFileName));
|
||||
var path = Utils.GetConfigPath(Global.ClashMixinConfigFileName);
|
||||
if (!File.Exists(path))
|
||||
{
|
||||
var mixin = EmbedUtils.GetEmbedText(Global.ClashMixinYaml);
|
||||
await File.AppendAllTextAsync(path, mixin);
|
||||
}
|
||||
|
||||
var txtFile = await File.ReadAllTextAsync(Utils.GetConfigPath(Global.ClashMixinConfigFileName));
|
||||
|
||||
var mixinContent = YamlUtils.FromYaml<Dictionary<string, object>>(txtFile);
|
||||
if (mixinContent == null)
|
||||
|
|
|
|||
Loading…
Reference in a new issue