mirror of
https://github.com/2dust/v2rayN.git
synced 2025-05-03 05:38:51 +00:00
add multiple program auto run
This commit is contained in:
parent
e256ec5401
commit
3575291119
1 changed files with 22 additions and 1 deletions
|
@ -23,6 +23,7 @@ using Newtonsoft.Json.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using log4net;
|
using log4net;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Security.Cryptography;
|
||||||
|
|
||||||
namespace v2rayN
|
namespace v2rayN
|
||||||
{
|
{
|
||||||
|
@ -397,6 +398,20 @@ namespace v2rayN
|
||||||
{
|
{
|
||||||
return HttpUtility.UrlDecode(url);
|
return HttpUtility.UrlDecode(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string GetMD5(string str)
|
||||||
|
{
|
||||||
|
var md5 = MD5.Create();
|
||||||
|
byte[] byteOld = Encoding.UTF8.GetBytes(str);
|
||||||
|
byte[] byteNew = md5.ComputeHash(byteOld);
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
foreach (byte b in byteNew)
|
||||||
|
{
|
||||||
|
sb.Append(b.ToString("x2"));
|
||||||
|
}
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
@ -529,7 +544,13 @@ namespace v2rayN
|
||||||
|
|
||||||
#region 开机自动启动
|
#region 开机自动启动
|
||||||
|
|
||||||
private static string autoRunName = "v2rayNAutoRun";
|
private static string autoRunName
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return $"v2rayNAutoRun_{GetMD5(StartupPath())}";
|
||||||
|
}
|
||||||
|
}
|
||||||
private static string autoRunRegPath
|
private static string autoRunRegPath
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
Loading…
Reference in a new issue