[tutorial v1.1_077)] Jinja calculation for an hidden variable with a potential inaccessible varible (config and doc)
This commit is contained in:
parent
0222f72a86
commit
4c3d367801
2 changed files with 48 additions and 34 deletions
64
README.md
64
README.md
|
|
@ -1,9 +1,9 @@
|
|||
- [Summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/branch/1.1/README.md)
|
||||
- [[tutorial v1.1_075] A variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_075/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_075~1..v1.1_075))
|
||||
- [[tutorial v1.1_076] A variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_076/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_076~1..v1.1_076))
|
||||
|
||||
# [tutorial v1.1_076)] A variable
|
||||
# [tutorial v1.1_077)] Jinja calculation for an hidden variable with a potential inaccessible varible
|
||||
|
||||
[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_076~1..v1.1_076)
|
||||
[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_077~1..v1.1_077)
|
||||
|
||||
|
||||
## Screenshot
|
||||
|
|
@ -29,7 +29,7 @@ pip install rougail-cli rougail-output-exporter rougail-output-doc rougail-user-
|
|||
Then switch to the tutorial page:
|
||||
|
||||
```shell
|
||||
git switch --detach v1.1_076
|
||||
git switch --detach v1.1_077
|
||||
```
|
||||
|
||||
## Structure
|
||||
|
|
@ -37,15 +37,15 @@ git switch --detach v1.1_076
|
|||
|
||||
|
||||
<p>
|
||||
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_076/./">.</a><br/>
|
||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_076/./firefox/">firefox</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_076/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_076/./firefox/10-manual.yml">10-manual.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_076/./firefox/20-manual.yml">20-manual.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_076/./firefox/30-auto.yml">30-auto.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_076/./firefox/40-no_proxy.yml">40-no_proxy.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_076/./firefox/50-prompt_authentication.yml">50-prompt_authentication.yml</a><br/>
|
||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_076/./firefox/55-proxy_dns_socks5.yml">55-proxy_dns_socks5.yml</a><br/>
|
||||
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_077/./">.</a><br/>
|
||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_077/./firefox/">firefox</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_077/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_077/./firefox/10-manual.yml">10-manual.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_077/./firefox/20-manual.yml">20-manual.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_077/./firefox/30-auto.yml">30-auto.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_077/./firefox/40-no_proxy.yml">40-no_proxy.yml</a><br/>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_077/./firefox/50-prompt_authentication.yml">50-prompt_authentication.yml</a><br/>
|
||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_077/./firefox/55-proxy_dns_socks5.yml">55-proxy_dns_socks5.yml</a><br/>
|
||||
<br/><br/></p>
|
||||
|
||||
Contents of the firefox/55-proxy_dns_socks5.yml file
|
||||
|
|
@ -55,7 +55,19 @@ Contents of the firefox/55-proxy_dns_socks5.yml file
|
|||
---
|
||||
version: 1.1
|
||||
|
||||
proxy_dns_socks5: false # Use proxy DNS when using SOCKS v5
|
||||
proxy_dns_socks5:
|
||||
description: Use proxy DNS when using SOCKS v5
|
||||
default: false
|
||||
disabled:
|
||||
jinja: |-
|
||||
{% if _.manual.socks_proxy.version is propertyerror %}
|
||||
the proxy mode is not manual
|
||||
{% elif _.manual.socks_proxy.version == 'v4' %}
|
||||
socks version is v4
|
||||
{% endif %}
|
||||
description: |-
|
||||
if "firefox.proxy_mode" is not "Manual proxy configuration"
|
||||
or "firefox.manual.socks_proxy.version" is "v4"
|
||||
...
|
||||
|
||||
```
|
||||
|
|
@ -109,23 +121,25 @@ This family builds families dynamically
|
|||
| **manual.*https*_proxy.port**<br/>**manual.*socks*_proxy.port**<br/>[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | *HTTPS* or *SOCKS* 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**: the value of the variable "manual.http_proxy.port" |
|
||||
| **manual.*https*_proxy.version**<br/>**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.<br/>**Validator**: the domain name in web address can be only a hostname |
|
||||
| **no_proxy**<br/>[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) *`disabled`* `unique` `multiple` | Address for which proxy will be desactivated.<br/>Connections to localhost, 127.0.0.1/8 and ::1 are never proxied.<br/>**Validators**: <br/>- the domain name can starts by a dot<br/>- the domain name can be a hostname<br/>- the domain name can be an IP<br/>- the domain name can be network in CIDR format<br/>**Examples**: <br/>- .mozilla.org<br/>- .net.nz<br/>- 192.168.1.0/24<br/>**Disabled**: when the variable "proxy_mode" has the value "No proxy" |
|
||||
| **prompt_authentication**<br/>[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` *`disabled`* | Prompt for authentication if password is saved.<br/>**Default**: true<br/>**Disabled**: when the variable "proxy_mode" has the value "No proxy" |
|
||||
| **proxy_dns_socks5**<br/>[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Use proxy DNS when using SOCKS v5.<br/>**Default**: false |
|
||||
| Variable | Description |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **auto**<br/>[`web_address`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Automatic proxy configuration URL.<br/>**Validator**: the domain name in web address can be only a hostname |
|
||||
| **no_proxy**<br/>[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) *`disabled`* `unique` `multiple` | Address for which proxy will be desactivated.<br/>Connections to localhost, 127.0.0.1/8 and ::1 are never proxied.<br/>**Validators**: <br/>- the domain name can starts by a dot<br/>- the domain name can be a hostname<br/>- the domain name can be an IP<br/>- the domain name can be network in CIDR format<br/>**Examples**: <br/>- .mozilla.org<br/>- .net.nz<br/>- 192.168.1.0/24<br/>**Disabled**: when the variable "proxy_mode" has the value "No proxy" |
|
||||
| **prompt_authentication**<br/>[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` *`disabled`* | Prompt for authentication if password is saved.<br/>**Default**: true<br/>**Disabled**: when the variable "proxy_mode" has the value "No proxy" |
|
||||
| **proxy_dns_socks5**<br/>[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` *`disabled`* | Use proxy DNS when using SOCKS v5.<br/>**Default**: false<br/>**Disabled**: if "firefox.proxy_mode" is not "Manual proxy configuration"
|
||||
or "firefox.manual.socks_proxy.version" is "v4" |
|
||||
|
||||
### Let's generate the changelog
|
||||
|
||||
```shell
|
||||
rougail -m firefox/ -o doc --doc.contents changelog
|
||||
```
|
||||
#### New variable
|
||||
#### Modified variable
|
||||
|
||||
| Variable | Description |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **proxy_dns_socks5**<br/>[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` | Use proxy DNS when using SOCKS v5.<br/>**Default**: false |
|
||||
| Variable | Description |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **proxy_dns_socks5**<br/>[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` <ins>*`disabled`*</ins> | Use proxy DNS when using SOCKS v5.<br/>**Default**: false<br/>**Disabled**: <ins>if "firefox.proxy_mode" is not "Manual proxy configuration"
|
||||
or "firefox.manual.socks_proxy.version" is "v4"</ins> |
|
||||
|
||||
|
||||
## User datas
|
||||
|
|
@ -215,4 +229,4 @@ rougail -m firefox/ -u yaml -yf config/04/config.yml
|
|||
</pre>
|
||||
|
||||
|
||||
- [[tutorial v1.1_077] Jinja calculation for an hidden variable with a potential inaccessible varible](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_077/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_077~1..v1.1_077))
|
||||
- [[tutorial v1.1_078] A variable in avanced mode](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_078/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_078~1..v1.1_078))
|
||||
|
|
|
|||
18
tree.html
18
tree.html
|
|
@ -25,15 +25,15 @@
|
|||
</head>
|
||||
<body>
|
||||
<h1>Directory Tree</h1><p>
|
||||
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_076/./">.</a><br>
|
||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_076/./firefox/">firefox</a><br>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_076/./firefox/00-proxy.yml">00-proxy.yml</a><br>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_076/./firefox/10-manual.yml">10-manual.yml</a><br>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_076/./firefox/20-manual.yml">20-manual.yml</a><br>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_076/./firefox/30-auto.yml">30-auto.yml</a><br>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_076/./firefox/40-no_proxy.yml">40-no_proxy.yml</a><br>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_076/./firefox/50-prompt_authentication.yml">50-prompt_authentication.yml</a><br>
|
||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_076/./firefox/55-proxy_dns_socks5.yml">55-proxy_dns_socks5.yml</a><br>
|
||||
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_077/./">.</a><br>
|
||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_077/./firefox/">firefox</a><br>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_077/./firefox/00-proxy.yml">00-proxy.yml</a><br>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_077/./firefox/10-manual.yml">10-manual.yml</a><br>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_077/./firefox/20-manual.yml">20-manual.yml</a><br>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_077/./firefox/30-auto.yml">30-auto.yml</a><br>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_077/./firefox/40-no_proxy.yml">40-no_proxy.yml</a><br>
|
||||
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_077/./firefox/50-prompt_authentication.yml">50-prompt_authentication.yml</a><br>
|
||||
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_077/./firefox/55-proxy_dns_socks5.yml">55-proxy_dns_socks5.yml</a><br>
|
||||
<br><br><p>
|
||||
|
||||
2 directories, 7 files
|
||||
|
|
|
|||
Loading…
Reference in a new issue