saucelabs / forwarder

Forwarder is a production-ready, fast MITM proxy with PAC support. It's suitable for debugging, intercepting and manipulating HTTP traffic. It's used as a core component of Sauce Labs Sauce Connect Proxy.
https://forwarder-proxy.io
Mozilla Public License 2.0
200 stars 13 forks source link

docs: extend log-http flag docs and better explain syntax of flags supporting multiple data sources #807

Closed mmatczuk closed 1 month ago

mmatczuk commented 1 month ago

Relevant changes in flags

    --log-http [api|proxy:]<none|short-url|url|headers|body|errors>,...  (default errors) (env FORWARDER_LOG_HTTP)
        HTTP request and response logging mode. 

        Modes: 
        - none: no logging
        - short-url: logs [scheme://]host[/path] instead of the full URL
        - url: logs the full URL including query parameters
        - headers: logs request line and headers
        - body: logs request line, headers, and body
        - errors: logs request line and headers if status code is greater than or equal to 500

        Modes for different modules can be specified separated by commas. 
        Example: "--log-http=api:errors,proxy:headers,url" specifies that the API module logs errors, the proxy module
        logs headers, and anything else logs full URL.
    -p, --pac <path or URL> (env FORWARDER_PAC)
        Proxy Auto-Configuration file to use for upstream proxy selection. 

        Syntax:
        - File: /path/to/file.pac
        - URL: http://example.com/proxy.pac
        - Embed: data:base64,<base64 encoded data>
        - Stdin: -
    --tls-cert-file <path or base64> (env FORWARDER_TLS_CERT_FILE)
        TLS certificate to use if the server protocol is https or h2. 

        Syntax:
        - File: /path/to/file.pac
        - Embed: data:base64,<base64 encoded data>
Choraden commented 1 month ago

Apart from the deprecated notice LGTM

mmatczuk commented 1 month ago

@Choraden PTAL

Choraden commented 1 month ago
Screenshot 2024-05-21 at 11 36 50

Embed: data:base64,<base64 encoded data> is not rendering well