2025-11-09 19:31:04 +01:00
- [Summary ](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/branch/1.1/README.md )
2025-11-09 19:31:17 +01:00
- [[tutorial v1.1_032] Copy HTTP manual proxy to HTTPS manual proxy](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_032/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_032~1..v1.1_032))
2025-11-09 19:31:04 +01:00
2025-11-09 19:31:17 +01:00
# [tutorial v1.1_033)] A conditional hidden family
2025-11-09 19:31:04 +01:00
2025-11-09 19:31:17 +01:00
[View the diff ](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_033~1..v1.1_033 )
2025-11-09 19:31:04 +01:00
2025-11-09 19:31:03 +01:00
## Screenshot
< img src = "firefox.png" width = 50% height = 50% alt = "Firefox Proxy setting" / >
## Clone and install
To test this tutorial, you need to download this repository and install Rougail:
```shell
git clone -b 1.1 https://forge.cloud.silique.fr/stove/rougail-tutorials.git
cd rougail-tutorials
python -m venv venv_rougail
. venv_rougail/bin/activate
pip install rougail-cli rougail-output-exporter rougail-output-doc rougail-user-data-yaml
```
Then switch to the tutorial page:
```shell
2025-11-09 19:31:17 +01:00
git switch --detach v1.1_033
2025-11-09 19:31:04 +01:00
```
## Structure
< p >
2025-11-09 19:31:17 +01:00
< a href = "https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_033/./" > .< / a > < br / >
└── < a href = "https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_033/./firefox/" > firefox< / a > < br / >
├── < a href = "https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_033/./firefox/00-proxy.yml" > 00-proxy.yml< / a > < br / >
├── < a href = "https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_033/./firefox/10-manual.yml" > 10-manual.yml< / a > < br / >
└── < a href = "https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_033/./firefox/20-manual.yml" > 20-manual.yml< / a > < br / >
2025-11-09 19:31:04 +01:00
< br / > < br / > < / p >
2025-11-09 19:31:16 +01:00
Contents of the firefox/20-manual.yml file
2025-11-09 19:31:04 +01:00
```yml
%YAML 1.2
---
version: 1.1
2025-11-09 19:31:05 +01:00
2025-11-09 19:31:14 +01:00
manual:
2025-11-09 19:31:13 +01:00
2025-11-09 19:31:16 +01:00
use_for_https: true # Also use this proxy for HTTPS
2025-11-09 19:31:17 +01:00
https_proxy:
description: HTTPS Proxy
hidden:
variable: _.use_for_https
2025-11-09 19:31:15 +01:00
address:
2025-11-09 19:31:16 +01:00
description: HTTPS address
2025-11-09 19:31:15 +01:00
type: domainname
params:
allow_ip: true
port:
2025-11-09 19:31:16 +01:00
description: HTTPS Port
2025-11-09 19:31:15 +01:00
type: port
default: 8080
2025-11-09 19:31:04 +01:00
...
```
2025-11-09 19:31:05 +01:00
### Let's generate the documentation
```shell
rougail -m firefox/ -o doc
```
| Variable | Description |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
2025-11-09 19:31:07 +01:00
| **proxy_mode** < br /> [`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Configure Proxy Access to the Internet.< br /> **Choices**: < br /> - No proxy ** ← (default)**< br /> - Auto-detect proxy settings for this network< br /> - Use system proxy settings< br /> - Manual proxy configuration< br /> - Automatic proxy configuration URL |
2025-11-09 19:31:05 +01:00
2025-11-09 19:31:15 +01:00
#### Manual proxy configuration
**manual**
*`disabled`*
**Disabled**: when the variable "proxy_mode" hasn't the value "Manual proxy configuration"
##### HTTP Proxy
**manual.http_proxy**
| Variable | Description |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **manual.http_proxy.address** < br /> [`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTP address.< br /> **Validator**: the domain name can be an IP |
| **manual.http_proxy.port** < br /> [`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTP Port.< br /> **Validators**: < br /> - well-known ports (1 to 1023) are allowed< br /> - registred ports (1024 to 49151) are allowed< br /> - private ports (greater than 49152) are allowed< br /> **Default**: 8080 |
| Variable | Description |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **manual.use_for_https** < br /> [`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Also use this proxy for HTTPS.< br /> **Default**: true |
2025-11-09 19:31:16 +01:00
##### HTTPS Proxy
**manual.https_proxy**
2025-11-09 19:31:17 +01:00
*`hidden`*
2025-11-09 19:31:16 +01:00
2025-11-09 19:31:17 +01:00
**Hidden**: when the variable "manual.use_for_https" has the value "true"
2025-11-09 19:31:16 +01:00
| Variable | Description |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **manual.https_proxy.address** < br /> [`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTPS address.< br /> **Validator**: the domain name can be an IP |
| **manual.https_proxy.port** < br /> [`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | HTTPS Port.< br /> **Validators**: < br /> - well-known ports (1 to 1023) are allowed< br /> - registred ports (1024 to 49151) are allowed< br /> - private ports (greater than 49152) are allowed< br /> **Default**: 8080 |
2025-11-09 19:31:17 +01:00
## User datas
### Example 1
#### config/01/config.yml
```yml
---
proxy_mode: Manual proxy configuration
manual:
http_proxy:
address: http.proxy.net
port: 3128
use_for_https: false
https_proxy:
address: https.proxy.net
```
#### Output
2025-11-09 19:31:10 +01:00
```shell
2025-11-09 19:31:17 +01:00
rougail -m firefox/ -u yaml -yf config/01/config.yml
2025-11-09 19:31:10 +01:00
```
2025-11-09 19:31:17 +01:00
< pre > ╭────────────── Caption ───────────────╮
│ Variable < span style = "color: #ffd700 " > Default value</ span > │
│ Modified value │
│ (< span style = "color: #00aa00 " > ⏳ Original default value</ span > ) │
╰──────────────────────────────────────╯
Variables:
< span style = "color: #5c5cff " > ┣━━ </ span > 📓 Configure Proxy Access to the Internet: Manual proxy configuration ◀ loaded from the YAML file "config/01/config.yml" (⏳ < span style = "color: #00aa00 " > No proxy</ span > )
< span style = "color: #5c5cff " > ┗━━ </ span > 📂 Manual proxy configuration
< span style = "color: #5c5cff " > </ span >< span style = "color: #5c5cff " > ┣━━ </ span > 📂 HTTP Proxy
< span style = "color: #5c5cff " > </ span >< span style = "color: #5c5cff " > ┃ </ span >< span style = "color: #5c5cff " > ┣━━ </ span > 📓 HTTP address: http.proxy.net ◀ loaded from the YAML file "config/01/config.yml"
< span style = "color: #5c5cff " > </ span >< span style = "color: #5c5cff " > ┃ </ span >< span style = "color: #5c5cff " > ┗━━ </ span > 📓 HTTP Port: 3128 ◀ loaded from the YAML file "config/01/config.yml" (⏳ < span style = "color: #00aa00 " > 8080</ span > )
< span style = "color: #5c5cff " > </ span >< span style = "color: #5c5cff " > ┣━━ </ span > 📓 Also use this proxy for HTTPS: false ◀ loaded from the YAML file "config/01/config.yml" (⏳ < span style = "color: #00aa00 " > true</ span > )
< span style = "color: #5c5cff " > </ span >< span style = "color: #5c5cff " > ┗━━ </ span > 📂 HTTPS Proxy
< span style = "color: #5c5cff " > </ span >< span style = "color: #5c5cff " > </ span >< span style = "color: #5c5cff " > ┣━━ </ span > 📓 HTTPS address: https.proxy.net ◀ loaded from the YAML file "config/01/config.yml"
< span style = "color: #5c5cff " > </ span >< span style = "color: #5c5cff " > </ span >< span style = "color: #5c5cff " > ┗━━ </ span > 📓 HTTPS Port: < span style = "color: #ffd700 " > 8080</ span >
< / pre >
### Example 2
#### config/02/config.yml
2025-11-09 19:31:15 +01:00
2025-11-09 19:31:10 +01:00
2025-11-09 19:31:17 +01:00
```yml
---
proxy_mode: Manual proxy configuration
manual:
http_proxy:
address: http.proxy.net
port: 3128
use_for_https: true
```
#### Output
2025-11-09 19:31:10 +01:00
2025-11-09 19:31:17 +01:00
```shell
rougail -m firefox/ -u yaml -yf config/02/config.yml
```
< pre >< span style = "font-weight: bold; color: #ff0000 " > 🛑 ERRORS</ span >
< span style = "color: #ff0000 " > ┗━━ </ span > The following variables are inaccessible but are empty and mandatory:
< span style = "color: #ff0000 " > </ span >< span style = "color: #ff0000 " > ┗━━ </ span > manual.https_proxy.address (HTTPS address)
< / pre >
2025-11-09 19:31:10 +01:00
2025-11-09 19:31:17 +01:00
- [[tutorial v1.1_040] A calculated default value](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_040/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_040~1..v1.1_040))