[tutorial 060] A variable with type "web_address" (config and doc)
This commit is contained in:
parent
40fb808dee
commit
089c5dce4b
12 changed files with 63 additions and 129 deletions
115
README.md
115
README.md
|
@ -1,9 +1,9 @@
|
|||
- [Summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/branch/1.1/README.md)
|
||||
- [[tutorial 050] Family: "shorthand" mode](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_050/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_050~1..v1.1_050))
|
||||
- [[tutorial 051] Variable: "shorthand" mode](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_051/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_051~1..v1.1_051))
|
||||
|
||||
# [tutorial 051] Variable: "shorthand" mode
|
||||
# [tutorial 060] A variable with type "web_address"
|
||||
|
||||
[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_051~1..v1.1_051)
|
||||
[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_060~1..v1.1_060)
|
||||
|
||||
|
||||
## Screenshot
|
||||
|
@ -101,6 +101,16 @@ manual:
|
|||
type: identifier
|
||||
when: 'HTTPS'
|
||||
|
||||
```
|
||||
### firefox/30-auto.yml
|
||||
|
||||
|
||||
```yml
|
||||
---
|
||||
auto:
|
||||
description: Automatic proxy configuration URL
|
||||
type: web_address
|
||||
|
||||
```
|
||||
### Generated documentation
|
||||
|
||||
|
@ -109,8 +119,8 @@ foo@bar:~$ rougail -v 1.1 -m firefox/ -o doc -do github
|
|||
```
|
||||
### Variables
|
||||
|
||||
| Variable | Description |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Variable | Description |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **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 |
|
||||
|
||||
#### Manual proxy configuration
|
||||
|
@ -121,13 +131,13 @@ _`disabled`_
|
|||
|
||||
##### HTTP Proxy
|
||||
|
||||
| Variable | Description |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| 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/>**Default**: 8080 |
|
||||
|
||||
| Variable | Description |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| 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 |
|
||||
|
||||
##### "*HTTPS* Proxy" or "*SOCKS* Proxy"
|
||||
|
@ -141,12 +151,16 @@ This family builds families dynamically.
|
|||
|
||||
**Identifiers**: <br/>- HTTPS<br/>- SOCKS
|
||||
|
||||
| Variable | Description |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Variable | Description |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **manual.https_proxy.address** or **manual.socks_proxy.address**<br/>[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | "*HTTPS* address" or "*SOCKS* address".<br/>**Validator**: the domain name can be an IP<br/>**Default**: the value of the variable "manual.http_proxy.address". |
|
||||
| **manual.https_proxy.port** or **manual.socks_proxy.port**<br/>[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | "*HTTPS* port" or "*SOCKS* port".<br/>**Default**: the value of the variable "manual.http_proxy.port". |
|
||||
| **manual.https_proxy.version** or **manual.socks_proxy.version**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` _`disabled`_ | SOCKS host version used by proxy.<br/>**Choices**: <br/>- v4<br/>- v5 ← (default)<br/>**Disabled**: when the identifier is "HTTPS". |
|
||||
|
||||
| Variable | Description |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **auto**<br/>[`web_address`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Automatic proxy configuration URL. |
|
||||
|
||||
|
||||
## User data
|
||||
|
||||
|
@ -157,6 +171,7 @@ This family builds families dynamically.
|
|||
|
||||
```yml
|
||||
---
|
||||
auto: https://auto.proxy.net/wpad.dat
|
||||
|
||||
```
|
||||
#### Output
|
||||
|
@ -171,7 +186,8 @@ foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/01/config.yaml
|
|||
│ <span style="color: #ffaf00">Unmodifiable variable</span> │
|
||||
╰─────────────────────────────────────────────────────────────╯
|
||||
Variables:
|
||||
<span style="color: #5c5cff">┗━━ </span>📓 proxy_mode: <span style="color: #ffd700">No proxy</span>
|
||||
<span style="color: #5c5cff">┣━━ </span>📓 proxy_mode: <span style="color: #ffd700">No proxy</span>
|
||||
<span style="color: #5c5cff">┗━━ </span>📓 auto: https://auto.proxy.net/wpad.dat
|
||||
</pre>
|
||||
### Example 2
|
||||
|
||||
|
@ -180,7 +196,7 @@ Variables:
|
|||
|
||||
```yml
|
||||
---
|
||||
proxy_mode: No proxy
|
||||
proxy_mode: Automatic proxy configuration URL
|
||||
|
||||
```
|
||||
#### Output
|
||||
|
@ -188,14 +204,9 @@ proxy_mode: No proxy
|
|||
```console
|
||||
foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/02/config.yaml
|
||||
```
|
||||
<pre>╭────────────────────────── Caption ──────────────────────────╮
|
||||
│ Variable <span style="color: #ffd700">Default value</span> │
|
||||
│ <span style="color: #5c5cff">Undocumented variable</span> Modified value │
|
||||
│ <span style="color: #ff0000">Undocumented but modified variable</span> (<span style="color: #00aa00">Original default value</span>) │
|
||||
│ <span style="color: #ffaf00">Unmodifiable variable</span> │
|
||||
╰─────────────────────────────────────────────────────────────╯
|
||||
Variables:
|
||||
<span style="color: #5c5cff">┗━━ </span>📓 proxy_mode: No proxy (<span style="color: #00aa00">No proxy</span>)
|
||||
<pre>🛑 ERRORS
|
||||
<span style="color: #ff0000">┣━━ </span>The following variables are mandatory but have no value:
|
||||
<span style="color: #ff0000">┗━━ </span> - auto (Automatic proxy configuration URL)
|
||||
</pre>
|
||||
### Example 3
|
||||
|
||||
|
@ -204,7 +215,8 @@ Variables:
|
|||
|
||||
```yml
|
||||
---
|
||||
proxy_mode: Manual proxy configuration
|
||||
proxy_mode: Automatic proxy configuration URL
|
||||
auto: https://auto.proxy.net/wpad.dat
|
||||
|
||||
```
|
||||
#### Output
|
||||
|
@ -212,67 +224,16 @@ proxy_mode: Manual proxy configuration
|
|||
```console
|
||||
foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/03/config.yaml
|
||||
```
|
||||
<pre>🛑 ERRORS
|
||||
<span style="color: #ff0000">┣━━ </span>The following variables are mandatory but have no value:
|
||||
<span style="color: #ff0000">┣━━ </span> - manual.http_proxy.address (HTTP address)
|
||||
<span style="color: #ff0000">┗━━ </span> - manual.socks_proxy.address (SOCKS address)
|
||||
</pre>
|
||||
### Example 4
|
||||
|
||||
#### config/04/config.yaml
|
||||
|
||||
|
||||
```yml
|
||||
---
|
||||
proxy_mode: foo
|
||||
|
||||
```
|
||||
#### Output
|
||||
|
||||
```console
|
||||
foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/04/config.yaml
|
||||
```
|
||||
<pre>🛑 ERRORS
|
||||
<span style="color: #ff0000">┗━━ </span>"foo" is an invalid choice for "proxy_mode (Configure Proxy Access to the Internet)", only
|
||||
<span style="color: #ff0000"> </span>"Auto-detect proxy settings for this network", "Automatic proxy configuration URL", "Manual proxy
|
||||
<span style="color: #ff0000"> </span>configuration", "No proxy" and "Use system proxy settings" are allowed
|
||||
╭────────────────────────── Caption ──────────────────────────╮
|
||||
<pre>╭────────────────────────── Caption ──────────────────────────╮
|
||||
│ Variable <span style="color: #ffd700">Default value</span> │
|
||||
│ <span style="color: #5c5cff">Undocumented variable</span> Modified value │
|
||||
│ <span style="color: #ff0000">Undocumented but modified variable</span> (<span style="color: #00aa00">Original default value</span>) │
|
||||
│ <span style="color: #ffaf00">Unmodifiable variable</span> │
|
||||
╰─────────────────────────────────────────────────────────────╯
|
||||
Variables:
|
||||
<span style="color: #5c5cff">┗━━ </span>📓 proxy_mode: <span style="color: #ffd700">No proxy</span>
|
||||
</pre>
|
||||
### Example 5
|
||||
|
||||
#### config/05/config.yaml
|
||||
|
||||
|
||||
```yml
|
||||
---
|
||||
proxy_mode: 1
|
||||
|
||||
```
|
||||
#### Output
|
||||
|
||||
```console
|
||||
foo@bar:~$ rougail -v 1.1 -m firefox/ -u file -ff config/05/config.yaml
|
||||
```
|
||||
<pre>🛑 ERRORS
|
||||
<span style="color: #ff0000">┗━━ </span>"1" is an invalid choice for "proxy_mode (Configure Proxy Access to the Internet)", only "Auto-detect
|
||||
<span style="color: #ff0000"> </span>proxy settings for this network", "Automatic proxy configuration URL", "Manual proxy configuration",
|
||||
<span style="color: #ff0000"> </span>"No proxy" and "Use system proxy settings" are allowed
|
||||
╭────────────────────────── Caption ──────────────────────────╮
|
||||
│ Variable <span style="color: #ffd700">Default value</span> │
|
||||
│ <span style="color: #5c5cff">Undocumented variable</span> Modified value │
|
||||
│ <span style="color: #ff0000">Undocumented but modified variable</span> (<span style="color: #00aa00">Original default value</span>) │
|
||||
│ <span style="color: #ffaf00">Unmodifiable variable</span> │
|
||||
╰─────────────────────────────────────────────────────────────╯
|
||||
Variables:
|
||||
<span style="color: #5c5cff">┗━━ </span>📓 proxy_mode: <span style="color: #ffd700">No proxy</span>
|
||||
<span style="color: #5c5cff">┣━━ </span>📓 proxy_mode: Automatic proxy configuration URL (<span style="color: #00aa00">No proxy</span>)
|
||||
<span style="color: #5c5cff">┗━━ </span>📓 auto: https://auto.proxy.net/wpad.dat
|
||||
</pre>
|
||||
|
||||
|
||||
- [[tutorial 060] A variable with type "web_address"](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_060/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_060~1..v1.1_060))
|
||||
- [[tutorial 061] A conditional disabled variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_061/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_061~1..v1.1_061))
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
---
|
||||
auto: https://auto.proxy.net/wpad.dat
|
||||
|
|
|
@ -5,5 +5,6 @@
|
|||
│ <span style="color: #ffaf00">Unmodifiable variable</span> │
|
||||
╰─────────────────────────────────────────────────────────────╯
|
||||
Variables:
|
||||
<span style="color: #5c5cff">┗━━ </span>📓 proxy_mode: <span style="color: #ffd700">No proxy</span>
|
||||
<span style="color: #5c5cff">┣━━ </span>📓 proxy_mode: <span style="color: #ffd700">No proxy</span>
|
||||
<span style="color: #5c5cff">┗━━ </span>📓 auto: https://auto.proxy.net/wpad.dat
|
||||
</pre>
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
---
|
||||
proxy_mode: No proxy
|
||||
proxy_mode: Automatic proxy configuration URL
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
<pre>╭────────────────────────── Caption ──────────────────────────╮
|
||||
│ Variable <span style="color: #ffd700">Default value</span> │
|
||||
│ <span style="color: #5c5cff">Undocumented variable</span> Modified value │
|
||||
│ <span style="color: #ff0000">Undocumented but modified variable</span> (<span style="color: #00aa00">Original default value</span>) │
|
||||
│ <span style="color: #ffaf00">Unmodifiable variable</span> │
|
||||
╰─────────────────────────────────────────────────────────────╯
|
||||
Variables:
|
||||
<span style="color: #5c5cff">┗━━ </span>📓 proxy_mode: No proxy (<span style="color: #00aa00">No proxy</span>)
|
||||
<pre>🛑 ERRORS
|
||||
<span style="color: #ff0000">┣━━ </span>The following variables are mandatory but have no value:
|
||||
<span style="color: #ff0000">┗━━ </span> - auto (Automatic proxy configuration URL)
|
||||
</pre>
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
---
|
||||
proxy_mode: Manual proxy configuration
|
||||
proxy_mode: Automatic proxy configuration URL
|
||||
auto: https://auto.proxy.net/wpad.dat
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<pre>🛑 ERRORS
|
||||
<span style="color: #ff0000">┣━━ </span>The following variables are mandatory but have no value:
|
||||
<span style="color: #ff0000">┣━━ </span> - manual.http_proxy.address (HTTP address)
|
||||
<span style="color: #ff0000">┗━━ </span> - manual.socks_proxy.address (SOCKS address)
|
||||
<pre>╭────────────────────────── Caption ──────────────────────────╮
|
||||
│ Variable <span style="color: #ffd700">Default value</span> │
|
||||
│ <span style="color: #5c5cff">Undocumented variable</span> Modified value │
|
||||
│ <span style="color: #ff0000">Undocumented but modified variable</span> (<span style="color: #00aa00">Original default value</span>) │
|
||||
│ <span style="color: #ffaf00">Unmodifiable variable</span> │
|
||||
╰─────────────────────────────────────────────────────────────╯
|
||||
Variables:
|
||||
<span style="color: #5c5cff">┣━━ </span>📓 proxy_mode: Automatic proxy configuration URL (<span style="color: #00aa00">No proxy</span>)
|
||||
<span style="color: #5c5cff">┗━━ </span>📓 auto: https://auto.proxy.net/wpad.dat
|
||||
</pre>
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
---
|
||||
proxy_mode: foo
|
|
@ -1,13 +0,0 @@
|
|||
<pre>🛑 ERRORS
|
||||
<span style="color: #ff0000">┗━━ </span>"foo" is an invalid choice for "proxy_mode (Configure Proxy Access to the Internet)", only
|
||||
<span style="color: #ff0000"> </span>"Auto-detect proxy settings for this network", "Automatic proxy configuration URL", "Manual proxy
|
||||
<span style="color: #ff0000"> </span>configuration", "No proxy" and "Use system proxy settings" are allowed
|
||||
╭────────────────────────── Caption ──────────────────────────╮
|
||||
│ Variable <span style="color: #ffd700">Default value</span> │
|
||||
│ <span style="color: #5c5cff">Undocumented variable</span> Modified value │
|
||||
│ <span style="color: #ff0000">Undocumented but modified variable</span> (<span style="color: #00aa00">Original default value</span>) │
|
||||
│ <span style="color: #ffaf00">Unmodifiable variable</span> │
|
||||
╰─────────────────────────────────────────────────────────────╯
|
||||
Variables:
|
||||
<span style="color: #5c5cff">┗━━ </span>📓 proxy_mode: <span style="color: #ffd700">No proxy</span>
|
||||
</pre>
|
|
@ -1,2 +0,0 @@
|
|||
---
|
||||
proxy_mode: 1
|
|
@ -1,13 +0,0 @@
|
|||
<pre>🛑 ERRORS
|
||||
<span style="color: #ff0000">┗━━ </span>"1" is an invalid choice for "proxy_mode (Configure Proxy Access to the Internet)", only "Auto-detect
|
||||
<span style="color: #ff0000"> </span>proxy settings for this network", "Automatic proxy configuration URL", "Manual proxy configuration",
|
||||
<span style="color: #ff0000"> </span>"No proxy" and "Use system proxy settings" are allowed
|
||||
╭────────────────────────── Caption ──────────────────────────╮
|
||||
│ Variable <span style="color: #ffd700">Default value</span> │
|
||||
│ <span style="color: #5c5cff">Undocumented variable</span> Modified value │
|
||||
│ <span style="color: #ff0000">Undocumented but modified variable</span> (<span style="color: #00aa00">Original default value</span>) │
|
||||
│ <span style="color: #ffaf00">Unmodifiable variable</span> │
|
||||
╰─────────────────────────────────────────────────────────────╯
|
||||
Variables:
|
||||
<span style="color: #5c5cff">┗━━ </span>📓 proxy_mode: <span style="color: #ffd700">No proxy</span>
|
||||
</pre>
|
BIN
firefox.png
BIN
firefox.png
Binary file not shown.
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 118 KiB |
Loading…
Reference in a new issue