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(); }); }); }