From 1b3b04138d1bd43b9300c74627e8c0ff27712265 Mon Sep 17 00:00:00 2001 From: Mikhail Gerasimchuk Date: Sun, 12 Nov 2023 18:41:42 +0700 Subject: [PATCH] Fix configuration params description --- README.md | 10 +++++----- internal/infrastructure/config/start_command_config.go | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c18f91c..54d09d1 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ These capabilities make Protty a useful tool for a variety of purposes, such as The following command will start a proxy on port 8080, and after starting, all traffic from port 8080 will be redirected to a remote host located at https://example.com ```shell -docker run -p8080:80 -e REMOTE_URI=https://example.com:443 mgerasimchuk/protty:v0.4.4 +docker run -p8080:80 -e REMOTE_URI=https://example.com:443 mgerasimchuk/protty:v0.4.5 ``` ## Supported Backends @@ -39,7 +39,7 @@ docker run -p8080:80 -e REMOTE_URI=https://example.com:443 mgerasimchuk/protty:v ## Running options and runtime configuration ``` -» ~ docker run -p8080:80 -it mgerasimchuk/protty:v0.4.4 /bin/sh -c 'protty start --help' +» ~ docker run -p8080:80 -it mgerasimchuk/protty:v0.4.5 /bin/sh -c 'protty start --help' Start the proxy Usage: @@ -74,9 +74,9 @@ Examples: protty start --transform-response-body-jq '.[] | .id' Flags: - --log-level string On which host, the throttle rate limit should be applied | Env variable alias: LOG_LEVEL | Request header alias: X-PROTTY-LOG-LEVEL (default "debug") - --local-port int Verbosity level (panic, fatal, error, warn, info, debug, trace) | Env variable alias: LOCAL_PORT | Request header alias: X-PROTTY-LOCAL-PORT (default 80) - --remote-uri string Listening port for the proxy | Env variable alias: REMOTE_URI | Request header alias: X-PROTTY-REMOTE-URI (default "https://example.com:443") + --log-level string Verbosity level (panic, fatal, error, warn, info, debug, trace) | Env variable alias: LOG_LEVEL | Request header alias: X-PROTTY-LOG-LEVEL (default "debug") + --local-port int Listening port for the proxy | Env variable alias: LOCAL_PORT | Request header alias: X-PROTTY-LOCAL-PORT (default 80) + --remote-uri string URI of the remote resource | Env variable alias: REMOTE_URI | Request header alias: X-PROTTY-REMOTE-URI (default "https://example.com:443") --throttle-rate-limit float How many requests can be send to the remote resource per second | Env variable alias: THROTTLE_RATE_LIMIT | Request header alias: X-PROTTY-THROTTLE-RATE-LIMIT --transform-request-url-sed string SED expression for request URL transformation | Env variable alias: TRANSFORM_REQUEST_URL_SED | Request header alias: X-PROTTY-TRANSFORM-REQUEST-URL-SED --additional-request-headers stringArray Array of additional request headers in format Header: Value | Env variable alias: ADDITIONAL_REQUEST_HEADERS | Request header alias: X-PROTTY-ADDITIONAL-REQUEST-HEADERS diff --git a/internal/infrastructure/config/start_command_config.go b/internal/infrastructure/config/start_command_config.go index 9570dd8..13aa8ea 100644 --- a/internal/infrastructure/config/start_command_config.go +++ b/internal/infrastructure/config/start_command_config.go @@ -16,9 +16,9 @@ import ( ) type StartCommandConfig struct { - LogLevel Option[string] `default:"debug" description:"On which host, the throttle rate limit should be applied"` - LocalPort Option[int] `default:"80" description:"Verbosity level (panic, fatal, error, warn, info, debug, trace)"` - RemoteURI Option[string] `default:"https://example.com:443" description:"Listening port for the proxy"` + LogLevel Option[string] `default:"debug" description:"Verbosity level (panic, fatal, error, warn, info, debug, trace)"` + LocalPort Option[int] `default:"80" description:"Listening port for the proxy"` + RemoteURI Option[string] `default:"https://example.com:443" description:"URI of the remote resource"` ThrottleRateLimit Option[float64] `description:"How many requests can be send to the remote resource per second"` TransformRequestUrlSED Option[string] `description:"SED expression for request URL transformation"` AdditionalRequestHeaders Option[[]string] `description:"Array of additional request headers in format Header: Value"`