diff --git a/v2rayN/ServiceLib/Common/Utils.cs b/v2rayN/ServiceLib/Common/Utils.cs index 3907b1a7..ac1a18c4 100644 --- a/v2rayN/ServiceLib/Common/Utils.cs +++ b/v2rayN/ServiceLib/Common/Utils.cs @@ -1093,6 +1093,24 @@ public class Utils } } + public static string GetOptCorePath(string filename = "") + { + var tempPath = Path.Combine("/opt/v2rayn-core"); + if (!Directory.Exists(tempPath)) + { + Directory.CreateDirectory(tempPath); + } + + if (filename.IsNullOrEmpty()) + { + return tempPath; + } + else + { + return Path.Combine(tempPath, filename); + } + } + #endregion TempPath #region Platform