From 4a223e8114acaec0700cdfb5e0d19db925806c72 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Sat, 2 Nov 2024 14:58:52 +0100 Subject: [PATCH] [tutorial 078] A variable in avanced mode (config and doc) --- README.md | 70 +++++++++++++++++++++------------------- config/02/output_ro.html | 2 +- config/03/output_ro.html | 2 +- 3 files changed, 38 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 6307828..5fd14ac 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 076] A variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_076/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_076~1..v1.1_076)) +- [[tutorial 077] Jinja calculation for an hidden variable with a potential inaccessible varible](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_077/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_077~1..v1.1_077)) -# [tutorial 077] Jinja calculation for an hidden variable with a potential inaccessible varible +# [tutorial 078] A variable in avanced mode -[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_077~1..v1.1_077) +[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_078~1..v1.1_078) ## Screenshot @@ -161,6 +161,7 @@ prompt_authentication: proxy_dns_socks5: description: Use proxy DNS when using SOCKS v5 default: false + mode: advanced disabled: jinja: | {% if manual.socks_proxy.version is propertyerror %} @@ -176,34 +177,36 @@ proxy_dns_socks5: ### Generated documentation ```console -foo@bar:~$ rougail -v 1.1 -m firefox/ -o doc -do github +foo@bar:~$ rougail -v 1.1 -m firefox/ --modes_level basic standard advanced -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) `standard` `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 -_`disabled`_ +`basic` _`disabled`_ **Disabled**: proxy_mode. ##### 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 | +`basic` -| 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.http_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `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) `standard` `mandatory` | HTTP Port.
**Default**: 8080 | + +| Variable                                                                                                                 | Description                                                                                                              | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **manual.use_for_https**
[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | Also use this proxy for HTTPS.
**Default**: True | ##### "*HTTPS* Proxy" or "*SOCKS* Proxy" -_`hidden`_ +`standard` _`hidden`_ **Hidden**: in HTTPS case if "manual.use_for_https" is set to True. @@ -212,18 +215,17 @@ 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) `standard` `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) `standard` `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) `standard` `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. | -| **no_proxy**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) _`disabled`_ `unique` `multiple` | Address for which proxy will be desactivated.
Connections to localhost, 127.0.0.1/8 and ::1 are never proxied.
**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
**Examples**:
- .mozilla.org
- .net.nz
- 192.168.1.0/24
**Disabled**: proxy_mode. | -| **prompt_authentication**
[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` _`disabled`_ | Prompt for authentication if password is saved.
**Default**: True
**Disabled**: proxy_mode. | -| **proxy_dns_socks5**
[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` _`disabled`_ | Use proxy DNS when using SOCKS v5.
**Default**: False
**Disabled**: if "firefox.proxy_mode" is not "Manual proxy configuration"
or "firefox.manual.socks_proxy.version" is "v4". | +| Variable                                                                                                                 | Description                                                                                                              | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **auto**
[`web_address`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` _`disabled`_ | Automatic proxy configuration URL.
**Disabled**: proxy_mode. | +| **no_proxy**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` _`disabled`_ `unique` `multiple` | Address for which proxy will be desactivated.
Connections to localhost, 127.0.0.1/8 and ::1 are never proxied.
**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
**Examples**:
- .mozilla.org
- .net.nz
- 192.168.1.0/24
**Disabled**: proxy_mode. | +| **prompt_authentication**
[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` _`disabled`_ | Prompt for authentication if password is saved.
**Default**: True
**Disabled**: proxy_mode. | ## User data @@ -240,7 +242,7 @@ This family builds families dynamically. #### Output ```console -foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/01/config.yaml +foo@bar:~$ rougail -v 1.1 -m firefox/ --modes_level basic standard advanced -u file -ff config/01/config.yaml ```
╭────────────────────────── Caption ──────────────────────────╮
 │ Variable                           Default value            │
@@ -267,7 +269,7 @@ manual:
 #### Output
 
 ```console
-foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/02/config.yaml
+foo@bar:~$ rougail -v 1.1 -m firefox/ --modes_level basic standard advanced -u file -ff config/02/config.yaml
 ```
 
╭────────────────────────── Caption ──────────────────────────╮
 │ Variable                           Default value            │
@@ -291,7 +293,7 @@ Variables:
     ┗━━ 📓 version: v5
 ┣━━ 📓 no_proxy :
 ┣━━ 📓 prompt_authentication: True
-┗━━ 📓 proxy_dns_socks5: False
+┗━━ 📓 proxy_dns_socks5: False
 
### Example 3 @@ -310,7 +312,7 @@ proxy_dns_socks5: true #### Output ```console -foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/03/config.yaml +foo@bar:~$ rougail -v 1.1 -m firefox/ --modes_level basic standard advanced -u file -ff config/03/config.yaml ```
╭────────────────────────── Caption ──────────────────────────╮
 │ Variable                           Default value            │
@@ -334,7 +336,7 @@ Variables:
     ┗━━ 📓 version: v5
 ┣━━ 📓 no_proxy :
 ┣━━ 📓 prompt_authentication: True
-┗━━ 📓 proxy_dns_socks5: True
+┗━━ 📓 proxy_dns_socks5: True
 
### Example 4 @@ -354,7 +356,7 @@ manual: #### Output ```console -foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/04/config.yaml +foo@bar:~$ rougail -v 1.1 -m firefox/ --modes_level basic standard advanced -u file -ff config/04/config.yaml ```
╭────────────────────────── Caption ──────────────────────────╮
 │ Variable                           Default value            │
@@ -381,4 +383,4 @@ Variables:
 
-- [[tutorial 078] A variable in avanced mode](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_078/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_078~1..v1.1_078)) +- [[tutorial 080] A boolean variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_080/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_080~1..v1.1_080)) diff --git a/config/02/output_ro.html b/config/02/output_ro.html index 4a853d5..9da31a9 100644 --- a/config/02/output_ro.html +++ b/config/02/output_ro.html @@ -20,5 +20,5 @@ Variables: ┗━━ 📓 version: v5 ┣━━ 📓 no_proxy : ┣━━ 📓 prompt_authentication: True -┗━━ 📓 proxy_dns_socks5: False +┗━━ 📓 proxy_dns_socks5: False
diff --git a/config/03/output_ro.html b/config/03/output_ro.html index 52a5037..094c50c 100644 --- a/config/03/output_ro.html +++ b/config/03/output_ro.html @@ -20,5 +20,5 @@ Variables: ┗━━ 📓 version: v5 ┣━━ 📓 no_proxy : ┣━━ 📓 prompt_authentication: True -┗━━ 📓 proxy_dns_socks5: True +┗━━ 📓 proxy_dns_socks5: True