pull/5550/head
2dust 2024-08-04 19:26:01 +08:00
parent bb4d3997ad
commit 8023eb74c9
1 changed files with 14 additions and 9 deletions

View File

@ -389,19 +389,24 @@ namespace v2rayN.Handler.CoreConfig
return -1; return -1;
} }
var txtFile = File.ReadAllText(addressFileName); if (node.address == Global.CoreMultipleLoadConfigFileName)
var singboxConfig = JsonUtils.Deserialize<SingboxConfig>(txtFile);
if (singboxConfig == null)
{ {
//msg = ResUI.FailedConversionConfiguration; var txtFile = File.ReadAllText(addressFileName);
//return -1; var singboxConfig = JsonUtils.Deserialize<SingboxConfig>(txtFile);
File.Copy(addressFileName, fileName); if (singboxConfig == null)
{
File.Copy(addressFileName, fileName);
}
else
{
GenInbounds(singboxConfig);
GenExperimental(singboxConfig);
JsonUtils.ToFile(singboxConfig, fileName, false);
}
} }
else else
{ {
GenInbounds(singboxConfig); File.Copy(addressFileName, fileName);
GenExperimental(singboxConfig);
JsonUtils.ToFile(singboxConfig, fileName, false);
} }
//check again //check again