diff --git a/README.md b/README.md index 37cf7966..33923be3 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ - [Summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/branch/1.1/README.md) -- [[tutorial v1.1_093] Examples](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_093/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_093~1..v1.1_093)) +- [[tutorial v1.1_094] Help](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_094/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_094~1..v1.1_094)) -# [tutorial v1.1_094] Help +# [tutorial v1.1_095] A conditional disabled boolean variable -[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_094~1..v1.1_094) +[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_095~1..v1.1_095) -[Read the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/calculation.html#help) +[Read the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/calculation.html#a-conditional-disabled-boolean-variable) ## Screenshot @@ -31,7 +31,7 @@ pip install rougail-cli rougail-output-exporter rougail-output-doc rougail-user- Then switch to the tutorial page: ```shell -git switch --detach v1.1_094 +git switch --detach v1.1_095 ``` ## Structure @@ -39,37 +39,26 @@ git switch --detach v1.1_094

-.
- └── firefox
-     ├── 00-proxy.yml
-     ├── 10-manual.yml
-     ├── 20-manual.yml
-     ├── 30-auto.yml
-     └── 40-no_proxy.yml
+.
+ └── firefox
+     ├── 00-proxy.yml
+     ├── 10-manual.yml
+     ├── 20-manual.yml
+     ├── 30-auto.yml
+     ├── 40-no_proxy.yml
+     └── 50-prompt_authentication.yml


-Contents of the firefox/40-no_proxy.yml file +Contents of the firefox/50-prompt_authentication.yml file ```yml %YAML 1.2 --- version: 1.1 -no_proxy: - description: Address for which proxy will be desactivated - help: Connections to localhost, 127.0.0.1/8 and ::1 are never proxied - examples: - - .mozilla.org - - .net.nz - - 192.168.1.0/24 - type: domainname - params: - allow_ip: true - allow_cidr_network: true - allow_without_dot: true - allow_startswith_dot: true - multi: true - mandatory: false +prompt_authentication: + description: Prompt for authentication if password is saved + default: true disabled: variable: _.proxy_mode when: No proxy @@ -128,21 +117,22 @@ rougail -m firefox/ -o doc | **manual.*https*_proxy.port**
**manual.*socks*_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | *HTTPS* or *SOCKS* port.
**Validators**:
• well-known ports (1 to 1023) are allowed
• registred ports (1024 to 49151) are allowed
• private ports (greater than 49152) are allowed
**Default**: the value of the variable "[HTTP Port](#manual.http_proxy.port)" | | **manual.*https*_proxy.version**
**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.
**Validators**:
• well-known ports (1 to 1023) are allowed
• registred ports (1024 to 49151) are allowed
• type domainname
• the domain name can be a hostname
**Disabled**: when the variable "[Configure Proxy Access to the Internet](#proxy_mode)" hasn't the value "Automatic proxy configuration URL" | -| **no_proxy**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `multiple` *`disabled`* `unique` | Address for which proxy will be desactivated.
Connections to localhost, 127.0.0.1/8 and ::1 are never proxied.
**Validators**:
• type domainname
• 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**: when the variable "[Configure Proxy Access to the Internet](#proxy_mode)" has the value "No proxy" | +| Variable | Description | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **auto**
[`web address`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` *`disabled`* | Automatic proxy configuration URL.
**Validators**:
• well-known ports (1 to 1023) are allowed
• registred ports (1024 to 49151) are allowed
• type domainname
• the domain name can be a hostname
**Disabled**: when the variable "[Configure Proxy Access to the Internet](#proxy_mode)" hasn't the value "Automatic proxy configuration URL" | +| **no_proxy**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `multiple` *`disabled`* `unique` | Address for which proxy will be desactivated.
Connections to localhost, 127.0.0.1/8 and ::1 are never proxied.
**Validators**:
• type domainname
• 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**: when the variable "[Configure Proxy Access to the Internet](#proxy_mode)" has the value "No proxy" | +| **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**: when the variable "[Configure Proxy Access to the Internet](#proxy_mode)" has the value "No proxy" | ### Let's generate the changelog ```shell rougail -m firefox/ -o doc --doc.contents changelog ``` -#### Modified variable +#### New variable -| Variable | Description | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **no_proxy**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `multiple` *`disabled`* `unique` | Address for which proxy will be desactivated.
Connections to localhost, 127.0.0.1/8 and ::1 are never proxied.
**Validators**:
• type domainname
• 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**: when the variable "[Configure Proxy Access to the Internet](#proxy_mode)" has the value "No proxy" | +| Variable | Description | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **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**: when the variable "[Configure Proxy Access to the Internet](#proxy_mode)" has the value "No proxy" | ## User datas @@ -173,8 +163,10 @@ Variables: ```yml --- -proxy_mode: Automatic proxy configuration URL -auto: https://auto.proxy.net/wpad.dat +proxy_mode: Manual proxy configuration +manual: + http_proxy: + address: http.proxy.net ``` #### Output @@ -182,15 +174,25 @@ auto: https://auto.proxy.net/wpad.dat rougail -m firefox/ -u yaml -yf config/02/config.yml ```
╭─────────────────────────── Caption ────────────────────────────╮
+│ Variable                           Default value               │
 │ Undocumented but modified variable Modified value              │
 │                                    (⏳ Original default value) │
 ╰────────────────────────────────────────────────────────────────╯
 Variables:
-┣━━ 📓 Configure Proxy Access to the Internet: Automatic proxy configuration URL
-◀ loaded from the YAML file "config/02/config.yml" (⏳ No proxy)
-┣━━ 📓 Automatic proxy configuration URL: https://auto.proxy.net/wpad.dat ◀ 
-loaded from the YAML file "config/02/config.yml"
-┗━━ 📓 Address for which proxy will be desactivated: 
+┣━━ 📓 Configure Proxy Access to the Internet: Manual proxy configuration ◀ 
+loaded from the YAML file "config/02/config.yml" (⏳ No proxy)
+┣━━ 📂 Manual proxy configuration
+┣━━ 📂 HTTP Proxy
+┣━━ 📓 HTTP address: http.proxy.net ◀ loaded from the YAML file 
+"config/02/config.yml"
+┗━━ 📓 HTTP Port: 8080
+┣━━ 📓 Also use this proxy for HTTPS: true
+┗━━ 📂 SOCKS Proxy
+    ┣━━ 📓 SOCKS address: http.proxy.net
+    ┣━━ 📓 SOCKS port: 8080
+    ┗━━ 📓 SOCKS host version used by proxy: v5
+┣━━ 📓 Address for which proxy will be desactivated: 
+┗━━ 📓 Prompt for authentication if password is saved: true
 
### Example 3 @@ -199,30 +201,82 @@ 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: Manual proxy configuration +manual: + http_proxy: + address: http.proxy.net +proxy_dns_socks5: true ``` #### Output ```shell rougail -m firefox/ -u yaml -yf config/03/config.yml ``` -
╭─────────────────────────── Caption ────────────────────────────╮
+
🔔 WARNINGS
+┗━━ variable or family "proxy_dns_socks5" does not exist, it will be ignored 
+    when loading from the YAML file "config/03/config.yml"
+╭─────────────────────────── Caption ────────────────────────────╮
+│ Variable                           Default value               │
 │ Undocumented but modified variable Modified value              │
 │                                    (⏳ Original default value) │
 ╰────────────────────────────────────────────────────────────────╯
 Variables:
-┣━━ 📓 Configure Proxy Access to the Internet: Automatic proxy configuration URL
-◀ loaded from the YAML file "config/03/config.yml" (⏳ No proxy)
-┣━━ 📓 Automatic proxy configuration URL: https://auto.proxy.net/wpad.dat ◀ 
-loaded from the YAML file "config/03/config.yml"
-┗━━ 📓 Address for which proxy will be desactivated:
-    ┣━━ .example.net ◀ loaded from the YAML file "config/03/config.yml"
-    ┗━━ 192.168.1.0/24 ◀ loaded from the YAML file "config/03/config.yml"
+┣━━ 📓 Configure Proxy Access to the Internet: Manual proxy configuration ◀ 
+loaded from the YAML file "config/03/config.yml" (⏳ No proxy)
+┣━━ 📂 Manual proxy configuration
+┣━━ 📂 HTTP Proxy
+┣━━ 📓 HTTP address: http.proxy.net ◀ loaded from the YAML file 
+"config/03/config.yml"
+┗━━ 📓 HTTP Port: 8080
+┣━━ 📓 Also use this proxy for HTTPS: true
+┗━━ 📂 SOCKS Proxy
+    ┣━━ 📓 SOCKS address: http.proxy.net
+    ┣━━ 📓 SOCKS port: 8080
+    ┗━━ 📓 SOCKS host version used by proxy: v5
+┣━━ 📓 Address for which proxy will be desactivated: 
+┗━━ 📓 Prompt for authentication if password is saved: true
+
+### Example 4 + +#### config/04/config.yml + + +```yml +--- +proxy_mode: Manual proxy configuration +manual: + http_proxy: + address: http.proxy.net + socks_proxy: + version: v4 +``` +#### Output + +```shell +rougail -m firefox/ -u yaml -yf config/04/config.yml +``` +
╭─────────────────────────── Caption ────────────────────────────╮
+│ Variable                           Default value               │
+│ Undocumented but modified variable Modified value              │
+│                                    (⏳ Original default value) │
+╰────────────────────────────────────────────────────────────────╯
+Variables:
+┣━━ 📓 Configure Proxy Access to the Internet: Manual proxy configuration ◀ 
+loaded from the YAML file "config/04/config.yml" (⏳ No proxy)
+┣━━ 📂 Manual proxy configuration
+┣━━ 📂 HTTP Proxy
+┣━━ 📓 HTTP address: http.proxy.net ◀ loaded from the YAML file 
+"config/04/config.yml"
+┗━━ 📓 HTTP Port: 8080
+┣━━ 📓 Also use this proxy for HTTPS: true
+┗━━ 📂 SOCKS Proxy
+    ┣━━ 📓 SOCKS address: http.proxy.net
+    ┣━━ 📓 SOCKS port: 8080
+    ┗━━ 📓 SOCKS host version used by proxy: v4 ◀ loaded from the YAML file 
+        "config/04/config.yml" (⏳ v5)
+┣━━ 📓 Address for which proxy will be desactivated: 
+┗━━ 📓 Prompt for authentication if password is saved: true
 
-- [[tutorial v1.1_095] A conditional disabled boolean variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_095/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_095~1..v1.1_095)) +- [[tutorial v1.1_096] A boolean variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_096/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_096~1..v1.1_096)) diff --git a/config/02/config.yml b/config/02/config.yml index 307e175b..135d8b3a 100644 --- a/config/02/config.yml +++ b/config/02/config.yml @@ -1,3 +1,5 @@ --- -proxy_mode: Automatic proxy configuration URL -auto: https://auto.proxy.net/wpad.dat +proxy_mode: Manual proxy configuration +manual: + http_proxy: + address: http.proxy.net diff --git a/config/02/output_ro.html b/config/02/output_ro.html index cdfa5a40..c32818ac 100644 --- a/config/02/output_ro.html +++ b/config/02/output_ro.html @@ -1,11 +1,21 @@
╭─────────────────────────── Caption ────────────────────────────╮
+│ Variable                           Default value               │
 │ Undocumented but modified variable Modified value              │
 │                                    (⏳ Original default value) │
 ╰────────────────────────────────────────────────────────────────╯
 Variables:
-┣━━ 📓 Configure Proxy Access to the Internet: Automatic proxy configuration URL
-◀ loaded from the YAML file "config/02/config.yml" (⏳ No proxy)
-┣━━ 📓 Automatic proxy configuration URL: https://auto.proxy.net/wpad.dat ◀ 
-loaded from the YAML file "config/02/config.yml"
-┗━━ 📓 Address for which proxy will be desactivated: 
+┣━━ 📓 Configure Proxy Access to the Internet: Manual proxy configuration ◀ 
+loaded from the YAML file "config/02/config.yml" (⏳ No proxy)
+┣━━ 📂 Manual proxy configuration
+┣━━ 📂 HTTP Proxy
+┣━━ 📓 HTTP address: http.proxy.net ◀ loaded from the YAML file 
+"config/02/config.yml"
+┗━━ 📓 HTTP Port: 8080
+┣━━ 📓 Also use this proxy for HTTPS: true
+┗━━ 📂 SOCKS Proxy
+    ┣━━ 📓 SOCKS address: http.proxy.net
+    ┣━━ 📓 SOCKS port: 8080
+    ┗━━ 📓 SOCKS host version used by proxy: v5
+┣━━ 📓 Address for which proxy will be desactivated: 
+┗━━ 📓 Prompt for authentication if password is saved: true
 
diff --git a/config/03/config.yml b/config/03/config.yml index 53198970..d04e72ce 100644 --- a/config/03/config.yml +++ b/config/03/config.yml @@ -1,6 +1,6 @@ --- -proxy_mode: Automatic proxy configuration URL -auto: https://auto.proxy.net/wpad.dat -no_proxy: - - .example.net - - 192.168.1.0/24 +proxy_mode: Manual proxy configuration +manual: + http_proxy: + address: http.proxy.net +proxy_dns_socks5: true diff --git a/config/03/output_ro.html b/config/03/output_ro.html index 9cc4dbf6..14742562 100644 --- a/config/03/output_ro.html +++ b/config/03/output_ro.html @@ -1,13 +1,24 @@ -
╭─────────────────────────── Caption ────────────────────────────╮
+
🔔 WARNINGS
+┗━━ variable or family "proxy_dns_socks5" does not exist, it will be ignored 
+    when loading from the YAML file "config/03/config.yml"
+╭─────────────────────────── Caption ────────────────────────────╮
+│ Variable                           Default value               │
 │ Undocumented but modified variable Modified value              │
 │                                    (⏳ Original default value) │
 ╰────────────────────────────────────────────────────────────────╯
 Variables:
-┣━━ 📓 Configure Proxy Access to the Internet: Automatic proxy configuration URL
-◀ loaded from the YAML file "config/03/config.yml" (⏳ No proxy)
-┣━━ 📓 Automatic proxy configuration URL: https://auto.proxy.net/wpad.dat ◀ 
-loaded from the YAML file "config/03/config.yml"
-┗━━ 📓 Address for which proxy will be desactivated:
-    ┣━━ .example.net ◀ loaded from the YAML file "config/03/config.yml"
-    ┗━━ 192.168.1.0/24 ◀ loaded from the YAML file "config/03/config.yml"
+┣━━ 📓 Configure Proxy Access to the Internet: Manual proxy configuration ◀ 
+loaded from the YAML file "config/03/config.yml" (⏳ No proxy)
+┣━━ 📂 Manual proxy configuration
+┣━━ 📂 HTTP Proxy
+┣━━ 📓 HTTP address: http.proxy.net ◀ loaded from the YAML file 
+"config/03/config.yml"
+┗━━ 📓 HTTP Port: 8080
+┣━━ 📓 Also use this proxy for HTTPS: true
+┗━━ 📂 SOCKS Proxy
+    ┣━━ 📓 SOCKS address: http.proxy.net
+    ┣━━ 📓 SOCKS port: 8080
+    ┗━━ 📓 SOCKS host version used by proxy: v5
+┣━━ 📓 Address for which proxy will be desactivated: 
+┗━━ 📓 Prompt for authentication if password is saved: true
 
diff --git a/config/04/cmd_ro.txt b/config/04/cmd_ro.txt new file mode 100644 index 00000000..4d43eae1 --- /dev/null +++ b/config/04/cmd_ro.txt @@ -0,0 +1 @@ +rougail -m firefox/ -u yaml -yf config/04/config.yml \ No newline at end of file diff --git a/config/04/config.yml b/config/04/config.yml new file mode 100644 index 00000000..8ceca7bc --- /dev/null +++ b/config/04/config.yml @@ -0,0 +1,7 @@ +--- +proxy_mode: Manual proxy configuration +manual: + http_proxy: + address: http.proxy.net + socks_proxy: + version: v4 diff --git a/config/04/output_ro.html b/config/04/output_ro.html new file mode 100644 index 00000000..e9fc1484 --- /dev/null +++ b/config/04/output_ro.html @@ -0,0 +1,22 @@ +
╭─────────────────────────── Caption ────────────────────────────╮
+│ Variable                           Default value               │
+│ Undocumented but modified variable Modified value              │
+│                                    (⏳ Original default value) │
+╰────────────────────────────────────────────────────────────────╯
+Variables:
+┣━━ 📓 Configure Proxy Access to the Internet: Manual proxy configuration ◀ 
+loaded from the YAML file "config/04/config.yml" (⏳ No proxy)
+┣━━ 📂 Manual proxy configuration
+┣━━ 📂 HTTP Proxy
+┣━━ 📓 HTTP address: http.proxy.net ◀ loaded from the YAML file 
+"config/04/config.yml"
+┗━━ 📓 HTTP Port: 8080
+┣━━ 📓 Also use this proxy for HTTPS: true
+┗━━ 📂 SOCKS Proxy
+    ┣━━ 📓 SOCKS address: http.proxy.net
+    ┣━━ 📓 SOCKS port: 8080
+    ┗━━ 📓 SOCKS host version used by proxy: v4 ◀ loaded from the YAML file 
+        "config/04/config.yml" (⏳ v5)
+┣━━ 📓 Address for which proxy will be desactivated: 
+┗━━ 📓 Prompt for authentication if password is saved: true
+
diff --git a/firefox.png b/firefox.png index 16f5931c..34e6c084 100644 Binary files a/firefox.png and b/firefox.png differ diff --git a/tree.html b/tree.html index 2280a3d0..46fb8cbc 100644 --- a/tree.html +++ b/tree.html @@ -25,16 +25,17 @@

Directory Tree

- .
- └── firefox
-     ├── 00-proxy.yml
-     ├── 10-manual.yml
-     ├── 20-manual.yml
-     ├── 30-auto.yml
-     └── 40-no_proxy.yml
+ .
+ └── firefox
+     ├── 00-proxy.yml
+     ├── 10-manual.yml
+     ├── 20-manual.yml
+     ├── 30-auto.yml
+     ├── 40-no_proxy.yml
+     └── 50-prompt_authentication.yml


-2 directories, 5 files +2 directories, 6 files