Peppermint is simple and light .NET reverse proxy based on ASP.NET, Kestrel and implement YARP Project by Microsoft (https://github.com/microsoft/reverse-proxy).
Explore the docs »
·
Report Bug
·
Request Feature
Table of Contents
Peppermint Reverse Proxy is a simple implementation of Microsoft Yarp Project (https://microsoft.github.io/reverse-proxy/).
It's a out of a box version of Microsoft Yarp Project library, intergrated into a light asp.net application.
The objective is to propose a yarp reverse proxy without having to go through a development stage and only the configuration of yarp
Multiples platforms are availables :
- Portable (.NET Runtime dependency)
- Win (x86 / x64)
- Linux (x64)
- Mac OS (x64) This a light out of the box reverse-proxy application which can be self hosted with Kestrel Web Server (.NET Web Server) or with a IIS in replacement of ARR (Application Request Routing).
YARP offers :
- HTTP/2 end to end and gPRC capabilties
- Websockets
- HttpSys delegation (integration with Http.Sys and IIS)
- HTTP/3 with .NET 8
- Loadbalancing
- A/B Switches
- Health Checks
- Transformations
- TLS customizations
- Middlewares
- Logging
- Tracing with OpenTelemetry
YARP reverse proxy offers good performances for many workloads but you will loose on heavy workloads without having more resources.
Case | Samples | Average time (ms) | Minimum time (ms) | Max time (ms) | Throughput (HTTP call/sec) | Thread(s) |
---|---|---|---|---|---|---|
StaticWebApp - (direct) | 10000 | 0 | 0 | 4 | 830,77 | 1 |
StaticWebApp - ARR (IIS) | 10000 | 1 | 0 | 4 | 635,93 | 1 |
StaticWebApp -Peppermint Reverse Proxy (Portable) YARP with IIS | 10000 | 1 | 0 | 5 | 627,78 | 1 |
ApiWebApp (direct) | 10000 | 0 | 0 | 4 | 3935,45 | 1 |
ApiWebApp - ARR (IIS) | 10000 | 0 | 0 | 4 | 1590,07 | 1 |
ApiWebApp - PpmintRV Yarp on IIS | 10000 | 0 | 0 | 5 | 1093,37 | 1 |
You have to unzip binairies and configure appsettings.json file
You have to install ASP.NET 6, 7, 8 runtime. In case of using IIS, you have to install it before with ASP.NET 6, 7 Bundle.
- Get latest release
- Configure "appsettings.json" file
{
"AllowedHosts": "*",
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Information",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"Serilog": {
"Using": [ "Serilog.Sinks.File" ],
"MinimumLevel": "Information",
"WriteTo": [
{
"Name": "File",
"Args": {
"path": "proxy-.log",
"rollingInterval": "Day"
}
}
]
},
"ReverseProxy": {
"Routes": {
"route1": {
"ClusterId": "defaultCluster",
"Match": {
"Path": "{**catch-all}"
},
"Transforms": [
{ "PathPrefix": "/" },
{ "RequestHeadersCopy": "true" },
{ "RequestHeaderOriginalHost": "false" }
]
}
},
"Clusters": {
"defaultCluster": {
"Destinations": {
"destination1": {
"Address": "https://api.ipify.org/"
}
},
"HttpClient": {
"DangerousAcceptAnyServerCertificate": "true",
"EnableMultipleHttp2Connections": "true"
}
}
}
}
}
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Alexandre Julien - @alexandrejulien
Project Link: https://github.com/alexandrejulien/Peppermint.ReverseProxy