first commit

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

5
001/README.md Normal file
View file

@ -0,0 +1,5 @@
# Description
We create a first variable "proxy\_mode".
This variable accept only a string has value.

View file

@ -0,0 +1,3 @@
---
version: 1.1
proxy_mode:

BIN
001/firefox.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
001/firefox.xcf Normal file

Binary file not shown.

3
002/README.md Normal file
View file

@ -0,0 +1,3 @@
# Description
We add a description for this variable.

View file

@ -0,0 +1,4 @@
---
version: 1.1
proxy_mode:
description: Configure Proxy Access to the Internet

5
003/README.md Normal file
View file

@ -0,0 +1,5 @@
# Description
This variable has "No proxy" has default value.
If user don't touch de value of this variable, the value is "No proxy".

View file

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

3
004/README.md Normal file
View file

@ -0,0 +1,3 @@
# Description
This variable accept, in fact, only a list of choices.

View file

@ -0,0 +1,12 @@
---
version: 1.1
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
005/README.md Normal file
View file

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

View file

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

12
010/README.md Normal file
View file

@ -0,0 +1,12 @@
# Description
The "manual" mode informations are write in a new files to separate things. But Rougail will concatenate variables and families.
We create a family, which will contain variables.
This family has:
- a description
- a type
The type is mandatory. Without it, Rougail will create a variable.

View file

@ -0,0 +1,5 @@
---
version: 1.1
manual:
description: Manual proxy configuration
type: family

BIN
010/firefox.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
010/firefox.xcf Normal file

Binary file not shown.

3
011/README.md Normal file
View file

@ -0,0 +1,3 @@
# Description
This family will be desactived if proxy\_mode is not "manual proxy configuration".

View file

@ -0,0 +1,12 @@
---
version: 1.1
manual:
description: Manual proxy configuration
type: family
disabled:
type: jinja
jinja: |
{% if proxy.proxy_mode != 'Manual proxy configuration' %}
the proxy mode is not manual
{% endif %}
description: if proxy_mode is not "manual proxy configuration"

5
012/README.md Normal file
View file

@ -0,0 +1,5 @@
# Description
We add a sub family.
The "type" for family "manual" became unecessary because container an other family, so it's not a variable.

View file

@ -0,0 +1,15 @@
---
version: 1.1
manual:
description: Manual proxy configuration
disabled:
type: jinja
jinja: |
{% if proxy.proxy_mode != 'Manual proxy configuration' %}
the proxy mode is not manual
{% endif %}
description: if proxy_mode is not "manual proxy configuration"
http_proxy:
description: HTTP Proxy
type: family

5
013/README.md Normal file
View file

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

View file

@ -0,0 +1,22 @@
---
version: 1.1
manual:
description: Manual proxy configuration
disabled:
type: jinja
jinja: |
{% if _.proxy.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'

3
014/README.md Normal file
View file

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

View file

@ -0,0 +1,27 @@
---
version: 1.1
manual:
description: Manual proxy configuration
disabled:
type: jinja
jinja: |
{% if _.proxy.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:
description: Also use this proxy for HTTPS
type: boolean
default: true

3
015/README.md Normal file
View file

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

View file

@ -0,0 +1,26 @@
---
version: 1.1
manual:
description: Manual proxy configuration
disabled:
type: jinja
jinja: |
{% if _.proxy.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:
description: Also use this proxy for HTTPS
default: true

10
016/README.md Normal file
View file

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

View file

@ -0,0 +1,24 @@
---
version: 1.1
manual:
description: Manual proxy configuration
disabled:
type: jinja
jinja: |
{% if _.proxy.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

5
017/README.md Normal file
View file

@ -0,0 +1,5 @@
# Description
Add a sub family "ssl\_proxy" which will "hidden" if "use\_for\_https" is True.
Hidden means that we cannot change value, but we can access to it in read only mode.

View file

@ -0,0 +1,31 @@
---
version: 1.1
manual:
description: Manual proxy configuration
disabled:
type: jinja
jinja: |
{% if _.proxy.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
ssl_proxy:
description: HTTPS Proxy
type: family
hidden:
type: variable
variable: proxy.manual.use_for_https

3
018/README.md Normal file
View file

@ -0,0 +1,3 @@
# Description
We add two variable with calculated default value (with Jinja type).

View file

@ -0,0 +1,53 @@
---
version: 1.1
manual:
description: Manual proxy configuration
disabled:
type: jinja
jinja: |
{% if _.proxy.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
ssl_proxy:
description: HTTPS Proxy
type: family
hidden:
type: variable
variable: proxy.manual.use_for_https
address:
description: HTTPS address
type: domainname
default:
type: jinja
jinja: |
{% if __.use_for_https %}
{{ __.http_proxy.address }}
{% endif %}
description: |
copy HTTP address if HTTPS proxy is declared to be the same as HTTP
port:
description: HTTPS Port
type: port
default:
type: jinja
jinja: |
{{ __.http_proxy.port }}
description: |
copy HTTP port

3
019/README.md Normal file
View file

@ -0,0 +1,3 @@
# Description
Add a new sub family "socks\_proxy" in advanced mode.

View file

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

3
020/README.md Normal file
View file

@ -0,0 +1,3 @@
# Description
Add a new "auto" variable.

View file

@ -0,0 +1,13 @@
---
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"

BIN
020/firefox.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
020/firefox.xcf Normal file

Binary file not shown.

4
030/README.md Normal file
View file

@ -0,0 +1,4 @@
# Description
Add a new "no\_proxy" variable.

View file

@ -0,0 +1,17 @@
---
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
disabled:
type: jinja
jinja: |
{% if _.proxy_mode == 'No proxy' %}
proxy mode is no proxy
{% endif %}
description: if proxy is "no proxy"

3
031/README.md Normal file
View file

@ -0,0 +1,3 @@
# Description
This variable accept multiple value.

View file

@ -0,0 +1,18 @@
---
version: 1.1
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 proxy is "no proxy"

3
032/README.md Normal file
View file

@ -0,0 +1,3 @@
# Description
This variable is not mandatory.

View file

@ -0,0 +1,19 @@
---
version: 1.1
no_proxy:
description: Address for which proxy will be desactivated
type: "domainname"
multi: true
mandatory: false
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 proxy is "no proxy"

3
033/README.md Normal file
View file

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

View file

@ -0,0 +1,23 @@
---
version: 1.1
no_proxy:
description: Address for which proxy will be desactivated
type: "domainname"
multi: true
mandatory: false
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 proxy is "no proxy"
test:
- .mozilla.org
- .net.nz
- 192.168.1.0/24

3
034/README.md Normal file
View file

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

View file

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

View file

@ -0,0 +1,12 @@
---
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"

BIN
040/firefox.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
040/firefox.xcf Normal file

Binary file not shown.

View file

@ -0,0 +1,21 @@
---
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"

BIN
050/firefox.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

BIN
050/firefox.xcf Normal file

Binary file not shown.

View file

@ -0,0 +1,5 @@
---
version: 1.1
dns_over_https:
description: DNS over HTTPS
enable_dns_over_https: false # Enable DNS over HTTPS

BIN
060/firefox.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
060/firefox.xcf Normal file

Binary file not shown.

View file

@ -0,0 +1,19 @@
---
version: 1.1
proxy:
dns_over_https:
description: 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 %}

View file

@ -0,0 +1,43 @@
---
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 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 provider is Custom
validators:
- type: jinja
jinja: |
{% if _.custom_dns_url.startswith('http://') %}
only https is allowed
{% endif %}
description: custom_dns_url must starts with 'https://' only

3
100/README.md Normal file
View file

@ -0,0 +1,3 @@
# Description

View file

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

View file

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

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 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 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 provider is Custom
validators:
- type: jinja
jinja: |
{% if _.custom_dns_url.startswith('http://') %}
only https is allowed
{% endif %}
description: custom_dns_url 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/>**Validators**:<br/>- the domain name can be an IP |
| **proxy.manual.http_proxy.port**<br/>[`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p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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 dynamiquement.
**Suffixes**: <br/>- HTTPS<br/>- SOCKS
| 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;&nbs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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; |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **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/>**Validators**:<br/>- the domain name can be an IP<br/>**Default**: 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**: 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/> |
| 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;&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bsp;&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 is "no proxy" |
| **proxy.prompt_authentication**<br/>[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` _`disabled`_ | Prompt for authentication if password is saved.<br/>**Default**: True<br/>**Disabled**: if "proxy.proxy_mode" is "No proxy" |
### DNS over HTTPS
`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;&nb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p;&nbsp;&nbsp;&nbsp;&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 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/>**Validators**:<br/>- custom_dns_url must starts with 'https://' only<br/>**Disabled**: if 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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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; |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **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) |
| **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
```

BIN
firefox.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

BIN
foxyproxy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

52
load.py Executable file
View file

@ -0,0 +1,52 @@
#!/usr/bin/env python3
from pathlib import Path
from ruamel.yaml import YAML
from rougail import Rougail, RougailConfig
from rougaildoc import RougailDoc
NUM="50"
if __name__ == "__main__":
rougailconfig = RougailConfig.copy()
# rougailconfig['dictionaries_dir'] = [f'{NUM}/dictionaries/rougail']
rougailconfig['variable_namespace'] = 'proxy'
rougailconfig['dictionaries_dir'] = ['all/proxy']
rougailconfig['extra_dictionaries'] = {'foxyproxy': ['all/foxyproxy']}
rougailconfig['tiramisu_cache'] = "cache.py"
# rougail = Rougail(rougailconfig)
# config = rougail.get_config()
# print(config.value.get())
output = 'github'
inventory = RougailDoc(rougailconfig=rougailconfig,
output=output,
title_level=2,
)
doc = inventory.formater.header()
doc += inventory.formater.title('Tutorial description files', 1)
yaml = YAML()
old_namespace = None
for r in [[rougailconfig['dictionaries_dir']], rougailconfig['extra_dictionaries'].values()]:
for dirs in r:
for d in dirs:
files = list(Path(d).iterdir())
files.sort()
print(files)
for f in files:
namespace = f.parent.name
if namespace != old_namespace:
doc += inventory.formater.title(namespace, 2)
if f.name.endswith('.yml') or f.name.endswith('.yaml'):
doc += inventory.formater.title(f.name, 3)
with f.open(encoding="utf8") as file_fh:
objects = yaml.load(file_fh)
doc += inventory.formater.yaml(objects)
old_namespace = namespace
doc += inventory.formater.title('Generated documentation', 1)
doc += inventory.gen_doc()
doc_file = Path('README.md')
with doc_file.open('w') as docfh:
docfh.write(doc)