调整监听顺序

This commit is contained in:
xljiulang 2021-08-19 20:29:17 +08:00
parent 66d8dce567
commit cdcaaf28e4
3 changed files with 7 additions and 4 deletions

View File

@ -85,7 +85,7 @@ namespace FastGithub.ReverseProxy
this.logger.LogWarning($"不支持自动安装证书{this.CaCerFilePath}请根据你的系统平台手工安装和信任CA证书"); this.logger.LogWarning($"不支持自动安装证书{this.CaCerFilePath}请根据你的系统平台手工安装和信任CA证书");
} }
GitUtil.SetSslverify(false); GitUtil.ConfigSslverify(false);
} }
/// <summary> /// <summary>

View File

@ -12,7 +12,8 @@ namespace FastGithub.ReverseProxy
/// 设置ssl验证 /// 设置ssl验证
/// </summary> /// </summary>
/// <param name="value">是否验证</param> /// <param name="value">是否验证</param>
public static void SetSslverify(bool value) /// <returns></returns>
public static bool ConfigSslverify(bool value)
{ {
try try
{ {
@ -24,9 +25,11 @@ namespace FastGithub.ReverseProxy
CreateNoWindow = true, CreateNoWindow = true,
WindowStyle = ProcessWindowStyle.Hidden WindowStyle = ProcessWindowStyle.Hidden
}); });
return true;
} }
catch (Exception) catch (Exception)
{ {
return false;
} }
} }
} }

View File

@ -51,9 +51,9 @@ namespace FastGithub
webBuilder.UseKestrel(kestrel => webBuilder.UseKestrel(kestrel =>
{ {
kestrel.Limits.MaxRequestBodySize = null; kestrel.Limits.MaxRequestBodySize = null;
kestrel.ListenGithubSshProxy();
kestrel.ListenHttpReverseProxy();
kestrel.ListenHttpsReverseProxy(); kestrel.ListenHttpsReverseProxy();
kestrel.ListenHttpReverseProxy();
kestrel.ListenGithubSshProxy();
}); });
}); });
} }