Fix subscription conversion
This commit is contained in:
@@ -23,6 +23,9 @@
|
|||||||
@"http://127.0.0.1:25500/sub?target=clash&url={0}",
|
@"http://127.0.0.1:25500/sub?target=clash&url={0}",
|
||||||
""
|
""
|
||||||
};
|
};
|
||||||
|
public static readonly List<string> SubConvertConfig = new List<string> {
|
||||||
|
@"https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online.ini"
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ namespace clashN.Handler
|
|||||||
|
|
||||||
var config = LazyConfig.Instance.GetConfig();
|
var config = LazyConfig.Instance.GetConfig();
|
||||||
var txtFile = File.ReadAllText(addressFileName);
|
var txtFile = File.ReadAllText(addressFileName);
|
||||||
txtFile = txtFile.Replace("!<str>", "").Replace("MATCH,,", "MATCH,");
|
txtFile = txtFile.Replace("!<str>", "");
|
||||||
|
|
||||||
var fileContent = Utils.FromYaml<Dictionary<string, object>>(txtFile);
|
var fileContent = Utils.FromYaml<Dictionary<string, object>>(txtFile);
|
||||||
if (fileContent == null)
|
if (fileContent == null)
|
||||||
|
|||||||
@@ -207,6 +207,7 @@ namespace clashN.Handler
|
|||||||
config.constItem.subConvertUrl = Global.SubConvertUrls[0];
|
config.constItem.subConvertUrl = Global.SubConvertUrls[0];
|
||||||
}
|
}
|
||||||
url = String.Format(config.constItem.subConvertUrl, Utils.UrlEncode(url));
|
url = String.Format(config.constItem.subConvertUrl, Utils.UrlEncode(url));
|
||||||
|
url += String.Format("&config={0}", Global.SubConvertConfig[0]);
|
||||||
}
|
}
|
||||||
var downloadHandle = new DownloadHandle();
|
var downloadHandle = new DownloadHandle();
|
||||||
downloadHandle.Error += (sender2, args) =>
|
downloadHandle.Error += (sender2, args) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user