using FastGithub.HttpServer.Certs;
using FastGithub.HttpServer.Certs.CaCertInstallers;
using FastGithub.HttpServer.HttpMiddlewares;
using FastGithub.HttpServer.TcpMiddlewares;
using FastGithub.HttpServer.TlsMiddlewares;
using Microsoft.Extensions.DependencyInjection;
namespace FastGithub
{
///
/// http反向代理的服务注册扩展
///
public static class ServiceCollectionExtensions
{
///
/// 添加http反向代理
///
///
///
public static IServiceCollection AddReverseProxy(this IServiceCollection services)
{
return services
.AddMemoryCache()
.AddHttpForwarder()
.AddSingleton()
.AddSingleton()
.AddSingleton()
.AddSingleton()
.AddSingleton()
// tcp
.AddSingleton()
.AddSingleton()
// tls
.AddSingleton()
.AddSingleton()
// http
.AddSingleton()
.AddSingleton()
.AddSingleton();
}
}
}