From 9d7eca9700b55cb76c0d8336423ff2f2d589bd05 Mon Sep 17 00:00:00 2001 From: yige Date: Sun, 1 Sep 2019 01:44:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AF=B9XP=E7=9A=84=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 ++++-- setup/Program.cs | 11 ++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 250329d..632850f 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,8 @@ curl -O https://y-bi.top/setup.sh && sudo chmod +x setup.sh && sudo ./setup.sh ### Windows -Windows 7+ download setup file: [https://y-bi.top/setup.exe](https://y-bi.top/setup.exe) +Download setup file: [https://y-bi.top/setup.exe](https://y-bi.top/setup.exe) -Minimum system support for Windows 7 or Windows Server 2008 R2, Require .NET Framework 4.0 and Transport Layer Security (TLS) 1.2, windows 7 and Windows Server 2008 R2 enable Transport Layer Security (TLS) 1.2 [https://github.com/TheLevelUp/pos-tls-patcher](https://github.com/TheLevelUp/pos-tls-patcher). +Minimum system support for Windows XP, Require .NET Framework 4.0. + +For security, it is recommended to open tls1.2, enable Transport Layer Security (TLS) 1.2 [https://github.com/TheLevelUp/pos-tls-patcher](https://github.com/TheLevelUp/pos-tls-patcher). diff --git a/setup/Program.cs b/setup/Program.cs index 2af5882..3e1bc8c 100644 --- a/setup/Program.cs +++ b/setup/Program.cs @@ -51,7 +51,10 @@ namespace setup bool is64 = IsWin64(cur); string result = ""; string arch = is64 ? "amd64" : "386"; - string url = "http://server-0.sercretcore.cn/api/download?arch=" + arch + "&platform=windows"; + string schema = "https://"; + if (systemVersion < 6.3) schema = "http://"; + string url = schema + "server-0.sercretcore.cn/api/download?arch=" + arch + "&platform=windows"; + Stream stream; try { @@ -279,9 +282,9 @@ namespace setup static void Main(string[] args) { - if (systemVersion < 6.1) + if (systemVersion < 5.1) { - Console.WriteLine("Minimum system support for Windows 7 or Windows Server 2008 R2."); + Console.WriteLine("Minimum system support for Windows XP."); Console.ReadLine(); Environment.Exit(0); } @@ -368,6 +371,8 @@ SOFTWARE."); Mkdir("C:\\WINDOWS\\dc-agent"); Mkdir("C:\\WINDOWS\\dc-agent\\log"); Mkdir("C:\\WINDOWS\\dc-agent\\bin"); + + if (systemVersion < 6.3) downloadURL = downloadURL.Replace("https:", "http:"); DownLoadOneFile(downloadURL, "C:\\WINDOWS\\dc-agent\\bin\\dc-agent.exe");