mirror of https://github.com/2dust/v2rayN
load core async, remove Ssl3
parent
bfdc0a2e77
commit
731db2541d
|
@ -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;
|
||||||
|
@ -463,7 +464,7 @@ namespace v2rayN.Forms
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 载入V2ray
|
/// 载入V2ray
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void LoadV2ray()
|
async Task LoadV2ray()
|
||||||
{
|
{
|
||||||
tsbReload.Enabled = false;
|
tsbReload.Enabled = false;
|
||||||
|
|
||||||
|
@ -471,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();
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue