Add support: custom outbound

This commit is contained in:
ukuq 2021-03-02 20:49:53 +08:00
parent b30191feb2
commit 9531e7c8f8

View file

@ -40,6 +40,12 @@ namespace v2rayN
try try
{ {
//支持自定义文件覆盖默认配置
string path = GetPath(res);
if (File.Exists(path))
{
return LoadResource(path);
}
Assembly assembly = Assembly.GetExecutingAssembly(); Assembly assembly = Assembly.GetExecutingAssembly();
using (Stream stream = assembly.GetManifestResourceStream(res)) using (Stream stream = assembly.GetManifestResourceStream(res))
using (StreamReader reader = new StreamReader(stream)) using (StreamReader reader = new StreamReader(stream))
@ -171,6 +177,7 @@ namespace v2rayN
/// <returns></returns> /// <returns></returns>
public static string List2String(List<string> lst, bool wrap = false) public static string List2String(List<string> lst, bool wrap = false)
{ {
if (lst == null) return string.Empty;
try try
{ {
if (wrap) if (wrap)