diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..dca1b1fa --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,8 @@ +# Modified 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)". | diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 95cdc15f..7e32e902 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -16,10 +16,10 @@ > > **Path**: manual.http_proxy -| Variable | Description | -|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **manual.http_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTP 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.
**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 | +| Variable | Description | +|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **manual.http_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.http_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 | | Variable | Description | |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------| @@ -41,8 +41,8 @@ > - SOCKS -| 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 "[HTTP 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)". | -| **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**
**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". | diff --git a/README.md b/README.md index cc3ca7e3..bc12ccea 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_072] Jinja with a parameter](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_072/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_073~1..v1.1_073)) +- [[Previous 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_073] Jinja could returns a boolean +# [tutorial v1.1_080] HTTP Proxy with "proxy" type -- [Read the tutorial "Jinja could returns a boolean" in the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/jinja.html#jinja-could-returns-a-boolean) -- [View the changes in the files](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_073~1..v1.1_073) +- [Read the tutorial "HTTP Proxy with "proxy" type" in the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/customtype.html#http-proxy-with-proxy-type) +- [View the changes in the files](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_080~1..v1.1_080) ## Screenshot @@ -26,20 +26,47 @@ pip install rougail-cli rougail-output-exporter rougail-output-doc rougail-user- Then switch to the tutorial page: ```shell -git switch --detach v1.1_073 +git switch --detach v1.1_080 ``` ## Structure

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


-Contents of the firefox/20-manual.yml file +Contents of the types/proxy/00-type.yml type file + +```yml +%YAML 1.2 +--- +version: 1.1 + +proxy: + + address: + description: Proxy address + type: domainname + params: + allow_ip: true + + port: + description: Proxy port + type: port + default: 8080 +... + +``` + +*** +Contents of the firefox/10-manual.yml file ```yml %YAML 1.2 @@ -47,42 +74,14 @@ Contents of the firefox/20-manual.yml file version: 1.1 manual: + description: Manual proxy configuration + disabled: + variable: _.proxy_mode + when_not: Manual proxy configuration - use_for_https: true # Also use this proxy for HTTPS - - '{{ identifier }}_proxy': - description: '{{ identifier }} 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 - - address: - description: '{{ identifier }} address' - default: - variable: __.http_proxy.address - - port: - description: '{{ identifier }} port' - default: - variable: __.http_proxy.port - - version: - description: SOCKS host version used by proxy - choices: - - v4 - - v5 - default: v5 - disabled: - type: identifier - when: HTTPS + http_proxy: + description: HTTP Proxy + type: proxy ... ``` @@ -91,11 +90,19 @@ manual: ### Let's generate the documentation ```shell -rougail -m firefox/ -o doc +rougail -m firefox/ --types types/proxy -o doc ``` [View the documentation file](DOCUMENTATION.md) +*** +### Let's generate the changelog + +```shell +rougail -m firefox/ --types types/proxy -o doc --doc.contents changelog --doc.changelog.previous_json_file previous.yml +``` +[View the changelog file](CHANGELOG.md) + *** ## User datas @@ -120,7 +127,7 @@ manual: #### Output ```shell -rougail -m firefox/ -u yaml -yf config/01/config.yml +rougail -m firefox/ --types types/proxy -u yaml -yf config/01/config.yml ``` > [!NOTE] > @@ -134,8 +141,8 @@ 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 address): http.proxy.net ← loaded from the YAML file "config/01/config.yml" - - :notebook: port (HTTP Port): 3128 ← loaded from the YAML file "config/01/config.yml" (:hourglass_flowing_sand: 8080) + - :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) @@ -148,4 +155,4 @@ Variables: *** -- [[Next 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_080~1..v1.1_080)) +- [[Next tutorial v1.1_081] HTTPS and SOCKS Proxy with "proxy" type](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)) diff --git a/config/01/cmd_ro.txt b/config/01/cmd_ro.txt index d46f9445..d102ed75 100644 --- a/config/01/cmd_ro.txt +++ b/config/01/cmd_ro.txt @@ -1 +1 @@ -rougail -m firefox/ -u yaml -yf config/01/config.yml \ No newline at end of file +rougail -m firefox/ --types types/proxy -u yaml -yf config/01/config.yml \ No newline at end of file diff --git a/config/01/output_ro.html b/config/01/output_ro.html index 1dcf1c82..70bc25c3 100644 --- a/config/01/output_ro.html +++ b/config/01/output_ro.html @@ -9,9 +9,9 @@ Variables: proxy) ┗━━ 📂 manual (Manual proxy configuration) ┣━━ 📂 http_proxy (HTTP Proxy) - ┣━━ 📓 address (HTTP address): http.proxy.net ◀ loaded from the YAML + ┣━━ 📓 address (Proxy address): http.proxy.net ◀ loaded from the YAML file "config/01/config.yml" - ┗━━ 📓 port (HTTP Port): 3128 ◀ loaded from the YAML file + ┗━━ 📓 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) diff --git a/tree.html b/tree.html index c3fc914e..74185fe8 100644 --- a/tree.html +++ b/tree.html @@ -1,7 +1,10 @@

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


\ No newline at end of file