custom type update

This commit is contained in:
gwen 2026-03-23 18:18:24 +01:00
parent 847205938d
commit 3293800c4c

View file

@ -110,6 +110,15 @@ Here, we will declare that a family is of type `proxy` as follows:
... ...
We can see that the type declared for the `http_proxy` family is `type: proxy`. Very simple. We can see that the type declared for the `http_proxy` family is `type: proxy`. Very simple.
For example in the `address` it is not necessary to specify the `domainname` type nor the `allow_ip` parameter:
.. code-block:: yaml
:caption: We can omit this now due to the type definition
description: HTTP address
type: domainname
params:
allow_ip: true
So we have declared our new type. How do we make it available? Well, the Rougail CLI has a `--types` type declaration command line option. So we have declared our new type. How do we make it available? Well, the Rougail CLI has a `--types` type declaration command line option.
Let's launch the rougail CLI: Let's launch the rougail CLI:
@ -118,42 +127,17 @@ Let's launch the rougail CLI:
:url: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_080/config/01/cmd_ro.txt :url: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_080/config/01/cmd_ro.txt
:class: terminal :class: terminal
The output is: The CLI output is entirely standard and does not specifically mention the call to a new type.
The result is the same as usual, as if the type declaration were omitted, which is what we want.
We want the same behavior.
.. raw:: html .. raw:: html
:url: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_080/config/01/output_ro.html :url: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_080/config/01/output_ro.html
:class: output :class: output
TODO:
::
- la notion de type vient de la déclaration ligne de commande --type
rougail -m firefox/ --types types/proxy -u yaml -yf config/01/config.yml
- le fichier firefox/10-manual.yml a des changements
https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_080~1..v1.1_080
dégraissage dû à la déclaration de type
- la déclaration de type ne se voit pas
Variables:
┣━━ 📓 Configure Proxy Access to the Internet: Manual proxy configuration ◀ loaded from the YAML file "config/01/config.yml" (⏳ No proxy)
┗━━ 📂 Manual proxy configuration
┣━━ 📂 HTTP Proxy
┃ ┣━━ 📓 Proxy address: http.proxy.net ◀ loaded from the YAML file "config/01/config.yml"
┃ ┗━━ 📓 Proxy port: 3128 ◀ loaded from the YAML file "config/01/config.yml" (⏳ 8080)
┣━━ 📓 Also use this proxy for HTTPS: false ◀ loaded from the YAML file "config/01/config.yml" (⏳ true)
┣━━ 📂 HTTPS Proxy
┃ ┣━━ 📓 HTTPS address: https.proxy.net ◀ loaded from the YAML file "config/01/config.yml" (⏳ http.proxy.net)
┃ ┗━━ 📓 HTTPS port: 3128
┗━━ 📂 SOCKS Proxy
┣━━ 📓 SOCKS address: http.proxy.net
┣━━ 📓 SOCKS port: 3128
┗━━ 📓 SOCKS host version used by proxy: v5
.. keypoints:: Key points .. keypoints:: Key points
- type declaration - type declaration
- type usage - type usage
-