Skip to content

Commit

Permalink
chore(docs): make gen
Browse files Browse the repository at this point in the history
  • Loading branch information
Choraden authored and mmatczuk committed Mar 14, 2024
1 parent bb4fb24 commit 433c9d8
Show file tree
Hide file tree
Showing 12 changed files with 188 additions and 48 deletions.
4 changes: 2 additions & 2 deletions docs/content/cli/forwarder_pac_eval.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ You can generate a config file by running `forwarder pac eval config-file` comma

Proxy Auto-Configuration file to use for upstream proxy selection.
It can be a local file or a URL, you can also use '-' to read from stdin.
The data URI scheme is supported, the format is data:base64,<encoded data>.
The data URI scheme is supported, the format is `data:base64,<encoded data>`.

## DNS options

Expand Down Expand Up @@ -86,7 +86,7 @@ Use this flag multiple times to specify multiple CA certificate files.

* Environment variable: `FORWARDER_HTTP_DIAL_TIMEOUT`
* Value Format: `<duration>`
* Default value: `10s`
* Default value: `30s`

The maximum amount of time a dial will wait for a connect to complete.
With or without a timeout, the operating system may impose its own earlier timeout.
Expand Down
21 changes: 19 additions & 2 deletions docs/content/cli/forwarder_pac_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ If the host is empty, the server will listen on all available interfaces.

Basic authentication credentials to protect the server.

### `--idle-timeout` {#idle-timeout}

* Environment variable: `FORWARDER_IDLE_TIMEOUT`
* Value Format: `<duration>`
* Default value: `1h0m0s`

The maximum amount of time to wait for the next request before closing connection.

### `--protocol` {#protocol}

* Environment variable: `FORWARDER_PROTOCOL`
Expand All @@ -79,6 +87,15 @@ The amount of time allowed to read request headers.
TLS certificate to use if the server protocol is https or h2.
Can be a path to a file or "data:" followed by base64 encoded certificate.

### `--tls-handshake-timeout` {#tls-handshake-timeout}

* Environment variable: `FORWARDER_TLS_HANDSHAKE_TIMEOUT`
* Value Format: `<duration>`
* Default value: `0s`

The maximum amount of time to wait for a TLS handshake before closing connection.
Zero means no limit.

### `--tls-key-file` {#tls-key-file}

* Environment variable: `FORWARDER_TLS_KEY_FILE`
Expand All @@ -97,7 +114,7 @@ Can be a path to a file or "data:" followed by base64 encoded key.

Proxy Auto-Configuration file to use for upstream proxy selection.
It can be a local file or a URL, you can also use '-' to read from stdin.
The data URI scheme is supported, the format is data:base64,<encoded data>.
The data URI scheme is supported, the format is `data:base64,<encoded data>`.

## DNS options

Expand Down Expand Up @@ -147,7 +164,7 @@ Use this flag multiple times to specify multiple CA certificate files.

* Environment variable: `FORWARDER_HTTP_DIAL_TIMEOUT`
* Value Format: `<duration>`
* Default value: `10s`
* Default value: `30s`

The maximum amount of time a dial will wait for a connect to complete.
With or without a timeout, the operating system may impose its own earlier timeout.
Expand Down
34 changes: 30 additions & 4 deletions docs/content/cli/forwarder_run.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ Site or upstream proxy basic authentication credentials.
The host and port can be set to "*" to match all hosts and ports respectively.
The flag can be specified multiple times to add multiple credentials.

### `--idle-timeout` {#idle-timeout}

* Environment variable: `FORWARDER_IDLE_TIMEOUT`
* Value Format: `<duration>`
* Default value: `1h0m0s`

The maximum amount of time to wait for the next request before closing connection.

### `--name` {#name}

* Environment variable: `FORWARDER_NAME`
Expand Down Expand Up @@ -104,6 +112,15 @@ Accepts binary format (e.g.
TLS certificate to use if the server protocol is https or h2.
Can be a path to a file or "data:" followed by base64 encoded certificate.

### `--tls-handshake-timeout` {#tls-handshake-timeout}

* Environment variable: `FORWARDER_TLS_HANDSHAKE_TIMEOUT`
* Value Format: `<duration>`
* Default value: `10s`

The maximum amount of time to wait for a TLS handshake before closing connection.
Zero means no limit.

### `--tls-key-file` {#tls-key-file}

* Environment variable: `FORWARDER_TLS_KEY_FILE`
Expand Down Expand Up @@ -161,7 +178,7 @@ Example: -H "Host: example.com" -H "-User-Agent" -H "-X-*".

Proxy Auto-Configuration file to use for upstream proxy selection.
It can be a local file or a URL, you can also use '-' to read from stdin.
The data URI scheme is supported, the format is data:base64,<encoded data>.
The data URI scheme is supported, the format is `data:base64,<encoded data>`.

### `-x, --proxy` {#proxy}

Expand Down Expand Up @@ -215,7 +232,8 @@ Enable Man-in-the-Middle (MITM) mode.
It only works with HTTPS requests, HTTP/2 is not supported.
MITM is enabled by default when the --mitm-cacert-file flag is set.
If the CA certificate is not provided MITM uses a generated CA certificate.
The CA certificate used can be retrieved from the API server .
The CA certificate used can be retrieved from the API server.


### `--mitm-cacert-file` {#mitm-cacert-file}

Expand Down Expand Up @@ -245,7 +263,7 @@ Prefix domains with '-' to exclude requests to certain domains from being MITMed

* Environment variable: `FORWARDER_MITM_ORG`
* Value Format: `<name>`
* Default value: `Sauce Labs Inc.`
* Default value: `Forwarder Proxy MITM`

Organization name to use in the generated MITM certificates.

Expand Down Expand Up @@ -306,7 +324,7 @@ Use this flag multiple times to specify multiple CA certificate files.

* Environment variable: `FORWARDER_HTTP_DIAL_TIMEOUT`
* Value Format: `<duration>`
* Default value: `10s`
* Default value: `30s`

The maximum amount of time a dial will wait for a connect to complete.
With or without a timeout, the operating system may impose its own earlier timeout.
Expand Down Expand Up @@ -370,6 +388,14 @@ If the host is empty, the server will listen on all available interfaces.

Basic authentication credentials to protect the server.

### `--api-idle-timeout` {#api-idle-timeout}

* Environment variable: `FORWARDER_API_IDLE_TIMEOUT`
* Value Format: `<duration>`
* Default value: `1h0m0s`

The maximum amount of time to wait for the next request before closing connection.

### `--api-read-header-timeout` {#api-read-header-timeout}

* Environment variable: `FORWARDER_API_READ_HEADER_TIMEOUT`
Expand Down
20 changes: 19 additions & 1 deletion docs/content/cli/forwarder_test_grpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: forwarder test grpc

Usage: `forwarder test grpc [--address <host:port>] [flags]`

Start HTTP/2 gRPC server for testing
Start gRPC server for testing

**Note:** You can also specify the options as YAML, JSON or TOML file using `--config-file` flag.
You can generate a config file by running `forwarder test grpc config-file` command.
Expand All @@ -23,6 +23,15 @@ You can generate a config file by running `forwarder test grpc config-file` comm
Address to listen on.
If the host is empty, the server will listen on all available interfaces.

### `--plain-text` {#plain-text}

* Environment variable: `FORWARDER_PLAIN_TEXT`
* Value Format: `<value>`
* Default value: `false`

Run in plain-text mode i.e.
without TLS.

### `--tls-cert-file` {#tls-cert-file}

* Environment variable: `FORWARDER_TLS_CERT_FILE`
Expand All @@ -31,6 +40,15 @@ If the host is empty, the server will listen on all available interfaces.
TLS certificate to use if the server protocol is https or h2.
Can be a path to a file or "data:" followed by base64 encoded certificate.

### `--tls-handshake-timeout` {#tls-handshake-timeout}

* Environment variable: `FORWARDER_TLS_HANDSHAKE_TIMEOUT`
* Value Format: `<duration>`
* Default value: `0s`

The maximum amount of time to wait for a TLS handshake before closing connection.
Zero means no limit.

### `--tls-key-file` {#tls-key-file}

* Environment variable: `FORWARDER_TLS_KEY_FILE`
Expand Down
25 changes: 25 additions & 0 deletions docs/content/cli/forwarder_test_httpbin.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ If the host is empty, the server will listen on all available interfaces.

Basic authentication credentials to protect the server.

### `--idle-timeout` {#idle-timeout}

* Environment variable: `FORWARDER_IDLE_TIMEOUT`
* Value Format: `<duration>`
* Default value: `1h0m0s`

The maximum amount of time to wait for the next request before closing connection.

### `--protocol` {#protocol}

* Environment variable: `FORWARDER_PROTOCOL`
Expand All @@ -55,6 +63,15 @@ The amount of time allowed to read request headers.
TLS certificate to use if the server protocol is https or h2.
Can be a path to a file or "data:" followed by base64 encoded certificate.

### `--tls-handshake-timeout` {#tls-handshake-timeout}

* Environment variable: `FORWARDER_TLS_HANDSHAKE_TIMEOUT`
* Value Format: `<duration>`
* Default value: `0s`

The maximum amount of time to wait for a TLS handshake before closing connection.
Zero means no limit.

### `--tls-key-file` {#tls-key-file}

* Environment variable: `FORWARDER_TLS_KEY_FILE`
Expand All @@ -81,6 +98,14 @@ If the host is empty, the server will listen on all available interfaces.

Basic authentication credentials to protect the server.

### `--api-idle-timeout` {#api-idle-timeout}

* Environment variable: `FORWARDER_API_IDLE_TIMEOUT`
* Value Format: `<duration>`
* Default value: `1h0m0s`

The maximum amount of time to wait for the next request before closing connection.

### `--api-read-header-timeout` {#api-read-header-timeout}

* Environment variable: `FORWARDER_API_READ_HEADER_TIMEOUT`
Expand Down
4 changes: 2 additions & 2 deletions docs/content/config/forwarder_pac_eval.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# Proxy Auto-Configuration file to use for upstream proxy selection. It can be a
# local file or a URL, you can also use '-' to read from stdin. The data URI
# scheme is supported, the format is data:base64,<encoded data>.
# scheme is supported, the format is `data:base64,<encoded data>`.
#pac: file://pac.js

# --- DNS options ---
Expand Down Expand Up @@ -44,7 +44,7 @@
# The maximum amount of time a dial will wait for a connect to complete. With or
# without a timeout, the operating system may impose its own earlier timeout.
# For instance, TCP timeouts are often around 3 minutes.
#http-dial-timeout: 10s
#http-dial-timeout: 30s

# http-idle-conn-timeout <duration>
#
Expand Down
16 changes: 14 additions & 2 deletions docs/content/config/forwarder_pac_server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
# Basic authentication credentials to protect the server.
#basic-auth:

# idle-timeout <duration>
#
# The maximum amount of time to wait for the next request before closing
# connection.
#idle-timeout: 1h0m0s

# protocol <http|https|h2>
#
# The server protocol. For https and h2 protocols, if TLS certificate is not
Expand All @@ -28,6 +34,12 @@
# a file or "data:" followed by base64 encoded certificate.
#tls-cert-file:

# tls-handshake-timeout <duration>
#
# The maximum amount of time to wait for a TLS handshake before closing
# connection. Zero means no limit.
#tls-handshake-timeout: 0s

# tls-key-file <path or base64>
#
# TLS private key to use if the server protocol is https or h2. Can be a path to
Expand All @@ -40,7 +52,7 @@
#
# Proxy Auto-Configuration file to use for upstream proxy selection. It can be a
# local file or a URL, you can also use '-' to read from stdin. The data URI
# scheme is supported, the format is data:base64,<encoded data>.
# scheme is supported, the format is `data:base64,<encoded data>`.
#pac: file://pac.js

# --- DNS options ---
Expand Down Expand Up @@ -80,7 +92,7 @@
# The maximum amount of time a dial will wait for a connect to complete. With or
# without a timeout, the operating system may impose its own earlier timeout.
# For instance, TCP timeouts are often around 3 minutes.
#http-dial-timeout: 10s
#http-dial-timeout: 30s

# http-idle-conn-timeout <duration>
#
Expand Down
26 changes: 22 additions & 4 deletions docs/content/config/forwarder_run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
# specified multiple times to add multiple credentials.
#credentials:

# idle-timeout <duration>
#
# The maximum amount of time to wait for the next request before closing
# connection.
#idle-timeout: 1h0m0s

# name <string>
#
# Name of this proxy instance. This value is used in the Via header in requests.
Expand Down Expand Up @@ -48,6 +54,12 @@
# a file or "data:" followed by base64 encoded certificate.
#tls-cert-file:

# tls-handshake-timeout <duration>
#
# The maximum amount of time to wait for a TLS handshake before closing
# connection. Zero means no limit.
#tls-handshake-timeout: 10s

# tls-key-file <path or base64>
#
# TLS private key to use if the server protocol is https or h2. Can be a path to
Expand Down Expand Up @@ -89,7 +101,7 @@
#
# Proxy Auto-Configuration file to use for upstream proxy selection. It can be a
# local file or a URL, you can also use '-' to read from stdin. The data URI
# scheme is supported, the format is data:base64,<encoded data>.
# scheme is supported, the format is `data:base64,<encoded data>`.
#pac:

# proxy [protocol://]host[:port]
Expand Down Expand Up @@ -131,7 +143,7 @@
# HTTP/2 is not supported. MITM is enabled by default when the
# --mitm-cacert-file flag is set. If the CA certificate is not provided MITM
# uses a generated CA certificate. The CA certificate used can be retrieved from
# the API server .
# the API server.
#mitm: false

# mitm-cacert-file <path or base64>
Expand All @@ -155,7 +167,7 @@
# mitm-org <name>
#
# Organization name to use in the generated MITM certificates.
#mitm-org: Sauce Labs Inc.
#mitm-org: Forwarder Proxy MITM

# mitm-validity <duration>
#
Expand Down Expand Up @@ -199,7 +211,7 @@
# The maximum amount of time a dial will wait for a connect to complete. With or
# without a timeout, the operating system may impose its own earlier timeout.
# For instance, TCP timeouts are often around 3 minutes.
#http-dial-timeout: 10s
#http-dial-timeout: 30s

# http-idle-conn-timeout <duration>
#
Expand Down Expand Up @@ -239,6 +251,12 @@
# Basic authentication credentials to protect the server.
#api-basic-auth:

# api-idle-timeout <duration>
#
# The maximum amount of time to wait for the next request before closing
# connection.
#api-idle-timeout: 1h0m0s

# api-read-header-timeout <duration>
#
# The amount of time allowed to read request headers.
Expand Down
11 changes: 11 additions & 0 deletions docs/content/config/forwarder_test_grpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,23 @@
# available interfaces.
#address: localhost:1443

# plain-text <value>
#
# Run in plain-text mode i.e. without TLS.
#plain-text: false

# tls-cert-file <path or base64>
#
# TLS certificate to use if the server protocol is https or h2. Can be a path to
# a file or "data:" followed by base64 encoded certificate.
#tls-cert-file:

# tls-handshake-timeout <duration>
#
# The maximum amount of time to wait for a TLS handshake before closing
# connection. Zero means no limit.
#tls-handshake-timeout: 0s

# tls-key-file <path or base64>
#
# TLS private key to use if the server protocol is https or h2. Can be a path to
Expand Down
Loading

0 comments on commit 433c9d8

Please sign in to comment.