pull/4802/head
2dust 2024-03-07 09:06:35 +08:00
parent 315b51e7ca
commit 028c9ea0b5
2 changed files with 7 additions and 7 deletions

View File

@ -368,7 +368,7 @@ namespace v2rayN
try try
{ {
Uri uri = new(url); Uri uri = new(url);
if (uri.Host == uri.IdnHost) if (uri.Host == uri.IdnHost || uri.Host == $"[{uri.IdnHost}]")
{ {
return url; return url;
} }

View File

@ -1466,7 +1466,7 @@ namespace v2rayN.ViewModels
_noticeHandler?.SendMessage(msg); _noticeHandler?.SendMessage(msg);
if (success) if (success)
{ {
CloseV2ray(); CloseCore();
string fileName = Utile.GetTempPath(Utile.GetDownloadFileName(msg)); string fileName = Utile.GetTempPath(Utile.GetDownloadFileName(msg));
string toPath = Utile.GetBinPath("", type.ToString()); string toPath = Utile.GetBinPath("", type.ToString());
@ -1495,13 +1495,13 @@ namespace v2rayN.ViewModels
#endregion CheckUpdate #endregion CheckUpdate
#region v2ray job #region core job
public void Reload() public void Reload()
{ {
BlReloadEnabled = false; BlReloadEnabled = false;
LoadV2ray().ContinueWith(task => LoadCore().ContinueWith(task =>
{ {
TestServerAvailability(); TestServerAvailability();
@ -1512,7 +1512,7 @@ namespace v2rayN.ViewModels
}); });
} }
private async Task LoadV2ray() private async Task LoadCore()
{ {
await Task.Run(() => await Task.Run(() =>
{ {
@ -1524,7 +1524,7 @@ namespace v2rayN.ViewModels
}); });
} }
private void CloseV2ray() private void CloseCore()
{ {
ConfigHandler.SaveConfig(_config, false); ConfigHandler.SaveConfig(_config, false);
@ -1533,7 +1533,7 @@ namespace v2rayN.ViewModels
_coreHandler.CoreStop(); _coreHandler.CoreStop();
} }
#endregion v2ray job #endregion core job
#region System proxy and Routings #region System proxy and Routings