first commit

This commit is contained in:
egarette@silique.fr 2024-07-21 11:27:47 +02:00
parent 9121ead1b0
commit f51a653414
135 changed files with 1638 additions and 1 deletions

510
README.md
View file

@ -1,2 +1,510 @@
# rougail-tutorials_builder
---
gitea: none
include_toc: true
---
# Tutorial description files
## proxy
### 00-proxy.yml
```yaml
version: 1.1
proxy_mode:
description: Configure Proxy Access to the Internet
choices:
- No proxy
- Auto-detect proxy settings for this network
- Use system proxy settings
- Manual proxy configuration
- Automatic proxy configuration URL
default: No proxy
```
### 10-manual.yml
```yaml
version: 1.1
manual:
description: Manual proxy configuration
disabled:
type: jinja
jinja: |
{% if _.proxy_mode != 'Manual proxy configuration' %}
the proxy mode is not manual
{% endif %}
description: if the value of "proxy.proxy_mode" is not "Manual proxy configuration"
http_proxy: # HTTP Proxy
address:
description: HTTP address
type: domainname
params:
allow_ip: true
port:
description: HTTP Port
type: port
default: '8080'
use_for_https: true # Also use this proxy for HTTPS
'{{ suffix }}_proxy':
description: '{{ suffix }} Proxy'
type: dynamic
dynamic:
- HTTPS
- SOCKS
hidden:
type: jinja
jinja: |
{% if suffix == 'HTTPS' and _.use_for_https %}
HTTPS is same has HTTP
{% endif %}
params:
suffix:
type: suffix
description: |
if HTTPS and HTTPS is same has HTTP
address:
description: Address
type: domainname
params:
allow_ip: true
default:
type: variable
variable: __.http_proxy.address
port:
description: Port
type: port
default:
type: variable
variable: __.http_proxy.port
version:
description: SOCKS host version used by proxy
choices:
- v4
- v5
default: v5
disabled:
type: jinja
jinja: |
{% if suffix == 'HTTPS' %}
if HTTPS
{% endif %}
params:
suffix:
type: suffix
description: |
if not SOCKS
```
### 20-auto.yml
```yaml
version: 1.1
auto:
description: Automatic proxy configuration URL
type: web_address
disabled:
type: jinja
jinja: |
{% if _.proxy_mode != 'Automatic proxy configuration URL' %}
the proxy mode is not automatic
{% endif %}
description: |
if "proxy.proxy_mode" is not "automatic proxy configuration URL"
```
### 30-no_proxy.yml
```yaml
version: 1.1
no_proxy:
description: Address for which proxy will be desactivated
type: domainname
params:
allow_ip: true
allow_cidr_network: true
allow_without_dot: true
allow_startswith_dot: true
multi: true
mandatory: false
disabled:
type: jinja
jinja: |
{% if _.proxy_mode == 'No proxy' %}
proxy mode is no proxy
{% endif %}
description: if "proxy.proxy_mode" is "No proxy"
test:
- .mozilla.org
- .net.nz
- 192.168.1.0/24
help: Connections to localhost, 127.0.0.1/8 and ::1 are never proxied
```
### 40-prompt_authentication.yml
```yaml
version: 1.1
prompt_authentication:
description: Prompt for authentication if password is saved
default: true
disabled:
type: jinja
jinja: |
{% if _.proxy_mode == 'No proxy' %}
proxy mode is no proxy
{% endif %}
description: if "proxy.proxy_mode" is "No proxy"
```
### 50-proxy_dns_socks5.yml
```yaml
version: 1.1
proxy_dns_socks5:
description: Use proxy DNS when using SOCKS v5
default: false
mode: advanced
disabled:
type: jinja
jinja: |
{% if _.proxy_mode != 'Manual proxy configuration' %}
the proxy mode is not manual
{% elif socks_version == 'v4' %}
socks version is v4
{% endif %}
params:
socks_version:
type: variable
variable: _.manual.socks_proxy.version
propertyerror: false
description: |
if "proxy.proxy_mode" is not "Manual proxy configuration" or "proxy.manual.socks_proxy.version" is "v4"
```
### 60-dns_over_https.yml
```yaml
version: 1.1
dns_over_https: # DNS over HTTPS
enable_dns_over_https: false # Enable DNS over HTTPS
provider:
description: Use Provider
choices:
- Cloudflare
- NextDNS
- Custom
default: Cloudflare
disabled:
type: jinja
jinja: |
{% if not _.enable_dns_over_https %}
Enable DNS over HTTPS is False
{% endif %}
description: if "proxy.dns_over_https.enable_dns_over_https" is not False
custom_dns_url:
description: Custom DNS URL
type: web_address
disabled:
type: jinja
jinja: |
{% if provider is not defined or provider != 'Custom' %}
provider is not custom
{% endif %}
params:
provider:
type: variable
variable: _.provider
propertyerror: false
description: if "proxy.dns_over_https.provider" is "Custom"
validators:
- type: jinja
jinja: |
{% if _.custom_dns_url.startswith('http://') %}
only https is allowed
{% endif %}
description: must starts with 'https://' only
```
## foxyproxy
### 00-foxyproxy.yml
```yaml
version: 1.1
proxies:
description: Proxy configuration
_type: leadership
title:
description: Title or Description
multi: true
color:
description: Color
type:
description: Type
type: choice
choices:
- HTTP
- HTTPS/SSL
- SOCKS4
- SOCKS5
- PAC URL
- WPAD
- System (use system settings)
- Direct (no proxy)
default: Direct (no proxy)
address:
description: IP address, DNS name, server name
multi: true
disabled:
type: jinja
jinja: |
{% if _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] %}
proxy does not need address
{% endif %}
description: &needs_address |
if type not in:
- HTTP
- HTTPS/SSL
- SOCKS4
- SOCKS5
default:
type: jinja
jinja: |
{% if firefox_address is not undefined %}
{{ firefox_address }}
{% endif %}
params:
firefox_address:
type: variable
variable: proxy.manual.http_proxy.address
propertyerror: false
description: copy HTTP address if proxy is not "Manual"
port:
description: Port
type: port
default:
type: jinja
jinja: |
{% if firefox_port is not undefined %}
{{ firefox_port }}
{% endif %}
params:
firefox_port:
type: variable
variable: proxy.manual.http_proxy.port
propertyerror: false
description: copy HTTP port if proxy is not "Manual"
disabled:
type: jinja
jinja: |
{% if _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] %}
proxy does not need port
{% endif %}
description: *needs_address
username:
description: Username
type: unix_user
mandatory:
type: jinja
jinja: |
{% if _.password %}
username is mandatory
{% endif %}
disabled:
type: jinja
jinja: |
{% if _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] %}
proxy does not need username
{% endif %}
description: *needs_address
password:
description: Password
type: secret
disabled:
type: jinja
jinja: |
{% if _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] %}
proxy does not need password
{% endif %}
description: *needs_address
url:
description: URL
type: web_address
disabled:
type: jinja
jinja: |
{% if _.type not in ['PAC URL', 'WPAD'] %}
proxy does not need url
{% endif %}
description: |
if type is not in:
- PAC URL
- WPAD
```
### 10-redefine.yml
```yaml
version: 1.1
proxies:
username:
redefine: true
mandatory: false
password:
redefine: true
hidden:
type: jinja
jinja: |
{% if not _.username %}
no username defined
{% endif %}
description: if username is not defined
```
# Generated documentation
## Variables for "proxy"
| Variable                                                                                                                  | Description                                                                                                               |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **proxy.proxy_mode**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `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
`basic` _`disabled`_
**Disabled**: if the value of "proxy.proxy_mode" is not "Manual proxy configuration"
#### HTTP Proxy
`basic`
| Variable&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **proxy.manual.http_proxy.address**<br/>[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | HTTP address.<br/>**Validator**: the domain name can be an IP |
| **proxy.manual.http_proxy.port**<br/>[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | HTTP Port.<br/>**Default**: 8080 |
| Variable&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **proxy.manual.use_for_https**<br/>[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | Also use this proxy for HTTPS.<br/>**Default**: True |
#### "HTTPS Proxy" ou "SOCKS Proxy"
`standard` _`hidden`_
**Hidden**: if HTTPS and HTTPS is same has HTTP<br/>
Cette famille constuit des familles dynami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&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **proxy.manual.https_proxy.address** +<br/>**proxy.manual.socks_proxy.address**<br/>[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | Address.<br/>**Validator**: the domain name can be an IP<br/>**Default**: the value of the variable "proxy.manual.http_proxy.address" |
| **proxy.manual.https_proxy.port** +<br/>**proxy.manual.socks_proxy.port**<br/>[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | Port.<br/>**Default**: the value of the variable "proxy.manual.http_proxy.port" |
| **proxy.manual.https_proxy.version** +<br/>**proxy.manual.socks_proxy.version**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` _`disabled`_ | SOCKS host version used by proxy.<br/>**Choices**: <br/>- v4<br/>- v5 ← (default)<br/>**Disabled**: if not SOCKS<br/> |
| Vari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&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **proxy.auto**<br/>[`web_address`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` _`disabled`_ | Automatic proxy configuration URL.<br/>**Disabled**: if "proxy.proxy_mode" is not "automatic proxy configuration URL"<br/> |
| **proxy.no_proxy**<br/>[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` _`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 only 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**: if "proxy.proxy_mode" is "No proxy" |
| **proxy.prompt_authentication**<br/>[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` _`disabled`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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **proxy.dns_over_https.enable_dns_over_https**<br/>[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | Enable DNS over HTTPS.<br/>**Default**: False |
| **proxy.dns_over_https.provider**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` _`disabled`_ | Use Provider.<br/>**Choices**: <br/>- Cloudflare ← (default)<br/>- NextDNS<br/>- Custom<br/>**Disabled**: if "proxy.dns_over_https.enable_dns_over_https" is not False |
| **proxy.dns_over_https.custom_dns_url**<br/>[`web_address`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` _`disabled`_ | Custom DNS URL.<br/>**Validator**: must starts with 'https://' only<br/>**Disabled**: if "proxy.dns_over_https.provider" is "Custom" |
## Variables for "foxyproxy"
### Proxy configuration
`basic`
Cette famille contient des listes de bloc de variables.
| Variable&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **foxyproxy.proxies.title**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` `unique` `multiple` | Title or Description. |
| **foxyproxy.proxies.color**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | Color. |
| **foxyproxy.proxies.type**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | Type.<br/>**Choices**: <br/>- HTTP<br/>- HTTPS/SSL<br/>- SOCKS4<br/>- SOCKS5<br/>- PAC URL<br/>- WPAD<br/>- System (use system settings)<br/>- Direct (no proxy) ← (default) |
| **foxyproxy.proxies.address**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` _`disabled`_ `multiple` | IP address, DNS name, server name.<br/>**Default**: copy HTTP address if proxy is not "Manual"<br/>**Disabled**: if type not in:<br/>- HTTP<br/>- HTTPS/SSL<br/>- SOCKS4<br/>- SOCKS5<br/> |
| **foxyproxy.proxies.port**<br/>[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` _`disabled`_ | Port.<br/>**Default**: copy HTTP port if proxy is not "Manual"<br/>**Disabled**: if type not in:<br/>- HTTP<br/>- HTTPS/SSL<br/>- SOCKS4<br/>- SOCKS5<br/> |
| **foxyproxy.proxies.username**<br/>[`unix_user`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` _`disabled`_ | Username.<br/>**Disabled**: if type not in:<br/>- HTTP<br/>- HTTPS/SSL<br/>- SOCKS4<br/>- SOCKS5<br/> |
| **foxyproxy.proxies.password**<br/>[`secret`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` _`hidden`_ _`disabled`_ | Password.<br/>**Hidden**: if username is not defined<br/>**Disabled**: if type not in:<br/>- HTTP<br/>- HTTPS/SSL<br/>- SOCKS4<br/>- SOCKS5<br/> |
| **foxyproxy.proxies.url**<br/>[`web_address`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` _`disabled`_ | URL.<br/>**Disabled**: if type is not in:<br/>- PAC URL<br/>- WPAD<br/> |
## Exemple avec les variables obligatoires non renseignées
```yaml
proxy:
manual:
http_proxy:
address: example.net
https_proxy:
address: example.net
socks_proxy:
address: example.net
auto: https://example.net
dns_over_https:
custom_dns_url: https://example.net
```
## Exemple avec tous les variables modifiables
```yaml
proxy:
proxy_mode: No proxy
manual:
http_proxy:
address: example.net
port: '8080'
use_for_https: true
https_proxy:
address: example.net
port: '8080'
version: v5
socks_proxy:
address: example.net
port: '8080'
version: v5
auto: https://example.net
no_proxy:
- .mozilla.org
- .net.nz
- 192.168.1.0/24
prompt_authentication: true
dns_over_https:
enable_dns_over_https: false
provider: Cloudflare
custom_dns_url: https://example.net
foxyproxy:
proxies:
- title: xxx
color: xxx
type: Direct (no proxy)
address:
- None
port: '8080'
username: xxx
password: xxx
url: https://example.net
```

10
examples/001/README.md Normal file
View file

@ -0,0 +1,10 @@
A first variable
In the Firefox configuration, it is possible to define several configuration modes,
from no proxy at all ("No proxy") to a kind of automatic configuration mode from a file
("Automatic proxy configuration URL").
Were gonna create a first variable calls "proxy_mode":
- accept only a string as value
- requires a value (that is, None is not an option)

View file

@ -0,0 +1 @@
---

View file

@ -0,0 +1,2 @@
---
proxy_mode: No proxy

View file

@ -0,0 +1,2 @@
---
proxy_mode: Manual proxy configuration

View file

@ -0,0 +1,2 @@
---
proxy_mode: foo

View file

@ -0,0 +1,2 @@
---
proxy_mode: 1

View file

@ -0,0 +1,2 @@
---
proxy_mode:

BIN
examples/001/firefox.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

BIN
examples/001/firefox.xcf Normal file

Binary file not shown.

9
examples/002/README.md Normal file
View file

@ -0,0 +1,9 @@
The variable description
We can add a description to this first variable.
This information is useful for:
- documentation
- error message
- help user to known which value to set to this variable (for example with [the user data plugin Questionary](https://forge.cloud.silique.fr/gnunux/rougail-user-data-questionary)).

1
examples/002/config Symbolic link
View file

@ -0,0 +1 @@
../001/config

View file

@ -0,0 +1,3 @@
---
proxy_mode:
description: Configure Proxy Access to the Internet

8
examples/003/README.md Normal file
View file

@ -0,0 +1,8 @@
A default value
Now we can define the default value of this variable.
If user don't touch de value of this variable, the value is "No proxy".
As user intervention is no more required, so the variable change it's default mode too (from "basic" to "standard").

1
examples/003/config Symbolic link
View file

@ -0,0 +1 @@
../001/config

View file

@ -0,0 +1,4 @@
---
proxy_mode:
description: Configure Proxy Access to the Internet
default: No proxy

7
examples/004/README.md Normal file
View file

@ -0,0 +1,7 @@
A variable with type choice
"Foo" should not be an option to the "proxy_mode" variable.
Now the "proxy_mode" type is "choice", that means that there is a list of available values that can be selected.
We say that the "proxy_mode" variable is constrained (by choices): this variable accept, in fact, only a list of choices.

1
examples/004/config Symbolic link
View file

@ -0,0 +1 @@
../001/config

View file

@ -0,0 +1,11 @@
---
proxy_mode:
description: Configure Proxy Access to the Internet
type: choice
choices:
- No proxy
- Auto-detect proxy settings for this network
- Use system proxy settings
- Manual proxy configuration
- Automatic proxy configuration URL
default: No proxy

3
examples/005/README.md Normal file
View file

@ -0,0 +1,3 @@
Choice type is optional
The type is optional in choice type (if we have choices attributes, it's a choice option).

1
examples/005/config Symbolic link
View file

@ -0,0 +1 @@
../001/config

View file

@ -0,0 +1,10 @@
---
proxy_mode:
description: Configure Proxy Access to the Internet
choices:
- No proxy
- Auto-detect proxy settings for this network
- Use system proxy settings
- Manual proxy configuration
- Automatic proxy configuration URL
default: No proxy

14
examples/010/README.md Normal file
View file

@ -0,0 +1,14 @@
A family
The "manual" mode structural descriptions are write in a new files to separate things. But Rougail will concatenate variables and families.
We create a family, which will contain other variables.
This family has:
- a description
- a type
As there is no variable inside this family, the type is mandatory. Without it, Rougail will create a variable.
In fact, this family will be deleted by Rougail too because it is empty.

View file

@ -0,0 +1 @@
---

View file

@ -0,0 +1,2 @@
---
proxy_mode: Manual proxy configuration

View file

@ -0,0 +1,4 @@
---
manual:
description: Manual proxy configuration
type: family

BIN
examples/010/firefox.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
examples/010/firefox.xcf Normal file

Binary file not shown.

5
examples/011/README.md Normal file
View file

@ -0,0 +1,5 @@
Conditional desactived family
This family will be desactived if "proxy_mode" is not "manual proxy configuration".
Desactived a variable or a family means that this variable will never be accessible.

1
examples/011/config Symbolic link
View file

@ -0,0 +1 @@
../010/config

View file

@ -0,0 +1,8 @@
---
manual:
description: Manual proxy configuration
type: family
disabled:
type: variable
variable: proxy_mode
when_not: 'Manual proxy configuration'

7
examples/012/README.md Normal file
View file

@ -0,0 +1,7 @@
A sub family
Inside a family, we can have variables or families.
The "type" for family "manual" became unecessary because container an other family, so it's not a variable.
In disabled attribute, it's better tu use relative path (we will see the reason in an other slide).

1
examples/012/config Symbolic link
View file

@ -0,0 +1 @@
../010/config

View file

@ -0,0 +1,11 @@
---
manual:
description: Manual proxy configuration
disabled:
type: variable
variable: _.proxy_mode
when_not: 'Manual proxy configuration'
http_proxy:
description: HTTP Proxy
type: family

5
examples/013/README.md Normal file
View file

@ -0,0 +1,5 @@
Family in "shorthand" mode
The sub family is now in "shorthand" mode. In this mode we can only define "name" and "description" attributes.
Inside the sub family we add two variables (with domainname and port types).

View file

@ -0,0 +1 @@
---

View file

@ -0,0 +1,2 @@
---
proxy_mode: Manual proxy configuration

View file

@ -0,0 +1,5 @@
---
proxy_mode: Manual proxy configuration
manual:
http_proxy:
address: example.net

View file

@ -0,0 +1,6 @@
---
proxy_mode: Manual proxy configuration
manual:
http_proxy:
address: example.net
port: '3128'

View file

@ -0,0 +1,20 @@
---
manual:
description: Manual proxy configuration
disabled:
type: variable
variable: _.proxy_mode
when_not: 'Manual proxy configuration'
http_proxy: # HTTP Proxy
address:
description: HTTP address
type: domainname
params:
allow_ip: true
port:
description: HTTP Port
type: port
default: '8080'

3
examples/014/README.md Normal file
View file

@ -0,0 +1,3 @@
A boolean variable
Let's create a boolean variable.

View file

@ -0,0 +1,5 @@
---
proxy_mode: Manual proxy configuration
manual:
http_proxy:
address: example.net

View file

@ -0,0 +1,25 @@
---
manual:
description: Manual proxy configuration
disabled:
type: variable
variable: _.proxy_mode
when_not: 'Manual proxy configuration'
http_proxy: # HTTP Proxy
address:
description: HTTP address
type: domainname
params:
allow_ip: true
port:
description: HTTP Port
type: port
default: '8080'
use_for_https:
description: Also use this proxy for HTTPS
type: boolean
default: true

3
examples/015/README.md Normal file
View file

@ -0,0 +1,3 @@
Bases type is optional if default value
The type is deduct with the default value type. This is only true for "string", "number", "float" or "boolean" variables.

1
examples/015/config Symbolic link
View file

@ -0,0 +1 @@
../014/config

View file

@ -0,0 +1,24 @@
---
manual:
description: Manual proxy configuration
disabled:
type: variable
variable: _.proxy_mode
when_not: 'Manual proxy configuration'
http_proxy: # HTTP Proxy
address:
description: HTTP address
type: domainname
params:
allow_ip: true
port:
description: HTTP Port
type: port
default: '8080'
use_for_https:
description: Also use this proxy for HTTPS
default: true

9
examples/016/README.md Normal file
View file

@ -0,0 +1,9 @@
A variable in "shorthand" mode
Transform it in "shorthand" mode.
In this notation we can only define:
- name
- default value (so deduct the type)
- description

1
examples/016/config Symbolic link
View file

@ -0,0 +1 @@
../014/config

View file

@ -0,0 +1,22 @@
---
manual:
description: Manual proxy configuration
disabled:
type: variable
variable: _.proxy_mode
when_not: 'Manual proxy configuration'
http_proxy: # HTTP Proxy
address:
description: HTTP address
type: domainname
params:
allow_ip: true
port:
description: HTTP Port
type: port
default: '8080'
use_for_https: true # Also use this proxy for HTTPS

9
examples/017/README.md Normal file
View file

@ -0,0 +1,9 @@
Conditional hidden family and calculated default value
Add a sub family "https_proxy" which will be hidden if "use_for_https" is True.
Hidden means that we cannot change value, but we can access to it in read only mode. Inside, we add two variable with calculated default value (with variable type).
So, if user set "use_for_https" to True, the default values of HTTPS configuration will be a copy of HTTP values. The use can change HTTPS values if needed.
If user set "use_for_https" to False, the default values of HTTPS configuration will only be a copy of HTTP values.

1
examples/017/config Symbolic link
View file

@ -0,0 +1 @@
../014/config

View file

@ -0,0 +1,44 @@
---
manual:
description: Manual proxy configuration
disabled:
type: variable
variable: _.proxy_mode
when_not: 'Manual proxy configuration'
http_proxy: # HTTP Proxy
address:
description: HTTP address
type: domainname
params:
allow_ip: true
port:
description: HTTP Port
type: port
default: '8080'
use_for_https: true # Also use this proxy for HTTPS
https_proxy:
description: HTTPS Proxy
hidden:
type: variable
variable: _.use_for_https
address:
description: HTTPS address
type: domainname
params:
allow_ip: true
default:
type: variable
variable: __.http_proxy.address
port:
description: HTTPS Port
type: port
default:
type: variable
variable: __.http_proxy.port

15
examples/018/README.md Normal file
View file

@ -0,0 +1,15 @@
A dynamic family
HTTPS and socks proxy are very similar. It could be interesting to do on dynamic family instead of duplicate family and variable description.
First of all, we add a dynamic attribute to the family. Dynamic is here a static list of suffix. It could be a variable or jinja informations too.
The dynamic family is only hidden in the HTTPs case.
Hidden is now a Jinja calculation with a parameter named "suffix".
The suffix is use in:
- family name
- family description
- variables name
- variables description

View file

@ -0,0 +1,5 @@
---
proxy_mode: Manual proxy configuration
manual:
http_proxy:
address: http.proxy.net

View file

@ -0,0 +1,9 @@
---
proxy_mode: Manual proxy configuration
manual:
http_proxy:
address: http.proxy.net
port: '3128'
use_for_https: false
https_proxy:
address: https.proxy.net

View file

@ -0,0 +1,54 @@
---
manual:
description: Manual proxy configuration
disabled:
type: variable
variable: _.proxy_mode
when_not: 'Manual proxy configuration'
http_proxy: # HTTP Proxy
address:
description: HTTP address
type: domainname
params:
allow_ip: true
port:
description: HTTP Port
type: port
default: '8080'
use_for_https: true # Also use this proxy for HTTPS
"{{ suffix }}_proxy":
description: "{{ suffix }} Proxy"
type: dynamic
dynamic:
- HTTPS
- SOCKS
hidden:
type: jinja
jinja: |
{% if suffix == 'HTTPS' and _.use_for_https %}
HTTPS is same has HTTP
{% endif %}
params:
suffix:
type: suffix
address:
description: "{{ suffix }} address"
type: domainname
params:
allow_ip: true
default:
type: variable
variable: __.http_proxy.address
port:
description: "{{ suffix }} port"
type: port
default:
type: variable
variable: __.http_proxy.port

5
examples/019/README.md Normal file
View file

@ -0,0 +1,5 @@
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.

View file

@ -0,0 +1,5 @@
---
proxy_mode: Manual proxy configuration
manual:
http_proxy:
address: http.proxy.net

View file

@ -0,0 +1,9 @@
---
proxy_mode: Manual proxy configuration
manual:
http_proxy:
address: http.proxy.net
port: '3128'
use_for_https: false
https_proxy:
address: https.proxy.net

View file

@ -0,0 +1,74 @@
---
manual:
description: Manual proxy configuration
disabled:
type: variable
variable: _.proxy_mode
when_not: 'Manual proxy configuration'
http_proxy: # HTTP Proxy
address:
description: HTTP address
type: domainname
params:
allow_ip: true
port:
description: HTTP Port
type: port
default: '8080'
use_for_https: true # Also use this proxy for HTTPS
"{{ suffix }}_proxy":
description: "{{ suffix }} Proxy"
type: dynamic
dynamic:
- HTTPS
- SOCKS
hidden:
type: jinja
jinja: |
{% if suffix == 'HTTPS' and _.use_for_https %}
HTTPS is same has HTTP
{% endif %}
params:
suffix:
type: suffix
description: |
if "use_for_https" is set to True
address:
description: "{{ suffix }} address"
type: domainname
params:
allow_ip: true
default:
type: variable
variable: __.http_proxy.address
port:
description: "{{ suffix }} port"
type: port
default:
type: variable
variable: __.http_proxy.port
version:
description: SOCKS host version used by proxy
choices:
- v4
- v5
default: v5
disabled:
type: jinja
jinja: |
{% if suffix == 'HTTPS' %}
if HTTPS
{% endif %}
params:
suffix:
type: suffix
description: |
if not SOCKS

3
examples/020/README.md Normal file
View file

@ -0,0 +1,3 @@
A conditional disabled variable
Add a new "auto" variable.

View file

@ -0,0 +1,2 @@
---
proxy_mode: Automatic proxy configuration URL

View file

@ -0,0 +1,3 @@
---
proxy_mode: Automatic proxy configuration URL
auto: https://auto.proxy.net/wpad.dat

View file

@ -0,0 +1,12 @@
---
auto:
description: Automatic proxy configuration URL
type: web_address
disabled:
type: jinja
jinja: |
{% if _.proxy_mode != 'Automatic proxy configuration URL' %}
the proxy mode is not automatic
{% endif %}
description: |
if "firefox.proxy_mode" is not "automatic proxy configuration URL"

BIN
examples/020/firefox.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
examples/020/firefox.xcf Normal file

Binary file not shown.

4
examples/030/README.md Normal file
View file

@ -0,0 +1,4 @@
A conditional disabled variable
Add a new "no\_proxy" variable.

View file

@ -0,0 +1 @@
---

View file

@ -0,0 +1,4 @@
---
proxy_mode: Automatic proxy configuration URL
auto: https://auto.proxy.net/wpad.dat
no_proxy: 192.168.1.0/24

View file

@ -0,0 +1,16 @@
---
no_proxy:
description: Address for which proxy will be desactivated
type: "domainname"
params:
allow_ip: true
allow_cidr_network: true
allow_without_dot: true
allow_startswith_dot: true
disabled:
type: jinja
jinja: |
{% if _.proxy_mode == 'No proxy' %}
proxy mode is no proxy
{% endif %}
description: if "firefox.proxy_mode" is "No proxy"

3
examples/031/README.md Normal file
View file

@ -0,0 +1,3 @@
A variable multi
This variable accept multiple value.

View file

@ -0,0 +1 @@
---

View file

@ -0,0 +1,6 @@
---
proxy_mode: Automatic proxy configuration URL
auto: https://auto.proxy.net/wpad.dat
no_proxy:
- example.net
- 192.168.1.0/24

View file

@ -0,0 +1,3 @@
---
proxy_mode: Automatic proxy configuration URL
auto: https://auto.proxy.net/wpad.dat

View file

@ -0,0 +1,17 @@
---
no_proxy:
description: Address for which proxy will be desactivated
type: "domainname"
multi: true
params:
allow_ip: true
allow_cidr_network: true
allow_without_dot: true
allow_startswith_dot: true
disabled:
type: jinja
jinja: |
{% if _.proxy_mode == 'No proxy' %}
proxy mode is no proxy
{% endif %}
description: if "firefox.proxy_mode" is "No proxy"

1
examples/032/README.md Normal file
View file

@ -0,0 +1 @@
A non mandatory variable

1
examples/032/config Symbolic link
View file

@ -0,0 +1 @@
../031/config

View file

@ -0,0 +1,18 @@
---
no_proxy:
description: Address for which proxy will be desactivated
type: "domainname"
params:
allow_ip: true
allow_cidr_network: true
allow_without_dot: true
allow_startswith_dot: true
multi: true
mandatory: false
disabled:
type: jinja
jinja: |
{% if _.proxy_mode == 'No proxy' %}
proxy mode is no proxy
{% endif %}
description: if "firefox.proxy_mode" is "No proxy"

3
examples/033/README.md Normal file
View file

@ -0,0 +1,3 @@
Examples
We can add example (only for documentation).

1
examples/033/config Symbolic link
View file

@ -0,0 +1 @@
../031/config

View file

@ -0,0 +1,22 @@
---
no_proxy:
description: Address for which proxy will be desactivated
type: "domainname"
params:
allow_ip: true
allow_cidr_network: true
allow_without_dot: true
allow_startswith_dot: true
multi: true
mandatory: false
disabled:
type: jinja
jinja: |
{% if _.proxy_mode == 'No proxy' %}
proxy mode is no proxy
{% endif %}
description: if "firefox.proxy_mode" is "No proxy"
test:
- .mozilla.org
- .net.nz
- 192.168.1.0/24

3
examples/034/README.md Normal file
View file

@ -0,0 +1,3 @@
Help
We can add help informations for documentation.

View file

@ -0,0 +1 @@
---

View file

@ -0,0 +1,3 @@
---
proxy_mode: Automatic proxy configuration URL
auto: https://auto.proxy.net/wpad.dat

View file

@ -0,0 +1,6 @@
---
proxy_mode: Automatic proxy configuration URL
auto: https://auto.proxy.net/wpad.dat
no_proxy:
- .example.net
- 192.168.1.0/24

View file

@ -0,0 +1,23 @@
---
no_proxy:
description: Address for which proxy will be desactivated
type: "domainname"
params:
allow_ip: true
allow_cidr_network: true
allow_without_dot: true
allow_startswith_dot: true
multi: true
mandatory: false
disabled:
type: jinja
jinja: |
{% if _.proxy_mode == 'No proxy' %}
proxy mode is no proxy
{% endif %}
description: if "firefox.proxy_mode" is "No proxy"
test:
- .mozilla.org
- .net.nz
- 192.168.1.0/24
help: Connections to localhost, 127.0.0.1/8 and ::1 are never proxied

1
examples/040/README.md Normal file
View file

@ -0,0 +1 @@
A variable in avanced mode

View file

@ -0,0 +1 @@
---

View file

@ -0,0 +1,5 @@
---
proxy_mode: Manual proxy configuration
manual:
http_proxy:
address: http.proxy.net

View file

@ -0,0 +1,6 @@
---
proxy_mode: Manual proxy configuration
manual:
http_proxy:
address: http.proxy.net
proxy_dns_socks5: true

View file

@ -0,0 +1,7 @@
---
proxy_mode: Manual proxy configuration
manual:
http_proxy:
address: http.proxy.net
socks_proxy:
version: v4

View file

@ -0,0 +1,11 @@
---
prompt_authentication:
description: Prompt for authentication if password is saved
default: true
disabled:
type: jinja
jinja: |
{% if _.proxy_mode == 'No proxy' %}
proxy mode is no proxy
{% endif %}
description: if "firefox.proxy_mode" is "No proxy"

View file

@ -0,0 +1,20 @@
---
proxy_dns_socks5:
description: Use proxy DNS when using SOCKS v5
default: false
mode: advanced
disabled:
type: jinja
jinja: |
{% if _.proxy_mode != 'Manual proxy configuration' %}
the proxy mode is not manual
{% elif socks_version == 'v4' %}
socks version is v4
{% endif %}
params:
socks_version:
type: variable
variable: _.manual.socks_proxy.version
propertyerror: false
description: |
if "firefox.proxy_mode" is not "Manual proxy configuration" or "firefox.manual.socks_proxy.version" is "v4"

BIN
examples/040/firefox.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
examples/040/firefox.xcf Normal file

Binary file not shown.

1
examples/060/README.md Normal file
View file

@ -0,0 +1 @@
A boolean variable

View file

@ -0,0 +1 @@
---

View file

@ -0,0 +1,4 @@
---
dns_over_https: # DNS over HTTPS
enable_dns_over_https: false # Enable DNS over HTTPS

BIN
examples/060/firefox.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
examples/060/firefox.xcf Normal file

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more