rougail-tutorials/firefox/20-manual.yml
Emmanuel Garette 7b0ad7c84c [tutorial 029] Description of Jinja calculation
By default, the Jinja calculation is generic in documentation. We can add a useful description.

We add a new variable "version" only accessible in "Socks" family.
2024-09-07 19:06:51 +02:00

40 lines
839 B
YAML

---
manual:
use_for_https: true # Also use this proxy for HTTPS
"{{ suffix }}_proxy":
description: "{{ suffix }} Proxy"
dynamic:
- HTTPS
- SOCKS
hidden:
jinja: |
{% if suffix == 'HTTPS' and _.use_for_https %}
HTTPS is same has HTTP
{% endif %}
params:
suffix:
type: suffix
description: |
in HTTPS case if "manual.use_for_https" is set to True
address:
description: "{{ suffix }} address"
default:
variable: __.http_proxy.address
port:
description: "{{ suffix }} port"
default:
variable: __.http_proxy.port
version:
description: SOCKS host version used by proxy
choices:
- v4
- v5
default: v5
disabled:
type: suffix
when: 'HTTPS'