From 9ca4fb18218f64411a8f27abeb91347ff16d0698 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Wed, 23 Oct 2024 20:01:24 +0200 Subject: [PATCH] [tutorial 026] A variable with type "port" (config and doc) --- README.md | 49 ++++++++++++++++++++++++---------------- config/03/output_ro.html | 3 ++- config/03/output_rw.html | 3 ++- config/04/output_ro.html | 7 +++--- config/04/output_rw.html | 3 ++- config/05/output_ro.html | 4 ++-- config/05/output_rw.html | 3 ++- 7 files changed, 42 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index fb69374..b93d1de 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 024] A variable with type "domainname"](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_024/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_024~1..v1.1_024)) +- [[tutorial 025] A variable with type's parameters](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_025/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_025~1..v1.1_025)) -# [tutorial 025] A variable with type's parameters +# [tutorial 026] A variable with type "port" -[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_025~1..v1.1_025) +[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_026~1..v1.1_026) ## Screenshot @@ -48,6 +48,11 @@ manual: params: allow_ip: true + port: + description: HTTP Port + type: port + default: 8080 + ``` ### Generated documentation @@ -56,17 +61,18 @@ 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 ##### 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 | +| 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 | ## User data @@ -155,7 +161,8 @@ Variables: ┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy) ┗━━ 📂 manual ┗━━ 📂 http_proxy - ┗━━ 📓 address: example.net + ┣━━ 📓 address: example.net + ┗━━ 📓 port: 8080 #### Output in read write mode @@ -171,7 +178,8 @@ Variables: ┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy) ┗━━ 📂 manual ┗━━ 📂 http_proxy - ┗━━ 📓 address: example.net + ┣━━ 📓 address: example.net + ┗━━ 📓 port: 8080 ### Example 4 @@ -193,9 +201,7 @@ manual: ```console foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/04/config.yaml ``` -
🛑 ERRORS
-┗━━ unknown option "port" in optiondescription "manual.http_proxy" (HTTP Proxy)
-╭────────────────────────── Caption ──────────────────────────╮
+
╭────────────────────────── Caption ──────────────────────────╮
 │ Variable                           Default value            │
 │ Undocumented variable              Modified value           │
 │ Undocumented but modified variable (Original default value) │
@@ -204,7 +210,8 @@ Variables:
 ┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
 ┗━━ 📂 manual
     ┗━━ 📂 http_proxy
-        ┗━━ 📓 address: example.net
+        ┣━━ 📓 address: example.net
+        ┗━━ 📓 port: 3128 (8080)
 
#### Output in read write mode @@ -220,7 +227,8 @@ Variables: ┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy) ┗━━ 📂 manual ┗━━ 📂 http_proxy - ┗━━ 📓 address: example.net + ┣━━ 📓 address: example.net + ┗━━ 📓 port: 3128 (8080)
### Example 5 @@ -246,7 +254,6 @@ manual: foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/05/config.yaml ```
🛑 ERRORS
-┣━━ unknown option "port" in optiondescription "manual.http_proxy" (HTTP Proxy)
 ┣━━ unknown option "use_for_https" in optiondescription "manual" (Manual proxy configuration)
 ┗━━ unknown option "https_proxy" in optiondescription "manual" (Manual proxy configuration)
 ╭────────────────────────── Caption ──────────────────────────╮
@@ -258,7 +265,8 @@ Variables:
 ┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
 ┗━━ 📂 manual
     ┗━━ 📂 http_proxy
-        ┗━━ 📓 address: http.proxy.net
+        ┣━━ 📓 address: http.proxy.net
+        ┗━━ 📓 port: 3128 (8080)
 
#### Output in read write mode @@ -274,9 +282,10 @@ Variables: ┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy) ┗━━ 📂 manual ┗━━ 📂 http_proxy - ┗━━ 📓 address: http.proxy.net + ┣━━ 📓 address: http.proxy.net + ┗━━ 📓 port: 3128 (8080) -- [[tutorial 026] A variable with type "port"](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_026/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_026~1..v1.1_026)) +- [[tutorial 027] A disabled family](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_027/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_027~1..v1.1_027)) diff --git a/config/03/output_ro.html b/config/03/output_ro.html index 9ea732e..9a3ff4f 100644 --- a/config/03/output_ro.html +++ b/config/03/output_ro.html @@ -7,5 +7,6 @@ Variables: ┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy) ┗━━ 📂 manual ┗━━ 📂 http_proxy - ┗━━ 📓 address: example.net + ┣━━ 📓 address: example.net + ┗━━ 📓 port: 8080 diff --git a/config/03/output_rw.html b/config/03/output_rw.html index 9ea732e..9a3ff4f 100644 --- a/config/03/output_rw.html +++ b/config/03/output_rw.html @@ -7,5 +7,6 @@ Variables: ┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy) ┗━━ 📂 manual ┗━━ 📂 http_proxy - ┗━━ 📓 address: example.net + ┣━━ 📓 address: example.net + ┗━━ 📓 port: 8080 diff --git a/config/04/output_ro.html b/config/04/output_ro.html index b07fec9..56d3640 100644 --- a/config/04/output_ro.html +++ b/config/04/output_ro.html @@ -1,6 +1,4 @@ -
🛑 ERRORS
-┗━━ unknown option "port" in optiondescription "manual.http_proxy" (HTTP Proxy)
-╭────────────────────────── Caption ──────────────────────────╮
+
╭────────────────────────── Caption ──────────────────────────╮
 │ Variable                           Default value            │
 │ Undocumented variable              Modified value           │
 │ Undocumented but modified variable (Original default value) │
@@ -9,5 +7,6 @@ Variables:
 ┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
 ┗━━ 📂 manual
     ┗━━ 📂 http_proxy
-        ┗━━ 📓 address: example.net
+        ┣━━ 📓 address: example.net
+        ┗━━ 📓 port: 3128 (8080)
 
diff --git a/config/04/output_rw.html b/config/04/output_rw.html index 9ea732e..56d3640 100644 --- a/config/04/output_rw.html +++ b/config/04/output_rw.html @@ -7,5 +7,6 @@ Variables: ┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy) ┗━━ 📂 manual ┗━━ 📂 http_proxy - ┗━━ 📓 address: example.net + ┣━━ 📓 address: example.net + ┗━━ 📓 port: 3128 (8080)
diff --git a/config/05/output_ro.html b/config/05/output_ro.html index 4f8e0ee..984844a 100644 --- a/config/05/output_ro.html +++ b/config/05/output_ro.html @@ -1,5 +1,4 @@
🛑 ERRORS
-┣━━ unknown option "port" in optiondescription "manual.http_proxy" (HTTP Proxy)
 ┣━━ unknown option "use_for_https" in optiondescription "manual" (Manual proxy configuration)
 ┗━━ unknown option "https_proxy" in optiondescription "manual" (Manual proxy configuration)
 ╭────────────────────────── Caption ──────────────────────────╮
@@ -11,5 +10,6 @@ Variables:
 ┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
 ┗━━ 📂 manual
     ┗━━ 📂 http_proxy
-        ┗━━ 📓 address: http.proxy.net
+        ┣━━ 📓 address: http.proxy.net
+        ┗━━ 📓 port: 3128 (8080)
 
diff --git a/config/05/output_rw.html b/config/05/output_rw.html index f810fdc..ec2ef0c 100644 --- a/config/05/output_rw.html +++ b/config/05/output_rw.html @@ -7,5 +7,6 @@ Variables: ┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy) ┗━━ 📂 manual ┗━━ 📂 http_proxy - ┗━━ 📓 address: http.proxy.net + ┣━━ 📓 address: http.proxy.net + ┗━━ 📓 port: 3128 (8080)