diff --git a/README.md b/README.md
index ef8168c4..b79a16b4 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 v1.1_073] Jinja could returns a boolean](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_073/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_080~1..v1.1_080))
+- [[tutorial v1.1_080] HTTP Proxy with "proxy" type](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_081~1..v1.1_081))
-# [tutorial v1.1_080] HTTP Proxy with "proxy" type
+# [tutorial v1.1_081] HTTPS and SOCKS Proxy
-[Read the tutorial "HTTP Proxy with "proxy" type" in the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/jinja.html#http-proxy-with-proxy-type)
+[Read the tutorial "HTTPS and SOCKS Proxy" in the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/jinja.html#https-and-socks-proxy)
## Screenshot
@@ -29,7 +29,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_080
+git switch --detach v1.1_081
```
## Structure
@@ -37,14 +37,14 @@ git switch --detach v1.1_080
-.
- ├── 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
+ └── types
+ └── proxy
+ └── 00_type.yml
Contents of the firefox/20-manual.yml file
@@ -58,39 +58,30 @@ manual:
use_for_https: true # Also use this proxy for HTTPS
- '{{ identifier }}_proxy':
- description: '{{ identifier }} Proxy'
+ https_proxy:
+ description: HTTPS Proxy
+ type: proxy
hidden:
- jinja: |-
- {{ my_identifier == 'HTTPS' and _.use_for_https }}
- return_type: boolean
- description: in HTTPS case if "_.use_for_https" is set to "true"
- params:
- my_identifier:
- type: identifier
- dynamic:
- - HTTPS
- - SOCKS
+ variable: _.use_for_https
address:
- description: '{{ identifier }} address'
default:
variable: __.http_proxy.address
port:
- description: '{{ identifier }} port'
default:
variable: __.http_proxy.port
+ socks_proxy:
+ description: SOCKS Proxy
+ type: proxy
+
version:
description: SOCKS host version used by proxy
choices:
- v4
- v5
default: v5
- disabled:
- type: identifier
- when: HTTPS
...
```
@@ -128,25 +119,30 @@ rougail -m firefox/ --types types/proxy -o doc
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------|
| **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
+##### HTTPS Proxy
> [!NOTE]
>
-> This family builds families dynamically.\
-> **Path**:
-> - manual.*https*_proxy
-> - manual.*socks*_proxy\
+> **Path**: manual.https_proxy\
> *`hidden`*\
-> **Hidden**: in HTTPS case if "[Also use this proxy for HTTPS](#manual.use_for_https)" is set to "true"\
-> **Identifiers**:
-> - HTTPS
-> - SOCKS
+> **Hidden**: when the variable "[Also use this proxy for HTTPS](#manual.use_for_https)" has the value "true"
-| Variable | Description |
-|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| **manual.*https*_proxy.address**
**manual.*socks*_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | *HTTPS* or *SOCKS* address.
**Validators**:
• type domainname
• the domain name can be an IP
**Default**: the value of the variable "[Proxy address](#manual.http_proxy.address)" |
-| **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 "[Proxy port](#manual.http_proxy.port)" |
-| **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**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy address.
**Validators**:
• type domainname
• the domain name can be an IP
**Default**: the value of the variable "[Proxy address](#manual.http_proxy.address)" |
+| **manual.https_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | 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**: the value of the variable "[Proxy port](#manual.http_proxy.port)" |
+
+##### SOCKS Proxy
+
+> [!NOTE]
+>
+> **Path**: manual.socks_proxy
+
+| Variable | Description |
+|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| **manual.socks_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | 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` | 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**: 8080 |
+| **manual.socks_proxy.version**
[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | SOCKS host version used by proxy.
**Choices**:
• v4
• v5 **← (default)** |
***
@@ -155,16 +151,24 @@ rougail -m firefox/ --types types/proxy -o doc
```shell
rougail -m firefox/ --types types/proxy -o doc --doc.contents changelog --doc.changelog.previous_json_file previous.yml
```
-#### Modified variables
+#### New variables
-| Variable | Description |
-|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| **manual.http_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | ~~HTTP address.~~
Proxy address.
**Validators**:
• type domainname
• 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.~~
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**: 8080 |
-| **manual.*https*_proxy.address**
**manual.*socks*_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | *HTTPS* or *SOCKS* address.
**Validators**:
• type domainname
• the domain name can be an IP
**Default**: ~~the value of the variable "[HTTP address](#manual.http_proxy.address)"~~
the value of the variable "[Proxy address](#manual.http_proxy.address)" |
-| **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)"~~
the value of the variable "[Proxy port](#manual.http_proxy.port)" |
+| Variable | Description |
+|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| **manual.https_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Proxy address.
**Validators**:
• type domainname
• the domain name can be an IP
**Default**: the value of the variable "[Proxy address](#manual.http_proxy.address)" |
+| **manual.https_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | 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**: the value of the variable "[Proxy port](#manual.http_proxy.port)" |
+| **manual.socks_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | 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` | 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**: 8080 |
+| **manual.socks_proxy.version**
[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | SOCKS host version used by proxy.
**Choices**:
• v4
• v5 **← (default)** |
+
+#### Deleted variables
+- manual.*https*_proxy.address
+- manual.*socks*_proxy.address
+- manual.*https*_proxy.port
+- manual.*socks*_proxy.port
+- manual.*socks*_proxy.version
***
## User datas
@@ -191,30 +195,13 @@ manual:
```shell
rougail -m firefox/ --types types/proxy -u yaml -yf config/01/config.yml
```
-> [!NOTE]
->
-> **Caption:**
-> - 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 (Proxy address): http.proxy.net ← loaded from the YAML file "config/01/config.yml"
- - :notebook: port (Proxy port): 3128 ← loaded from the YAML file "config/01/config.yml" (:hourglass_flowing_sand: 8080)
- - :notebook: use_for_https (Also use this proxy for HTTPS): false ← loaded from the YAML file "config/01/config.yml" (:hourglass_flowing_sand: true)
- - :open_file_folder: https_proxy (HTTPS Proxy)
- - :notebook: address (HTTPS address): https.proxy.net ← loaded from the YAML file "config/01/config.yml" (:hourglass_flowing_sand: http.proxy.net)
- - :notebook: port (HTTPS port): 3128
- - :open_file_folder: socks_proxy (SOCKS Proxy)
- - :notebook: address (SOCKS address): http.proxy.net
- - :notebook: port (SOCKS port): 3128
- - :notebook: version (SOCKS host version used by proxy): v5
+> [!CAUTION]
+>
+> - manual (Manual proxy configuration)
+> - socks_proxy (SOCKS Proxy)
+> - address (Proxy address): :stop_sign: mandatory variable but has no value
***
-- [[tutorial v1.1_081] HTTPS and SOCKS Proxy](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_081/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_081~1..v1.1_081))
+- [[tutorial v1.1_090] A conditional disabled variable with type web_address](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_090~1..v1.1_090))
diff --git a/config/01/output_ro.html b/config/01/output_ro.html
index 70bc25c3..26749f46 100644
--- a/config/01/output_ro.html
+++ b/config/01/output_ro.html
@@ -1,26 +1,5 @@
-╭────────────── Caption ───────────────╮
-│ Variable Default value │
-│ Modified value │
-│ (⏳ Original 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 (Proxy address): http.proxy.net ◀ loaded from the YAML
- ┃ ┃ file "config/01/config.yml"
- ┃ ┗━━ 📓 port (Proxy port): 3128 ◀ loaded from the YAML file
- ┃ "config/01/config.yml" (⏳ 8080)
- ┣━━ 📓 use_for_https (Also use this proxy for HTTPS): false ◀ loaded from
- ┃ the YAML file "config/01/config.yml" (⏳ true)
- ┣━━ 📂 https_proxy (HTTPS Proxy)
- ┃ ┣━━ 📓 address (HTTPS address): https.proxy.net ◀ loaded from the YAML
- ┃ ┃ file "config/01/config.yml" (⏳ http.proxy.net)
- ┃ ┗━━ 📓 port (HTTPS port): 3128
- ┗━━ 📂 socks_proxy (SOCKS Proxy)
- ┣━━ 📓 address (SOCKS address): http.proxy.net
- ┣━━ 📓 port (SOCKS port): 3128
- ┗━━ 📓 version (SOCKS host version used by proxy): v5
+🛑 Caution
+┗━━ manual (Manual proxy configuration)
+ ┗━━ socks_proxy (SOCKS Proxy)
+ ┗━━ address (Proxy address): 🛑 mandatory variable but has no value
diff --git a/tree.html b/tree.html
index f6fe3de6..af46ccfb 100644
--- a/tree.html
+++ b/tree.html
@@ -1,10 +1,10 @@
-.
- ├── 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
+ └── types
+ └── proxy
+ └── 00_type.yml
\ No newline at end of file