Reothor.Lab.TinyProxy
1.9.0
dotnet tool install --global Reothor.Lab.TinyProxy --version 1.9.0
dotnet new tool-manifest # if you are setting up this repo 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/weatherforecast
due to thePrefix
property.
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. |
This package has no dependencies.
Version | Downloads | Last updated |
---|---|---|
1.9.0 | 466 | 3/31/2022 |
1.8.91 | 409 | 3/25/2022 |
1.8.9 | 438 | 3/25/2022 |
1.8.8 | 419 | 3/25/2022 |
1.8.6 | 429 | 3/25/2022 |
1.8.5 | 386 | 3/25/2022 |
1.8.4 | 421 | 3/25/2022 |
1.8.3 | 390 | 3/24/2022 |
1.8.2 | 429 | 3/24/2022 |
1.8.1 | 420 | 3/24/2022 |
1.8.0 | 389 | 3/24/2022 |
1.7.1 | 372 | 3/23/2022 |
1.7.0 | 439 | 3/22/2022 |
1.6.9 | 400 | 3/21/2022 |
1.6.8 | 378 | 3/20/2022 |
1.6.7 | 394 | 3/20/2022 |
1.6.6 | 392 | 3/20/2022 |
1.6.5 | 391 | 3/11/2022 |
1.6.4 | 463 | 3/3/2022 |
1.6.3 | 408 | 3/3/2022 |
1.6.2 | 405 | 3/2/2022 |
1.6.1 | 378 | 3/2/2022 |
1.6.0 | 411 | 3/2/2022 |
1.5.5 | 413 | 3/2/2022 |
1.5.4 | 383 | 3/2/2022 |
1.5.3 | 436 | 3/1/2022 |
1.5.2 | 406 | 3/1/2022 |
1.5.1 | 400 | 3/1/2022 |
1.5.0 | 413 | 3/1/2022 |
1.4.0 | 420 | 3/1/2022 |
1.3.1 | 395 | 2/26/2022 |
1.3.0 | 405 | 2/26/2022 |
1.2.4 | 404 | 2/26/2022 |
1.2.2 | 409 | 2/26/2022 |
1.2.1 | 383 | 2/26/2022 |
1.2.0 | 430 | 2/26/2022 |
1.1.0 | 410 | 2/26/2022 |