From cdcaaf28e4ccf9f6e71dc0672be2087895ec830f Mon Sep 17 00:00:00 2001 From: xljiulang <366193849@qq.com> Date: Thu, 19 Aug 2021 20:29:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=9B=91=E5=90=AC=E9=A1=BA?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FastGithub.ReverseProxy/CertService.cs | 2 +- FastGithub.ReverseProxy/GitUtil.cs | 5 ++++- FastGithub/Program.cs | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/FastGithub.ReverseProxy/CertService.cs b/FastGithub.ReverseProxy/CertService.cs index 4422265..d92d84a 100644 --- a/FastGithub.ReverseProxy/CertService.cs +++ b/FastGithub.ReverseProxy/CertService.cs @@ -85,7 +85,7 @@ namespace FastGithub.ReverseProxy this.logger.LogWarning($"不支持自动安装证书{this.CaCerFilePath}:请根据你的系统平台手工安装和信任CA证书"); } - GitUtil.SetSslverify(false); + GitUtil.ConfigSslverify(false); } /// diff --git a/FastGithub.ReverseProxy/GitUtil.cs b/FastGithub.ReverseProxy/GitUtil.cs index 10e4525..63d8076 100644 --- a/FastGithub.ReverseProxy/GitUtil.cs +++ b/FastGithub.ReverseProxy/GitUtil.cs @@ -12,7 +12,8 @@ namespace FastGithub.ReverseProxy /// 设置ssl验证 /// /// 是否验证 - public static void SetSslverify(bool value) + /// + public static bool ConfigSslverify(bool value) { try { @@ -24,9 +25,11 @@ namespace FastGithub.ReverseProxy CreateNoWindow = true, WindowStyle = ProcessWindowStyle.Hidden }); + return true; } catch (Exception) { + return false; } } } diff --git a/FastGithub/Program.cs b/FastGithub/Program.cs index e072fa6..26449db 100644 --- a/FastGithub/Program.cs +++ b/FastGithub/Program.cs @@ -51,9 +51,9 @@ namespace FastGithub webBuilder.UseKestrel(kestrel => { kestrel.Limits.MaxRequestBodySize = null; - kestrel.ListenGithubSshProxy(); - kestrel.ListenHttpReverseProxy(); kestrel.ListenHttpsReverseProxy(); + kestrel.ListenHttpReverseProxy(); + kestrel.ListenGithubSshProxy(); }); }); }