A lightweight library for creating HTTP and WebSocket proxies in ASP.NET Core applications with minimal configuration.
AspNetCore.Proxy is a library for ASP.NET Core that enables developers to easily create HTTP and WebSocket proxies within their applications. It solves the problem of forwarding client requests to external servers, such as APIs or services, without requiring complex manual HTTP client management. The library provides a streamlined API for setting up proxies globally, per-route, or in existing controllers.
ASP.NET Core developers building applications that need to forward requests to external APIs, implement reverse proxies, create API gateways, or handle WebSocket proxying.
Developers choose AspNetCore.Proxy because it reduces boilerplate code for proxying, offers a fluent and intuitive API, and provides extensive customization options like interceptors and failure handling. It integrates seamlessly with ASP.NET Core's middleware and routing systems.
ASP.NET Core Proxies made easy.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports both HTTP/HTTPS and WebSocket connections with dedicated methods like UseHttp and UseWs, making it versatile for API gateways and real-time communication.
Allows endpoints to be computed at runtime based on request context or route parameters, enabling conditional forwarding as shown in examples with if statements.
Provides interceptors for requests and responses, custom header modification, and failure handling via options builders, offering fine-grained control over proxy behavior.
Integrates directly into ASP.NET Core's middleware pipeline and endpoint routing, allowing setup in Configure methods or existing controllers with minimal boilerplate.
The README explicitly warns that controllers cannot consume request bodies (e.g., with [FromBody] parameters) when proxying, which restricts certain use cases and requires workarounds.
Lacks out-of-the-box support for load balancing, retries, or circuit breakers, forcing developers to implement these manually for production-ready proxies.
Requires manual configuration of buffer sizes and data interception for WebSocket connections, which can add complexity and potential performance overhead in high-traffic scenarios.