diff --git a/README.md b/README.md index 1626ef7..cf33979 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 060] A variable with type "web_address"](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_060/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_060~1..v1.1_060)) +- [[tutorial 061] A conditional disabled variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_061/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_061~1..v1.1_061)) -# [tutorial 061] A conditional disabled variable +# [tutorial 070] A variable with type "domainname", parameters type and disabled -[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_061~1..v1.1_061) +[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_070~1..v1.1_070) ## Screenshot @@ -114,6 +114,24 @@ auto: variable: proxy_mode when_not: Automatic proxy configuration URL +``` +### firefox/40-no_proxy.yml + + +```yml +--- +no_proxy: + description: Address for which proxy will be desactivated + type: "domainname" + params: + allow_ip: true + allow_cidr_network: true + allow_without_dot: true + allow_startswith_dot: true + disabled: + variable: proxy_mode + when: No proxy + ``` ### Generated documentation @@ -122,9 +140,9 @@ foo@bar:~$ rougail -v 1.1 -m firefox/ -o doc -do github ``` ### Variables -| Variable                                                                                                          | Description                                                                                                       | -|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **proxy_mode**
[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Configure Proxy Access to the Internet.
**Choices**:
- No proxy ← (default)
- Auto-detect proxy settings for this network
- Use system proxy settings
- Manual proxy configuration
- Automatic proxy configuration URL | +| Variable                                                                                                                                                                                  | Description                                                                                                                                                                               | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **proxy_mode**
[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Configure Proxy Access to the Internet.
**Choices**:
- No proxy ← (default)
- Auto-detect proxy settings for this network
- Use system proxy settings
- Manual proxy configuration
- Automatic proxy configuration URL | #### Manual proxy configuration @@ -134,14 +152,14 @@ _`disabled`_ ##### HTTP Proxy -| Variable                                                                                                          | Description                                                                                                       | -|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **manual.http_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTP address.
**Validator**: the domain name can be an IP | -| **manual.http_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTP Port.
**Default**: 8080 | +| Variable                                                                                                                                                                                  | Description                                                                                                                                                                               | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **manual.http_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTP address.
**Validator**: the domain name can be an IP | +| **manual.http_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTP Port.
**Default**: 8080 | -| Variable                                                                                                          | Description                                                                                                       | -|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **manual.use_for_https**
[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Also use this proxy for HTTPS.
**Default**: True | +| Variable                                                                                                                                                                                  | Description                                                                                                                                                                               | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **manual.use_for_https**
[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Also use this proxy for HTTPS.
**Default**: True | ##### "*HTTPS* Proxy" or "*SOCKS* Proxy" @@ -154,15 +172,16 @@ This family builds families dynamically. **Identifiers**:
- HTTPS
- SOCKS -| Variable                                                                                                          | Description                                                                                                       | -|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **manual.https_proxy.address** or **manual.socks_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | "*HTTPS* address" or "*SOCKS* address".
**Validator**: the domain name can be an IP
**Default**: the value of the variable "manual.http_proxy.address". | -| **manual.https_proxy.port** or **manual.socks_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | "*HTTPS* port" or "*SOCKS* port".
**Default**: the value of the variable "manual.http_proxy.port". | -| **manual.https_proxy.version** or **manual.socks_proxy.version**
[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` _`disabled`_ | SOCKS host version used by proxy.
**Choices**:
- v4
- v5 ← (default)
**Disabled**: when the identifier is "HTTPS". | +| Variable                                                                                                                                                                                  | Description                                                                                                                                                                               | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **manual.https_proxy.address** or **manual.socks_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | "*HTTPS* address" or "*SOCKS* address".
**Validator**: the domain name can be an IP
**Default**: the value of the variable "manual.http_proxy.address". | +| **manual.https_proxy.port** or **manual.socks_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | "*HTTPS* port" or "*SOCKS* port".
**Default**: the value of the variable "manual.http_proxy.port". | +| **manual.https_proxy.version** or **manual.socks_proxy.version**
[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` _`disabled`_ | SOCKS host version used by proxy.
**Choices**:
- v4
- v5 ← (default)
**Disabled**: when the identifier is "HTTPS". | -| Variable                                                                                                          | Description                                                                                                       | -|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **auto**
[`web_address`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` _`disabled`_ | Automatic proxy configuration URL.
**Disabled**: proxy_mode. | +| 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`_ | 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 @@ -174,7 +193,6 @@ This family builds families dynamically. ```yml --- -auto: https://auto.proxy.net/wpad.dat ``` #### Output @@ -182,9 +200,7 @@ auto: https://auto.proxy.net/wpad.dat ```console foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/01/config.yaml ``` -
🛑 ERRORS
-┗━━ cannot access to option "auto" (Automatic proxy configuration URL) because has property "disabled"
-╭────────────────────────── Caption ──────────────────────────╮
+
╭────────────────────────── Caption ──────────────────────────╮
 │ Variable                           Default value            │
 │ Undocumented variable              Modified value           │
 │ Undocumented but modified variable (Original default value) │
@@ -201,6 +217,8 @@ Variables:
 ```yml
 ---
 proxy_mode: Automatic proxy configuration URL
+auto: https://auto.proxy.net/wpad.dat
+no_proxy: 192.168.1.0/24
 
 ```
 #### Output
@@ -208,26 +226,6 @@ proxy_mode: Automatic proxy configuration URL
 ```console
 foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/02/config.yaml
 ```
-
🛑 ERRORS
-┣━━ The following variables are mandatory but have no value:
-┗━━   - auto (Automatic proxy configuration URL)
-
-### Example 3 - -#### config/03/config.yaml - - -```yml ---- -proxy_mode: Automatic proxy configuration URL -auto: https://auto.proxy.net/wpad.dat - -``` -#### Output - -```console -foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/03/config.yaml -```
╭────────────────────────── Caption ──────────────────────────╮
 │ Variable                           Default value            │
 │ Undocumented variable              Modified value           │
@@ -236,8 +234,9 @@ foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/03/config.yaml
 ╰─────────────────────────────────────────────────────────────╯
 Variables:
 ┣━━ 📓 proxy_mode: Automatic proxy configuration URL (No proxy)
-┗━━ 📓 auto: https://auto.proxy.net/wpad.dat
+┣━━ 📓 auto: https://auto.proxy.net/wpad.dat
+┗━━ 📓 no_proxy: 192.168.1.0/24
 
-- [[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)) diff --git a/config/01/config.yaml b/config/01/config.yaml index 1edbe91..ed97d53 100644 --- a/config/01/config.yaml +++ b/config/01/config.yaml @@ -1,2 +1 @@ --- -auto: https://auto.proxy.net/wpad.dat diff --git a/config/01/output_ro.html b/config/01/output_ro.html index 671632f..cdecbe8 100644 --- a/config/01/output_ro.html +++ b/config/01/output_ro.html @@ -1,6 +1,4 @@ -
🛑 ERRORS
-┗━━ cannot access to option "auto" (Automatic proxy configuration URL) because has property "disabled"
-╭────────────────────────── Caption ──────────────────────────╮
+
╭────────────────────────── Caption ──────────────────────────╮
 │ Variable                           Default value            │
 │ Undocumented variable              Modified value           │
 │ Undocumented but modified variable (Original default value) │
diff --git a/config/02/config.yaml b/config/02/config.yaml
index 26df130..54956ea 100644
--- a/config/02/config.yaml
+++ b/config/02/config.yaml
@@ -1,2 +1,4 @@
 ---
 proxy_mode: Automatic proxy configuration URL
+auto: https://auto.proxy.net/wpad.dat
+no_proxy: 192.168.1.0/24
diff --git a/config/02/output_ro.html b/config/02/output_ro.html
index 0740549..6f52431 100644
--- a/config/02/output_ro.html
+++ b/config/02/output_ro.html
@@ -1,4 +1,11 @@
-
🛑 ERRORS
-┣━━ The following variables are mandatory but have no value:
-┗━━   - auto (Automatic proxy configuration URL)
+
╭────────────────────────── Caption ──────────────────────────╮
+│ Variable                           Default value            │
+│ Undocumented variable              Modified value           │
+│ Undocumented but modified variable (Original default value) │
+│ Unmodifiable variable                                       │
+╰─────────────────────────────────────────────────────────────╯
+Variables:
+┣━━ 📓 proxy_mode: Automatic proxy configuration URL (No proxy)
+┣━━ 📓 auto: https://auto.proxy.net/wpad.dat
+┗━━ 📓 no_proxy: 192.168.1.0/24
 
diff --git a/config/03/config.yaml b/config/03/config.yaml deleted file mode 100644 index 307e175..0000000 --- a/config/03/config.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -proxy_mode: Automatic proxy configuration URL -auto: https://auto.proxy.net/wpad.dat diff --git a/config/03/output_ro.html b/config/03/output_ro.html deleted file mode 100644 index 72a41f0..0000000 --- a/config/03/output_ro.html +++ /dev/null @@ -1,10 +0,0 @@ -
╭────────────────────────── Caption ──────────────────────────╮
-│ Variable                           Default value            │
-│ Undocumented variable              Modified value           │
-│ Undocumented but modified variable (Original default value) │
-│ Unmodifiable variable                                       │
-╰─────────────────────────────────────────────────────────────╯
-Variables:
-┣━━ 📓 proxy_mode: Automatic proxy configuration URL (No proxy)
-┗━━ 📓 auto: https://auto.proxy.net/wpad.dat
-
diff --git a/firefox.png b/firefox.png index 20701e2..16f5931 100644 Binary files a/firefox.png and b/firefox.png differ