mirror of https://github.com/2dust/v2rayN
bug fixes
parent
92baf9025a
commit
6b12549cd9
|
@ -463,9 +463,9 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
if (lstProfile.Count > 0)
|
if (lstProfile.Count > 0)
|
||||||
{
|
{
|
||||||
return SetDefaultServerIndex(ref config, lstProfile[0].indexId);
|
return SetDefaultServerIndex(ref config, lstProfile.Where(t => t.port > 0).FirstOrDefault()?.indexId);
|
||||||
}
|
}
|
||||||
return SetDefaultServerIndex(ref config, SqliteHelper.Instance.Table<ProfileItem>().Select(t => t.indexId).FirstOrDefault());
|
return SetDefaultServerIndex(ref config, SqliteHelper.Instance.Table<ProfileItem>().Where(t => t.port > 0).Select(t => t.indexId).FirstOrDefault());
|
||||||
}
|
}
|
||||||
public static ProfileItem? GetDefaultServer(ref Config config)
|
public static ProfileItem? GetDefaultServer(ref Config config)
|
||||||
{
|
{
|
||||||
|
@ -1017,7 +1017,7 @@ namespace v2rayN.Handler
|
||||||
addStatus = AddVlessServer(ref config, profileItem, false);
|
addStatus = AddVlessServer(ref config, profileItem, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (addStatus == 0)
|
if (addStatus == 0 && profileItem.port > 0)
|
||||||
{
|
{
|
||||||
countServers++;
|
countServers++;
|
||||||
lstAdd.Add(profileItem);
|
lstAdd.Add(profileItem);
|
||||||
|
|
|
@ -910,7 +910,8 @@ namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (node == null)
|
if (node == null
|
||||||
|
|| node.port <= 0)
|
||||||
{
|
{
|
||||||
msg = ResUI.CheckServerSettings;
|
msg = ResUI.CheckServerSettings;
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
public sealed class MainFormHandler
|
public sealed class MainFormHandler
|
||||||
{
|
{
|
||||||
private static readonly Lazy<MainFormHandler> instance = new(() => new());
|
private static readonly Lazy<MainFormHandler> instance = new(() => new());
|
||||||
public static MainFormHandler Instance => instance.Value;
|
public static MainFormHandler Instance => instance.Value;
|
||||||
|
|
||||||
public Icon GetNotifyIcon(Config config)
|
public Icon GetNotifyIcon(Config config)
|
||||||
|
|
Loading…
Reference in New Issue