mirror of
https://github.com/2dust/v2rayN.git
synced 2026-10-28 08:04:58 +03:00
Add preprocess of yaml file
https://github.com/2dust/v2rayN/issues/5646
This commit is contained in:
@@ -64,6 +64,12 @@
|
||||
var txtFile = File.ReadAllText(addressFileName);
|
||||
txtFile = txtFile.Replace(tagYamlStr1, tagYamlStr2);
|
||||
|
||||
//YAML anchors
|
||||
if (txtFile.Contains("<<:") && txtFile.Contains("*") && txtFile.Contains("&"))
|
||||
{
|
||||
txtFile = YamlUtils.PreprocessYaml(txtFile);
|
||||
}
|
||||
|
||||
var fileContent = YamlUtils.FromYaml<Dictionary<string, object>>(txtFile);
|
||||
if (fileContent == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user