From 0cb13e0bfd570dae614e5ae11cb4b0ea4b8ff917 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Sun, 3 May 2026 18:01:08 +0200 Subject: [PATCH] [tutorial v1.1_085] Redefine other parameter in custom type for HTTPS et SOCKS (config and doc) --- CHANGELOG.md | 14 +++--- DOCUMENTATION.md | 18 +++---- README.md | 100 ++++++++++++++++++--------------------- config/01/output_ro.html | 10 ++-- tree.html | 16 +++---- 5 files changed, 74 insertions(+), 84 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cdbf6889..3e456c58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,8 @@ # Modified variables -| Variable | Description | -|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **manual.http_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | ~~Proxy address.~~
HTTP 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.~~
HTTP 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**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | **Validators**:
• type domainname
• the domain name can be an IP
**Default**: ~~the value of the variable "[Proxy address](#manual.http_proxy.address)".~~
the value of the variable "[HTTP proxy address](#manual.http_proxy.address)". | -| **manual.https_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | **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)".~~
the value of the variable "[HTTP proxy port](#manual.http_proxy.port)". | -| **manual.socks_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | **Validators**:
• type domainname
• the domain name can be an IP
**Default**: ~~the value of the variable "[Proxy address](#manual.http_proxy.address)".~~
the value of the variable "[HTTP proxy address](#manual.http_proxy.address)". | -| **manual.socks_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | **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)".~~
the value of the variable "[HTTP proxy port](#manual.http_proxy.port)". | +| Variable | Description | +|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **manual.https_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTPS proxy address.
**Validators**:
• type domainname
• the domain name can be an IP
**Default**: the value of the variable "[HTTP proxy address](#manual.http_proxy.address)". | +| **manual.https_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTPS 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 "[HTTP proxy port](#manual.http_proxy.port)". | +| **manual.socks_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | SOCKS proxy address.
**Validators**:
• type domainname
• the domain name can be an IP
**Default**: the value of the variable "[HTTP proxy address](#manual.http_proxy.address)". | +| **manual.socks_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | 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**: the value of the variable "[HTTP proxy port](#manual.http_proxy.port)". | diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 7c1e4b6d..623b6b7e 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -33,10 +33,10 @@ > *`hidden`*\ > **Hidden**: when the variable "[Also use this proxy for HTTPS](#manual.use_for_https)" has the value "true". -| Variable | Description | -|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **manual.https_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | **Validators**:
• type domainname
• the domain name can be an IP
**Default**: the value of the variable "[HTTP proxy address](#manual.http_proxy.address)". | -| **manual.https_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | **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 proxy port](#manual.http_proxy.port)". | +| Variable | Description | +|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **manual.https_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTPS proxy address.
**Validators**:
• type domainname
• the domain name can be an IP
**Default**: the value of the variable "[HTTP proxy address](#manual.http_proxy.address)". | +| **manual.https_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTPS 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 "[HTTP proxy port](#manual.http_proxy.port)". | ## SOCKS Proxy @@ -44,8 +44,8 @@ > > **Path**: manual.socks_proxy -| Variable | Description | -|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **manual.socks_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | **Validators**:
• type domainname
• the domain name can be an IP
**Default**: the value of the variable "[HTTP proxy address](#manual.http_proxy.address)". | -| **manual.socks_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | **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 proxy port](#manual.http_proxy.port)". | -| **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)** | +| Variable | Description | +|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **manual.socks_proxy.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | SOCKS proxy address.
**Validators**:
• type domainname
• the domain name can be an IP
**Default**: the value of the variable "[HTTP proxy address](#manual.http_proxy.address)". | +| **manual.socks_proxy.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | 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**: the value of the variable "[HTTP proxy port](#manual.http_proxy.port)". | +| **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)** | diff --git a/README.md b/README.md index 78367f78..7135dccc 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_083] Redefine default value in custom type variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_083/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_084~1..v1.1_084)) +- [[Previous tutorial v1.1_084] Redefine other parameter in custom type for HTTP](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_084/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_085~1..v1.1_085)) -# [tutorial v1.1_084] Redefine other parameter in custom type for HTTP +# [tutorial v1.1_085] Redefine other parameter in custom type for HTTPS et SOCKS -- [Read the tutorial "Redefine other parameter in custom type for HTTP" in the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/customtype.html#redefine-other-parameter-in-custom-type-for-http) -- [View the changes in the files](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_084~1..v1.1_084) +- [Read the tutorial "Redefine other parameter in custom type for HTTPS et SOCKS" in the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/customtype.html#redefine-other-parameter-in-custom-type-for-https-et-socks) +- [View the changes in the files](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_085~1..v1.1_085) ## Screenshot @@ -26,48 +26,23 @@ pip install rougail-cli rougail-output-exporter rougail-output-doc rougail-user- Then switch to the tutorial page: ```shell -git switch --detach v1.1_084 +git switch --detach v1.1_085 ``` ## 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
+ └── types
+     └── proxy
+         └── 00-type.yml


-Contents of the types/proxy/00-type.yml type file - -```yml -%YAML 1.2 ---- -version: 1.1 - -proxy: - - address: - type: domainname - params: - allow_ip: true - default: - variable: __.http_proxy.address - - port: - type: port - default: - variable: __.http_proxy.port -... - -``` - -*** -Contents of the firefox/10-manual.yml file +Contents of the firefox/20-manual.yml file ```yml %YAML 1.2 @@ -75,24 +50,41 @@ Contents of the firefox/10-manual.yml file version: 1.1 manual: - description: Manual proxy configuration - disabled: - variable: _.proxy_mode - when_not: Manual proxy configuration - http_proxy: - description: HTTP Proxy + 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 - default: null - description: HTTP proxy address + description: SOCKS proxy address port: redefine: true - default: 8080 - description: HTTP proxy port + description: SOCKS proxy port + + version: + description: SOCKS host version used by proxy + choices: + - v4 + - v5 + default: v5 ... ``` @@ -156,14 +148,14 @@ Variables: - :notebook: port (HTTP 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.proxy.net ← loaded from the YAML file "config/01/config.yml" (:hourglass_flowing_sand: http.proxy.net) - - :notebook: port: 3128 + - :notebook: address (HTTPS proxy address): https.proxy.net ← loaded from the YAML file "config/01/config.yml" (:hourglass_flowing_sand: http.proxy.net) + - :notebook: port (HTTPS proxy port): 3128 - :open_file_folder: socks_proxy (SOCKS Proxy) - - :notebook: address: http.proxy.net - - :notebook: port: 3128 + - :notebook: address (SOCKS proxy address): http.proxy.net + - :notebook: port (SOCKS proxy port): 3128 - :notebook: version (SOCKS host version used by proxy): v5 *** -- [[Next tutorial v1.1_085] Redefine other parameter in custom type for HTTPS et SOCKS](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_085/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_085~1..v1.1_085)) +- [[Next 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 9e01bcd6..164ac69c 100644 --- a/config/01/output_ro.html +++ b/config/01/output_ro.html @@ -16,11 +16,11 @@ Variables: ┣━━ 📓 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.proxy.net ◀ loaded from the YAML file - "config/01/config.yml" (⏳ http.proxy.net) - ┗━━ 📓 port: 3128 + ┣━━ 📓 address (HTTPS proxy address): https.proxy.net ◀ loaded from the + YAML file "config/01/config.yml" (⏳ http.proxy.net) + ┗━━ 📓 port (HTTPS proxy port): 3128 ┗━━ 📂 socks_proxy (SOCKS Proxy) - ┣━━ 📓 address: http.proxy.net - ┣━━ 📓 port: 3128 + ┣━━ 📓 address (SOCKS proxy address): http.proxy.net + ┣━━ 📓 port (SOCKS proxy port): 3128 ┗━━ 📓 version (SOCKS host version used by proxy): v5 diff --git a/tree.html b/tree.html index 309651c3..598c81ec 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