From 643a91a0913728a77206845a56bfb142e79e1397 Mon Sep 17 00:00:00 2001 From: lslqtz Date: Sun, 17 Oct 2021 21:17:43 +0800 Subject: [PATCH] bug fix/support tlsv1.3 --- osu-download/Program.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/osu-download/Program.cs b/osu-download/Program.cs index eb709a8..0490264 100644 --- a/osu-download/Program.cs +++ b/osu-download/Program.cs @@ -15,7 +15,7 @@ class Program { static string Author = "asd"; static string ProgramTitle = "osu! 镜像下载客户端"; - static string CurDLClientVer = "b20200626.1"; + static string CurDLClientVer = "b20211017.1"; static string ServerURL = "https://mirror.osu.pink/osu-update.php"; static string DefaultUserAgent = string.Format("osu-download/{0}", CurDLClientVer); static bool isUnix = System.Environment.OSVersion.ToString().ToLower().Contains("unix"); @@ -181,7 +181,13 @@ static void Main(string[] args) default: goto recheck; } - ServicePointManager.SecurityProtocol = (SecurityProtocolType)192 | (SecurityProtocolType)768 | (SecurityProtocolType)3072; + ServicePointManager.SecurityProtocol = (SecurityProtocolType)192; + try + { + ServicePointManager.SecurityProtocol |= (SecurityProtocolType)768; + ServicePointManager.SecurityProtocol |= (SecurityProtocolType)3072; + ServicePointManager.SecurityProtocol |= (SecurityProtocolType)12288; + } catch { } try { Console.WriteLine("正在获取 Mirror...");