From 9531e7c8f87dbd020aeba5f096ea731d8348fb5d Mon Sep 17 00:00:00 2001 From: ukuq Date: Tue, 2 Mar 2021 20:49:53 +0800 Subject: [PATCH] Add support: custom outbound --- v2rayN/v2rayN/Tool/Utils.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/v2rayN/v2rayN/Tool/Utils.cs b/v2rayN/v2rayN/Tool/Utils.cs index 1e1e9444..7b9e79ce 100644 --- a/v2rayN/v2rayN/Tool/Utils.cs +++ b/v2rayN/v2rayN/Tool/Utils.cs @@ -40,6 +40,12 @@ namespace v2rayN try { + //支持自定义文件覆盖默认配置 + string path = GetPath(res); + if (File.Exists(path)) + { + return LoadResource(path); + } Assembly assembly = Assembly.GetExecutingAssembly(); using (Stream stream = assembly.GetManifestResourceStream(res)) using (StreamReader reader = new StreamReader(stream)) @@ -171,6 +177,7 @@ namespace v2rayN /// public static string List2String(List lst, bool wrap = false) { + if (lst == null) return string.Empty; try { if (wrap)