Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Jan 13, 2024
1 parent ee2a61b commit 726d9d4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion v2rayN/v2rayN/Common/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,6 @@ public static void SetAutoRun(string AutoRunRegPath, string AutoRunName, bool ru
}
}


/// <summary>
/// 获取启动了应用程序的可执行文件的路径
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion v2rayN/v2rayN/Handler/ConfigHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ private static void ToJsonFile(Config config)

public static int ImportOldGuiConfig(Config config, string fileName)
{
string result = Utils.LoadResource(fileName);
var result = Utils.LoadResource(fileName);
if (Utils.IsNullOrEmpty(result))
{
return -1;
Expand Down
4 changes: 2 additions & 2 deletions v2rayN/v2rayN/Handler/CoreConfigV2ray.cs
Original file line number Diff line number Diff line change
Expand Up @@ -721,11 +721,11 @@ private int GenDns(V2rayConfig v2rayConfig)
outbound.settings.userLevel = 0;
}

var obj = JsonUtils.ParseJson(normalDNS) ?? new JObject();
var obj = JsonUtils.ParseJson(normalDNS) ?? [];

if (!obj.ContainsKey("servers"))
{
List<string> servers = new();
List<string> servers = [];
string[] arrDNS = normalDNS.Split(',');
foreach (string str in arrDNS)
{
Expand Down

0 comments on commit 726d9d4

Please sign in to comment.