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