diff --git a/README.md b/README.md index 38c533e..a782ab1 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ - [Summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/branch/1.1/README.md) -- [[tutorial 070] A variable with type "domainname", parameters type and disabled](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_070/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_070~1..v1.1_070)) +- [[tutorial 071] A variable with multiple value](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_071/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_071~1..v1.1_071)) -# [tutorial 071] A variable with multiple value +# [tutorial 072] A non mandatory variable -[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_071~1..v1.1_071) +[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_072~1..v1.1_072) ## Screenshot @@ -129,6 +129,7 @@ no_proxy: allow_without_dot: true allow_startswith_dot: true multi: true + mandatory: false disabled: variable: proxy_mode when: No proxy @@ -182,7 +183,7 @@ This family builds families dynamically. | Variable                                                                                                                                                                                  | Description                                                                                                                                                                               | |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | **auto**
[`web_address`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` _`disabled`_ | Automatic proxy configuration URL.
**Disabled**: proxy_mode. | -| **no_proxy**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` _`disabled`_ `unique` `multiple` | Address for which proxy will be desactivated.
**Validators**:
- the domain name can starts by a dot
- the domain name can be a hostname
- the domain name can be an IP
- the domain name can be network in CIDR format
**Disabled**: proxy_mode. | +| **no_proxy**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) _`disabled`_ `unique` `multiple` | Address for which proxy will be desactivated.
**Validators**:
- the domain name can starts by a dot
- the domain name can be a hostname
- the domain name can be an IP
- the domain name can be network in CIDR format
**Disabled**: proxy_mode. | ## User data @@ -217,11 +218,7 @@ Variables: ```yml --- -proxy_mode: Automatic proxy configuration URL -auto: https://auto.proxy.net/wpad.dat -no_proxy: - - example.net - - 192.168.1.0/24 +proxy_mode: No proxy ``` #### Output @@ -236,11 +233,7 @@ foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/02/config.yaml │ Unmodifiable variable │ ╰─────────────────────────────────────────────────────────────╯ Variables: -┣━━ 📓 proxy_mode: Automatic proxy configuration URL (No proxy) -┣━━ 📓 auto: https://auto.proxy.net/wpad.dat -┗━━ 📓 no_proxy : - ┣━━ example.net - ┗━━ 192.168.1.0/24 +┗━━ 📓 proxy_mode: No proxy (No proxy) ### Example 3 @@ -249,8 +242,7 @@ Variables: ```yml --- -proxy_mode: Automatic proxy configuration URL -auto: https://auto.proxy.net/wpad.dat +proxy_mode: Manual proxy configuration ``` #### Output @@ -260,8 +252,65 @@ foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/03/config.yaml ```
🛑 ERRORS
 ┣━━ The following variables are mandatory but have no value:
-┗━━   - no_proxy (Address for which proxy will be desactivated)
+┣━━   - manual.http_proxy.address (HTTP address)
+┗━━   - manual.socks_proxy.address (SOCKS address)
+
+### Example 4 + +#### config/04/config.yaml + + +```yml +--- +proxy_mode: foo + +``` +#### Output + +```console +foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/04/config.yaml +``` +
🛑 ERRORS
+┗━━ "foo" is an invalid choice for "proxy_mode (Configure Proxy Access to the Internet)", only 
+    "Auto-detect proxy settings for this network", "Automatic proxy configuration URL", "Manual proxy 
+    configuration", "No proxy" and "Use system proxy settings" are allowed
+╭────────────────────────── Caption ──────────────────────────╮
+│ Variable                           Default value            │
+│ Undocumented variable              Modified value           │
+│ Undocumented but modified variable (Original default value) │
+│ Unmodifiable variable                                       │
+╰─────────────────────────────────────────────────────────────╯
+Variables:
+┗━━ 📓 proxy_mode: No proxy
+
+### Example 5 + +#### config/05/config.yaml + + +```yml +--- +proxy_mode: 1 + +``` +#### Output + +```console +foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/05/config.yaml +``` +
🛑 ERRORS
+┗━━ "1" is an invalid choice for "proxy_mode (Configure Proxy Access to the Internet)", only "Auto-detect
+    proxy settings for this network", "Automatic proxy configuration URL", "Manual proxy configuration", 
+    "No proxy" and "Use system proxy settings" are allowed
+╭────────────────────────── Caption ──────────────────────────╮
+│ Variable                           Default value            │
+│ Undocumented variable              Modified value           │
+│ Undocumented but modified variable (Original default value) │
+│ Unmodifiable variable                                       │
+╰─────────────────────────────────────────────────────────────╯
+Variables:
+┗━━ 📓 proxy_mode: No proxy
 
-- [[tutorial 072] A non mandatory variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_072/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_072~1..v1.1_072)) +- [[tutorial 073] Examples](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_073/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_073~1..v1.1_073)) diff --git a/config/02/config.yaml b/config/02/config.yaml index ccba4c0..d914488 100644 --- a/config/02/config.yaml +++ b/config/02/config.yaml @@ -1,6 +1,2 @@ --- -proxy_mode: Automatic proxy configuration URL -auto: https://auto.proxy.net/wpad.dat -no_proxy: - - example.net - - 192.168.1.0/24 +proxy_mode: No proxy diff --git a/config/02/output_ro.html b/config/02/output_ro.html index 3432302..38b2d86 100644 --- a/config/02/output_ro.html +++ b/config/02/output_ro.html @@ -5,9 +5,5 @@ │ Unmodifiable variable │ ╰─────────────────────────────────────────────────────────────╯ Variables: -┣━━ 📓 proxy_mode: Automatic proxy configuration URL (No proxy) -┣━━ 📓 auto: https://auto.proxy.net/wpad.dat -┗━━ 📓 no_proxy : - ┣━━ example.net - ┗━━ 192.168.1.0/24 +┗━━ 📓 proxy_mode: No proxy (No proxy) diff --git a/config/03/config.yaml b/config/03/config.yaml index 307e175..74edb22 100644 --- a/config/03/config.yaml +++ b/config/03/config.yaml @@ -1,3 +1,2 @@ --- -proxy_mode: Automatic proxy configuration URL -auto: https://auto.proxy.net/wpad.dat +proxy_mode: Manual proxy configuration diff --git a/config/03/output_ro.html b/config/03/output_ro.html index 91a9675..15e7f44 100644 --- a/config/03/output_ro.html +++ b/config/03/output_ro.html @@ -1,4 +1,5 @@
🛑 ERRORS
 ┣━━ The following variables are mandatory but have no value:
-┗━━   - no_proxy (Address for which proxy will be desactivated)
+┣━━   - manual.http_proxy.address (HTTP address)
+┗━━   - manual.socks_proxy.address (SOCKS address)
 
diff --git a/config/04/config.yaml b/config/04/config.yaml new file mode 100644 index 0000000..e3fa25d --- /dev/null +++ b/config/04/config.yaml @@ -0,0 +1,2 @@ +--- +proxy_mode: foo diff --git a/config/04/output_ro.html b/config/04/output_ro.html new file mode 100644 index 0000000..5fe2e0d --- /dev/null +++ b/config/04/output_ro.html @@ -0,0 +1,13 @@ +
🛑 ERRORS
+┗━━ "foo" is an invalid choice for "proxy_mode (Configure Proxy Access to the Internet)", only 
+    "Auto-detect proxy settings for this network", "Automatic proxy configuration URL", "Manual proxy 
+    configuration", "No proxy" and "Use system proxy settings" are allowed
+╭────────────────────────── Caption ──────────────────────────╮
+│ Variable                           Default value            │
+│ Undocumented variable              Modified value           │
+│ Undocumented but modified variable (Original default value) │
+│ Unmodifiable variable                                       │
+╰─────────────────────────────────────────────────────────────╯
+Variables:
+┗━━ 📓 proxy_mode: No proxy
+
diff --git a/config/05/config.yaml b/config/05/config.yaml new file mode 100644 index 0000000..bf6f64c --- /dev/null +++ b/config/05/config.yaml @@ -0,0 +1,2 @@ +--- +proxy_mode: 1 diff --git a/config/05/output_ro.html b/config/05/output_ro.html new file mode 100644 index 0000000..071b4d5 --- /dev/null +++ b/config/05/output_ro.html @@ -0,0 +1,13 @@ +
🛑 ERRORS
+┗━━ "1" is an invalid choice for "proxy_mode (Configure Proxy Access to the Internet)", only "Auto-detect
+    proxy settings for this network", "Automatic proxy configuration URL", "Manual proxy configuration", 
+    "No proxy" and "Use system proxy settings" are allowed
+╭────────────────────────── Caption ──────────────────────────╮
+│ Variable                           Default value            │
+│ Undocumented variable              Modified value           │
+│ Undocumented but modified variable (Original default value) │
+│ Unmodifiable variable                                       │
+╰─────────────────────────────────────────────────────────────╯
+Variables:
+┗━━ 📓 proxy_mode: No proxy
+