Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
887dd8da3b | ||
|
|
731db2541d | ||
|
|
bfdc0a2e77 |
@@ -5,6 +5,7 @@ using System.Diagnostics;
|
|||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using v2rayN.Base;
|
using v2rayN.Base;
|
||||||
using v2rayN.Handler;
|
using v2rayN.Handler;
|
||||||
@@ -131,6 +132,7 @@ namespace v2rayN.Forms
|
|||||||
SysProxyHandle.UpdateSysProxy(config, true);
|
SysProxyHandle.UpdateSysProxy(config, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StorageUI();
|
||||||
ConfigHandler.SaveConfig(ref config);
|
ConfigHandler.SaveConfig(ref config);
|
||||||
statistics?.SaveToFile();
|
statistics?.SaveToFile();
|
||||||
statistics?.Close();
|
statistics?.Close();
|
||||||
@@ -170,7 +172,7 @@ namespace v2rayN.Forms
|
|||||||
switch (Utils.ToInt(e.Name))
|
switch (Utils.ToInt(e.Name))
|
||||||
{
|
{
|
||||||
case (int)EGlobalHotkey.ShowForm:
|
case (int)EGlobalHotkey.ShowForm:
|
||||||
ShowForm();
|
if (this.ShowInTaskbar) HideForm(); else ShowForm();
|
||||||
break;
|
break;
|
||||||
case (int)EGlobalHotkey.SystemProxyClear:
|
case (int)EGlobalHotkey.SystemProxyClear:
|
||||||
SetListenerType(ESysProxyType.ForcedClear);
|
SetListenerType(ESysProxyType.ForcedClear);
|
||||||
@@ -462,7 +464,7 @@ namespace v2rayN.Forms
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 载入V2ray
|
/// 载入V2ray
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void LoadV2ray()
|
async Task LoadV2ray()
|
||||||
{
|
{
|
||||||
tsbReload.Enabled = false;
|
tsbReload.Enabled = false;
|
||||||
|
|
||||||
@@ -470,7 +472,11 @@ namespace v2rayN.Forms
|
|||||||
{
|
{
|
||||||
ClearMsg();
|
ClearMsg();
|
||||||
}
|
}
|
||||||
v2rayHandler.LoadV2ray(config);
|
await Task.Run(() =>
|
||||||
|
{
|
||||||
|
v2rayHandler.LoadV2ray(config);
|
||||||
|
});
|
||||||
|
|
||||||
Global.reloadV2ray = false;
|
Global.reloadV2ray = false;
|
||||||
ConfigHandler.SaveConfig(ref config, false);
|
ConfigHandler.SaveConfig(ref config, false);
|
||||||
statistics?.SaveToFile();
|
statistics?.SaveToFile();
|
||||||
@@ -834,6 +840,7 @@ namespace v2rayN.Forms
|
|||||||
|
|
||||||
private void tsbClose_Click(object sender, EventArgs e)
|
private void tsbClose_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
StorageUI();
|
||||||
HideForm();
|
HideForm();
|
||||||
//this.WindowState = FormWindowState.Minimized;
|
//this.WindowState = FormWindowState.Minimized;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,4 +32,4 @@ using System.Runtime.InteropServices;
|
|||||||
// 方法是按如下所示使用“*”:
|
// 方法是按如下所示使用“*”:
|
||||||
//[assembly: AssemblyVersion("1.0.*")]
|
//[assembly: AssemblyVersion("1.0.*")]
|
||||||
//[assembly: AssemblyVersion("1.0.0")]
|
//[assembly: AssemblyVersion("1.0.0")]
|
||||||
[assembly: AssemblyFileVersion("4.35")]
|
[assembly: AssemblyFileVersion("4.36")]
|
||||||
|
|||||||
@@ -719,16 +719,14 @@ namespace v2rayN
|
|||||||
{
|
{
|
||||||
if (enableSecurityProtocolTls13)
|
if (enableSecurityProtocolTls13)
|
||||||
{
|
{
|
||||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3
|
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
|
||||||
| SecurityProtocolType.Tls
|
|
||||||
| SecurityProtocolType.Tls11
|
| SecurityProtocolType.Tls11
|
||||||
| SecurityProtocolType.Tls12
|
| SecurityProtocolType.Tls12
|
||||||
| SecurityProtocolType.Tls13;
|
| SecurityProtocolType.Tls13;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3
|
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
|
||||||
| SecurityProtocolType.Tls
|
|
||||||
| SecurityProtocolType.Tls11
|
| SecurityProtocolType.Tls11
|
||||||
| SecurityProtocolType.Tls12;
|
| SecurityProtocolType.Tls12;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user