Skip to content

Commit

Permalink
Fix configuration params description
Browse files Browse the repository at this point in the history
  • Loading branch information
mgerasimchuk committed Nov 12, 2023
1 parent fd7e59a commit 1b3b041
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions internal/infrastructure/config/start_command_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down

0 comments on commit 1b3b041

Please sign in to comment.