diff --git a/CHANGELOG.md b/CHANGELOG.md index de43a07d..a1004a23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,5 @@ -# Modified variables +# New variable -| Variable | Description | -|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **manual.socks_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` *`disabled`* | SOCKS proxy 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**: 1080
**Disabled**: when the variable "[SOCKS proxy address](#manual.socks_proxy.address)" has the value "null". | -| **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 variable "[SOCKS proxy address](#manual.socks_proxy.address)" has the value "null". | +| 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". | diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 61718dbf..5aaca085 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -49,3 +49,7 @@ | **manual.socks_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) | SOCKS proxy address.
**Validators**:
• type domainname
• the domain name can be an IP | | **manual.socks_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` *`disabled`* | SOCKS proxy 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**: 1080
**Disabled**: when the variable "[SOCKS proxy address](#manual.socks_proxy.address)" has the value "null". | | **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 variable "[SOCKS proxy address](#manual.socks_proxy.address)" has the value "null". | + +| 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". | diff --git a/README.md b/README.md index 31c3d8df..01f2c41e 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ - [List of all the tutorial steps](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/branch/1.1/README.md) -- [[Previous tutorial v1.1_090] Variable with the value "null"](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_090/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_091~1..v1.1_091)) +- [[Previous tutorial v1.1_091] Variables disabled when condition is null](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_091/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_100~1..v1.1_100)) -# [tutorial v1.1_091] Variables disabled when condition is null +# [tutorial v1.1_100] A conditional disabled variable with type web_address -- [Read the tutorial "Variables disabled when condition is null" in the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/whatsnext.html#variables-disabled-when-condition-is-null) -- [View the changes in the files](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_091~1..v1.1_091) +- [Read the tutorial "A conditional disabled variable with type web_address" in the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/whatsnext.html#a-conditional-disabled-variable-with-type-web_address) +- [View the changes in the files](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_100~1..v1.1_100) ## Screenshot @@ -26,74 +26,36 @@ pip install rougail-cli rougail-output-exporter rougail-output-doc rougail-user- Then switch to the tutorial page: ```shell -git switch --detach v1.1_091 +git switch --detach v1.1_100 ``` ## Structure

-.
- ├── firefox
- │   ├── 00-proxy.yml
- │   ├── 10-manual.yml
- │   └── 20-manual.yml
- └── types
-     └── proxy
-         └── 00-type.yml
+.
+ ├── firefox
+ │   ├── 00-proxy.yml
+ │   ├── 10-manual.yml
+ │   ├── 20-manual.yml
+ │   └── 30-auto.yml
+ └── types
+     └── proxy
+         └── 00-type.yml


-Contents of the firefox/20-manual.yml file +Contents of the firefox/30-auto.yml file ```yml %YAML 1.2 --- version: 1.1 -manual: - - use_for_https: true # Also use this proxy for HTTPS - - https_proxy: - description: HTTPS Proxy - type: proxy - hidden: - variable: _.use_for_https - - address: - redefine: true - description: HTTPS proxy address - - port: - redefine: true - description: HTTPS proxy port - - socks_proxy: - description: SOCKS Proxy - type: proxy - - address: - redefine: true - description: SOCKS proxy address - default: null - mandatory: false - - port: - redefine: true - description: SOCKS proxy port - default: 1080 - disabled: - variable: _.address - when: null - - version: - description: SOCKS host version used by proxy - choices: - - v4 - - v5 - default: v5 - disabled: - variable: _.address - when: null +auto: + description: Automatic proxy configuration URL + type: web_address + disabled: + variable: _.proxy_mode + when_not: Automatic proxy configuration URL ... ``` @@ -125,10 +87,7 @@ rougail -m firefox/ --types types/proxy -o doc --doc.contents changelog --doc.ch ```yml --- -proxy_mode: Manual proxy configuration -manual: - http_proxy: - address: http.proxy.net +auto: https://auto.proxy.net/wpad.dat ``` *** @@ -137,27 +96,18 @@ manual: ```shell rougail -m firefox/ --types types/proxy -u yaml -yf config/01/config.yml ``` +> [!WARNING] +> +> - auto (Automatic proxy configuration URL): :bell: variable has property disabled, it will be ignored when loading from the YAML file "config/01/config.yml" + > [!NOTE] > > **Caption:** > - Variable -> - Unmodifiable variable > - Default value -> - Modified value -> - (:hourglass_flowing_sand: Original default value) Variables: -- :notebook: proxy_mode (Configure Proxy Access to the Internet): Manual proxy configuration ← loaded from the YAML file "config/01/config.yml" (:hourglass_flowing_sand: No proxy) -- :open_file_folder: manual (Manual proxy configuration) - - :open_file_folder: http_proxy (HTTP Proxy) - - :notebook: address (HTTP proxy address): http.proxy.net ← loaded from the YAML file "config/01/config.yml" - - :notebook: port (HTTP proxy port): 8080 - - :notebook: use_for_https (Also use this proxy for HTTPS): true - - :open_file_folder: https_proxy (HTTPS Proxy) - - :notebook: address (HTTPS proxy address): http.proxy.net - - :notebook: port (HTTPS proxy port): 8080 - - :open_file_folder: socks_proxy (SOCKS Proxy) - - :notebook: address (SOCKS proxy address): null +- :notebook: proxy_mode (Configure Proxy Access to the Internet): No proxy *** ### Example 2 @@ -167,12 +117,7 @@ Variables: ```yml --- -proxy_mode: Manual proxy configuration -manual: - http_proxy: - address: http.proxy.net - socks_proxy: - adress: socks.proxy.net +proxy_mode: Automatic proxy configuration URL ``` *** @@ -181,34 +126,40 @@ manual: ```shell rougail -m firefox/ --types types/proxy -u yaml -yf config/02/config.yml ``` -> [!WARNING] +> [!CAUTION] > -> - manual (Manual proxy configuration) -> - socks_proxy (SOCKS Proxy): :bell: variable or family "adress" does not exist so cannot load "manual.socks_proxy.adress", it will be ignored when loading from the YAML file "config/02/config.yml" +> - auto (Automatic proxy configuration URL): :stop_sign: mandatory variable but has no value +*** +### Example 3 + +#### config/03/config.yml + + +```yml +--- +proxy_mode: Automatic proxy configuration URL +auto: https://auto.proxy.net/wpad.dat +``` + +*** +#### Output + +```shell +rougail -m firefox/ --types types/proxy -u yaml -yf config/03/config.yml +``` > [!NOTE] > > **Caption:** > - Variable -> - Unmodifiable variable -> - Default value > - Modified value > - (:hourglass_flowing_sand: Original default value) Variables: -- :notebook: proxy_mode (Configure Proxy Access to the Internet): Manual proxy configuration ← loaded from the YAML file "config/02/config.yml" (:hourglass_flowing_sand: No proxy) -- :open_file_folder: manual (Manual proxy configuration) - - :open_file_folder: http_proxy (HTTP Proxy) - - :notebook: address (HTTP proxy address): http.proxy.net ← loaded from the YAML file "config/02/config.yml" - - :notebook: port (HTTP proxy port): 8080 - - :notebook: use_for_https (Also use this proxy for HTTPS): true - - :open_file_folder: https_proxy (HTTPS Proxy) - - :notebook: address (HTTPS proxy address): http.proxy.net - - :notebook: port (HTTPS proxy port): 8080 - - :open_file_folder: socks_proxy (SOCKS Proxy) - - :notebook: address (SOCKS proxy address): null +- :notebook: proxy_mode (Configure Proxy Access to the Internet): Automatic proxy configuration URL ← loaded from the YAML file "config/03/config.yml" (:hourglass_flowing_sand: No proxy) +- :notebook: auto (Automatic proxy configuration URL): https://auto.proxy.net/wpad.dat ← loaded from the YAML file "config/03/config.yml" *** -- [[Next tutorial v1.1_100] A conditional disabled variable with type web_address](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_100/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_100~1..v1.1_100)) +- [[Next tutorial v1.1_110] A conditional disabled non mandatory variable with type domainname and parameters](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_110/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_110~1..v1.1_110)) diff --git a/config/01/config.yml b/config/01/config.yml index 135d8b3a..1edbe913 100644 --- a/config/01/config.yml +++ b/config/01/config.yml @@ -1,5 +1,2 @@ --- -proxy_mode: Manual proxy configuration -manual: - http_proxy: - address: http.proxy.net +auto: https://auto.proxy.net/wpad.dat diff --git a/config/01/output_ro.html b/config/01/output_ro.html index ae974ea7..7f2d1085 100644 --- a/config/01/output_ro.html +++ b/config/01/output_ro.html @@ -1,21 +1,10 @@ -
╭───────────────────── Caption ─────────────────────╮
-│ Variable              Default value               │
-│ Unmodifiable variable Modified value              │
-│                       (⏳ Original default value) │
-╰───────────────────────────────────────────────────╯
+
🔔 Warning
+┗━━ auto (Automatic proxy configuration URL): 🔔 variable has property disabled,
+    it will be ignored when loading from the YAML file "config/01/config.yml"
+
+╭─────── Caption ────────╮
+│ Variable Default value │
+╰────────────────────────╯
 Variables:
-┣━━ 📓 proxy_mode (Configure Proxy Access to the Internet): Manual proxy 
-configuration ◀ loaded from the YAML file "config/01/config.yml" (⏳ No 
-proxy)
-┗━━ 📂 manual (Manual proxy configuration)
-    ┣━━ 📂 http_proxy (HTTP Proxy)
-    ┣━━ 📓 address (HTTP proxy address): http.proxy.net ◀ loaded from the 
-    YAML file "config/01/config.yml"
-    ┗━━ 📓 port (HTTP proxy port): 8080
-    ┣━━ 📓 use_for_https (Also use this proxy for HTTPS): true
-    ┣━━ 📂 https_proxy (HTTPS Proxy)
-    ┣━━ 📓 address (HTTPS proxy address): http.proxy.net
-    ┗━━ 📓 port (HTTPS proxy port): 8080
-    ┗━━ 📂 socks_proxy (SOCKS Proxy)
-        ┗━━ 📓 address (SOCKS proxy address): null
+┗━━ 📓 proxy_mode (Configure Proxy Access to the Internet): No proxy
 
diff --git a/config/02/config.yml b/config/02/config.yml index 6615aaf9..26df1306 100644 --- a/config/02/config.yml +++ b/config/02/config.yml @@ -1,7 +1,2 @@ --- -proxy_mode: Manual proxy configuration -manual: - http_proxy: - address: http.proxy.net - socks_proxy: - adress: socks.proxy.net +proxy_mode: Automatic proxy configuration URL diff --git a/config/02/output_ro.html b/config/02/output_ro.html index fc567655..3f84fbd9 100644 --- a/config/02/output_ro.html +++ b/config/02/output_ro.html @@ -1,27 +1,4 @@ -
🔔 Warning
-┗━━ manual (Manual proxy configuration)
-    ┗━━ socks_proxy (SOCKS Proxy): 🔔 variable or family "adress" does not exist
-        so cannot load "manual.socks_proxy.adress", it will be ignored when 
-        loading from the YAML file "config/02/config.yml"
-
-╭───────────────────── Caption ─────────────────────╮
-│ Variable              Default value               │
-│ Unmodifiable variable Modified value              │
-│                       (⏳ Original default value) │
-╰───────────────────────────────────────────────────╯
-Variables:
-┣━━ 📓 proxy_mode (Configure Proxy Access to the Internet): Manual proxy 
-configuration ◀ loaded from the YAML file "config/02/config.yml" (⏳ No 
-proxy)
-┗━━ 📂 manual (Manual proxy configuration)
-    ┣━━ 📂 http_proxy (HTTP Proxy)
-    ┣━━ 📓 address (HTTP proxy address): http.proxy.net ◀ loaded from the 
-    YAML file "config/02/config.yml"
-    ┗━━ 📓 port (HTTP proxy port): 8080
-    ┣━━ 📓 use_for_https (Also use this proxy for HTTPS): true
-    ┣━━ 📂 https_proxy (HTTPS Proxy)
-    ┣━━ 📓 address (HTTPS proxy address): http.proxy.net
-    ┗━━ 📓 port (HTTPS proxy port): 8080
-    ┗━━ 📂 socks_proxy (SOCKS Proxy)
-        ┗━━ 📓 address (SOCKS proxy address): null
+
🛑 Caution
+┗━━ auto (Automatic proxy configuration URL): 🛑 mandatory variable but has no 
+    value
 
diff --git a/config/03/cmd_ro.txt b/config/03/cmd_ro.txt new file mode 100644 index 00000000..3c55adcb --- /dev/null +++ b/config/03/cmd_ro.txt @@ -0,0 +1 @@ +rougail -m firefox/ --types types/proxy -u yaml -yf config/03/config.yml \ No newline at end of file diff --git a/config/03/config.yml b/config/03/config.yml new file mode 100644 index 00000000..307e175b --- /dev/null +++ b/config/03/config.yml @@ -0,0 +1,3 @@ +--- +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 new file mode 100644 index 00000000..7fe00597 --- /dev/null +++ b/config/03/output_ro.html @@ -0,0 +1,11 @@ +
╭────────────── Caption ───────────────╮
+│ Variable Modified value              │
+│          (⏳ Original default value) │
+╰──────────────────────────────────────╯
+Variables:
+┣━━ 📓 proxy_mode (Configure Proxy Access to the Internet): Automatic proxy 
+configuration URL ◀ loaded from the YAML file "config/03/config.yml" (⏳ No 
+proxy)
+┗━━ 📓 auto (Automatic proxy configuration URL): https://auto.proxy.net/wpad.dat
+    ◀ loaded from the YAML file "config/03/config.yml"
+
diff --git a/firefox.png b/firefox.png index b7ca7aa0..d53e5138 100644 Binary files a/firefox.png and b/firefox.png differ diff --git a/tree.html b/tree.html index e5b4f703..a24e18c0 100644 --- a/tree.html +++ b/tree.html @@ -1,10 +1,11 @@

-.
- ├── firefox
- │   ├── 00-proxy.yml
- │   ├── 10-manual.yml
- │   └── 20-manual.yml
- └── types
-     └── proxy
-         └── 00-type.yml
+.
+ ├── firefox
+ │   ├── 00-proxy.yml
+ │   ├── 10-manual.yml
+ │   ├── 20-manual.yml
+ │   └── 30-auto.yml
+ └── types
+     └── proxy
+         └── 00-type.yml


\ No newline at end of file