Reothor.Lab.TinyProxy
1.9.0
dotnet tool install --global Reothor.Lab.TinyProxy --version 1.9.0
dotnet new tool-manifest
dotnet tool install --local Reothor.Lab.TinyProxy --version 1.9.0
#tool dotnet:?package=Reothor.Lab.TinyProxy&version=1.9.0
nuke :add-package Reothor.Lab.TinyProxy --version 1.9.0
TinyProxy
This project was born out of a need for a better local developer experience (IMHO) and thus the limitations of this proxy is local.
TinyProxy will only bind to localhost - it is meant as a local development proxy.
Installation
Dotnet Tool
Simply run dotnet tool install --global Reothor.Lab.TinyProxy
Usage can be found by executing dotnet tinyproxy --help.
USAGE:
TinyProxy.dll [OPTIONS] <COMMAND>
OPTIONS:
-h, --help Prints help information
-v, --version Prints version information
COMMANDS:
start
config
Docker
Usage information:
docker run frodehus/tinyproxy:latest --help
Quickstart:
docker run -it -v /<path>/proxyconfig.json:/config.json -p 8080:80 -p 8443:443 frodehus/tinyproxy:latest start -f /config.json
Run the proxy
Create a config file (see below) and run dotnet TinyProxy start -f <configfile>.
If <configfile> is omitted, it will default to {APPDATA}/tinyproxyconfig.json.
If you want to use the web UI - run dotnet TinyProxy start -u
Configuration
Quick start
Getting started with your first upstream server:
dotnet tinyproxy config add server MyServer https://example.com
This will create an empty config file under $HOME/.config/tinyproxyconfig.json (can be overriden by using the -f <config_file> option).
Manual config
Create a config file such as proxy_dev.json:
{
"UpstreamServers": [
{
"Name": "MyDevAPI",
"Url": "http://localhost:5100",
"SwaggerEndpoint": "swagger/v1/swagger.json"
},
{
"Name": "MyDevAPI2",
"Url": "http://localhost:5200",
"Preferred": true,
"SwaggerEndpoint": "swagger/v1/swagger.json"
},
{
"Name": "RemoteNonSwagger",
"Url": "https://api.wishthisexisted.dev",
"Prefix": "/weather"
"Routes": [
{
"RelativePath": "/weatherforecast",
"HttpMethods": [
"GET",
]
}
]
}
]
}
This will proxy 3 servers where:
- MyDevAPI2 is preferred so any routes that are duplicates between services will be overriden by this one
- RemoteNonSwagger has no Swagger definition available, so we define static routes for this. Available at
/weather/weatherforecastdue to thePrefixproperty.
Metrics
TinyProxy has a Prometheus-enabled endpoint which provides insights into which remote server and endpoint are receiving proxied requests.
This metric is available at /metrics.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.9.0 | 695 | 3/31/2022 |
| 1.8.91 | 579 | 3/25/2022 |
| 1.8.9 | 624 | 3/25/2022 |
| 1.8.8 | 616 | 3/25/2022 |
| 1.8.6 | 615 | 3/25/2022 |
| 1.8.5 | 564 | 3/25/2022 |
| 1.8.4 | 599 | 3/25/2022 |
| 1.8.3 | 572 | 3/24/2022 |
| 1.8.2 | 608 | 3/24/2022 |
| 1.8.1 | 599 | 3/24/2022 |
| 1.8.0 | 568 | 3/24/2022 |
| 1.7.1 | 568 | 3/23/2022 |
| 1.7.0 | 623 | 3/22/2022 |
| 1.6.9 | 584 | 3/21/2022 |
| 1.6.8 | 577 | 3/20/2022 |
| 1.6.7 | 578 | 3/20/2022 |
| 1.6.6 | 569 | 3/20/2022 |
| 1.6.5 | 576 | 3/11/2022 |
| 1.6.4 | 647 | 3/3/2022 |
| 1.6.3 | 585 | 3/3/2022 |