diff --git a/README.md b/README.md index e8d357b8..8923f916 100644 --- a/README.md +++ b/README.md @@ -147,7 +147,7 @@ docker run --rm --network=container:pia alpine:3.10 wget -qO- https://ipinfo.io | `PORT_FORWARDING` | `off` | Set to `on` to forward a port on PIA server | | `PORT_FORWARDING_STATUS_FILE` | `/forwarded_port` | File path to store the forwarded port number | | `TINYPROXY` | `on` | `on` or `off`, to enable the internal HTTP proxy tinyproxy | -| `TINYPROXY_LOG` | `Info` | `Info`, `Warning`, `Error` or `Critical` | +| `TINYPROXY_LOG` | `Info` | `Info`, `Connect`, `Notice`, `Warning`, `Error` or `Critical` | | `TINYPROXY_PORT` | `8888` | `1024` to `65535` internal port for HTTP proxy | | `TINYPROXY_USER` | | Username to use to connect to the HTTP proxy | | `TINYPROXY_PASSWORD` | | Passsword to use to connect to the HTTP proxy | diff --git a/internal/constants/tinyproxy.go b/internal/constants/tinyproxy.go index 90cd7100..732f7714 100644 --- a/internal/constants/tinyproxy.go +++ b/internal/constants/tinyproxy.go @@ -7,6 +7,10 @@ import ( const ( // TinyProxyInfoLevel is the info log level for TinyProxy TinyProxyInfoLevel models.TinyProxyLogLevel = "Info" + // TinyProxyConnectLevel is the info log level for TinyProxy + TinyProxyConnectLevel models.TinyProxyLogLevel = "Connect" + // TinyProxyNoticeLevel is the info log level for TinyProxy + TinyProxyNoticeLevel models.TinyProxyLogLevel = "Notice" // TinyProxyWarnLevel is the warning log level for TinyProxy TinyProxyWarnLevel models.TinyProxyLogLevel = "Warning" // TinyProxyErrorLevel is the error log level for TinyProxy diff --git a/internal/params/tinyproxy.go b/internal/params/tinyproxy.go index 29984c74..f98e4f2b 100644 --- a/internal/params/tinyproxy.go +++ b/internal/params/tinyproxy.go @@ -30,10 +30,10 @@ func (p *paramsReader) GetTinyProxyLog() (models.TinyProxyLogLevel, error) { return models.TinyProxyLogLevel(s), err } else if len(s) != 0 { p.logger.Warn("You are using the old environment variable PROXY_LOG_LEVEL, please consider changing it to TINYPROXY_LOG") - s, err = p.envParams.GetValueIfInside("PROXY_LOG_LEVEL", []string{"info", "warning", "error", "critical"}, libparams.Compulsory()) + s, err = p.envParams.GetValueIfInside("PROXY_LOG_LEVEL", []string{"Info", "Connect", "Notice", "Warning", "Error", "Critical"}, libparams.Compulsory()) return models.TinyProxyLogLevel(s), err } - s, err = p.envParams.GetValueIfInside("TINYPROXY_LOG", []string{"Info", "Warning", "Error", "Critical"}, libparams.Default("info")) + s, err = p.envParams.GetValueIfInside("TINYPROXY_LOG", []string{"Info", "Connect", "Notice", "Warning", "Error", "Critical"}, libparams.Default("Connect")) return models.TinyProxyLogLevel(s), err }