From 842a6791101c607dd57ed4d5ab7944d1ab89e07e Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Sat, 2 Nov 2024 14:59:07 +0100 Subject: [PATCH] [tutorial 110] xxx (config and doc) --- README.md | 178 ++++++--------------------------------- config/01/config.yaml | 1 - config/01/output_ro.html | 14 --- config/02/config.yaml | 7 -- config/02/output_ro.html | 4 - config/03/config.yaml | 20 ----- config/03/output_ro.html | 57 ------------- 7 files changed, 26 insertions(+), 255 deletions(-) delete mode 100644 config/01/config.yaml delete mode 100644 config/01/output_ro.html delete mode 100644 config/02/config.yaml delete mode 100644 config/02/output_ro.html delete mode 100644 config/03/config.yaml delete mode 100644 config/03/output_ro.html diff --git a/README.md b/README.md index 7c0d788..8766797 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ - [Summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/branch/1.1/README.md) -- [[tutorial 103] xxx](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_103/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_103~1..v1.1_103)) +- [[tutorial 104] xxx](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_104/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_104~1..v1.1_104)) -# [tutorial 104] xxx +# [tutorial 110] xxx -[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_104~1..v1.1_104) +[View the diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_110~1..v1.1_110) ## Screenshot @@ -326,6 +326,27 @@ proxies: {% endif %} description: copy HTTP address if proxy is "Auto" +``` +### foxyproxy/10-redefine.yml + + +```yml +--- +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 @@ -407,155 +428,8 @@ This family contains lists of variable blocks. | **foxyproxy.proxies.color**
[`regexp`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` `auto modified` | Color.
**Default**: random color value. | | **foxyproxy.proxies.address**
[`domainname`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` _`disabled`_ | IP address, DNS name, server name.
**Validators**:
- the domain name can be a hostname
- the domain name can be an IP
**Default**: copy HTTP address if proxy is not "Manual".
**Disabled**: if type not in:
- HTTP
- HTTPS/SSL
- SOCKS4
- SOCKS5. | | **foxyproxy.proxies.port**
[`port`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` _`disabled`_ | Port.
**Default**: copy HTTP port if proxy is not "Manual".
**Disabled**: if type not in:
- HTTP
- HTTPS/SSL
- SOCKS4
- SOCKS5. | -| **foxyproxy.proxies.username**
[`unix_user`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` _`mandatory`_ _`disabled`_ | Username.
**Mandatory**: if a password is set.
**Disabled**: if type not in:
- HTTP
- HTTPS/SSL
- SOCKS4
- SOCKS5. | -| **foxyproxy.proxies.password**
[`secret`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` _`disabled`_ | Password.
**Disabled**: if type not in:
- HTTP
- HTTPS/SSL
- SOCKS4
- SOCKS5. | +| **foxyproxy.proxies.username**
[`unix_user`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` _`disabled`_ | Username.
**Disabled**: if type not in:
- HTTP
- HTTPS/SSL
- SOCKS4
- SOCKS5. | +| **foxyproxy.proxies.password**
[`secret`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` _`hidden`_ _`disabled`_ | Password.
**Hidden**: if username is not defined.
**Disabled**: if type not in:
- HTTP
- HTTPS/SSL
- SOCKS4
- SOCKS5. | | **foxyproxy.proxies.url**
[`web_address`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` _`disabled`_ | URL.
**Default**: copy HTTP address if proxy is "Auto".
**Disabled**: if type is not in:
- PAC URL
- WPAD. | -## User data - -### Example 1 - -#### config/01/config.yaml - - -```yml ---- - -``` -#### Output - -```console -foo@bar:~$ rougail -v 1.1 -m firefox/ -s Firefox -xn FoxyProxy -xd 0 foxyproxy/ --modes_level basic standard advanced -u file -ff config/01/config.yaml -``` -
╭────────────────────────── Caption ──────────────────────────╮
-│ Variable                           Default value            │
-│ Undocumented variable              Modified value           │
-│ Undocumented but modified variable (Original default value) │
-│ Unmodifiable variable                                       │
-╰─────────────────────────────────────────────────────────────╯
-Variables:
-┣━━ 📂 firefox
-┣━━ 📓 proxy_mode: No proxy
-┗━━ 📂 dns_over_https
-    ┗━━ 📓 enable_dns_over_https: False
-┗━━ 📂 foxyproxy
-    ┗━━ 📂 proxies
-
-### Example 2 - -#### config/02/config.yaml - - -```yml ---- -foxyproxy: - proxies: - - title: My company - color: '#66cc66' - type: HTTP - address: proxy.company.net - -``` -#### Output - -```console -foo@bar:~$ rougail -v 1.1 -m firefox/ -s Firefox -xn FoxyProxy -xd 0 foxyproxy/ --modes_level basic standard advanced -u file -ff config/02/config.yaml -``` -
🛑 ERRORS
-┣━━ The following variables are mandatory but have no value:
-┗━━   - foxyproxy.proxies.port (Port)
-
-### Example 3 - -#### config/03/config.yaml - - -```yml ---- -firefox: - proxy_mode: Manual proxy configuration - manual: - http_proxy: - address: http.proxy.net -foxyproxy: - proxies: - - title: My company - color: '#66cc66' - type: HTTP - - title: An other company - color: '#cc66cc' - type: SOCKS5 - username: my_user - password: my_password - - title: WPAD - color: '#1166cc' - type: WPAD - url: http://wpad.proxy.net/wpad.dat - -``` -#### Output - -```console -foo@bar:~$ rougail -v 1.1 -m firefox/ -s Firefox -xn FoxyProxy -xd 0 foxyproxy/ --modes_level basic standard advanced -u file -ff config/03/config.yaml -``` -
🛑 ERRORS
-┣━━ cannot access to option "foxyproxy.proxies.password" (Password) because has property "disabled" 
-(disabled)
-┣━━ cannot access to option "foxyproxy.proxies.url" (URL) because has property "disabled" (proxy does not
-need url)
-┗━━ cannot access to option "foxyproxy.proxies.username" (Username) because has property "disabled" 
-    (disabled)
-╭────────────────────────── Caption ──────────────────────────╮
-│ Variable                           Default value            │
-│ Undocumented variable              Modified value           │
-│ Undocumented but modified variable (Original default value) │
-│ Unmodifiable variable                                       │
-╰─────────────────────────────────────────────────────────────╯
-Variables:
-┣━━ 📂 firefox
-┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
-┣━━ 📂 manual
-┣━━ 📂 http_proxy
-┣━━ 📓 address: http.proxy.net
-┗━━ 📓 port: 8080
-┣━━ 📓 use_for_https: True
-┣━━ 📂 https_proxy
-┣━━ 📓 address: http.proxy.net
-┗━━ 📓 port: 8080
-┗━━ 📂 socks_proxy
-    ┣━━ 📓 address: http.proxy.net
-    ┣━━ 📓 port: 8080
-    ┗━━ 📓 version: v5
-┣━━ 📓 no_proxy :
-┣━━ 📓 prompt_authentication: True
-┣━━ 📓 proxy_dns_socks5: False
-┗━━ 📂 dns_over_https
-    ┗━━ 📓 enable_dns_over_https: False
-┗━━ 📂 foxyproxy
-    ┗━━ 📂 proxies
-        ┣━━ 📂 title
-        ┣━━ 📓 title: My company
-        ┣━━ 📓 type: HTTP (Direct (no proxy))
-        ┣━━ 📓 color: #66cc66
-        ┣━━ 📓 address: http.proxy.net
-        ┣━━ 📓 port: 8080
-        ┣━━ 📓 username: None
-        ┗━━ 📓 password: None
-        ┣━━ 📂 title
-        ┣━━ 📓 title: An other company
-        ┣━━ 📓 type: SOCKS5 (Direct (no proxy))
-        ┣━━ 📓 color: #cc66cc
-        ┣━━ 📓 address: http.proxy.net
-        ┣━━ 📓 port: 8080
-        ┣━━ 📓 username: my_user
-        ┗━━ 📓 password: **********
-        ┗━━ 📂 title
-            ┣━━ 📓 title: WPAD
-            ┣━━ 📓 type: WPAD (Direct (no proxy))
-            ┣━━ 📓 color: #1166cc
-            ┗━━ 📓 url: http://wpad.proxy.net/wpad.dat
-
- - -- [[tutorial 110] xxx](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_110/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_110~1..v1.1_110)) diff --git a/config/01/config.yaml b/config/01/config.yaml deleted file mode 100644 index ed97d53..0000000 --- a/config/01/config.yaml +++ /dev/null @@ -1 +0,0 @@ ---- diff --git a/config/01/output_ro.html b/config/01/output_ro.html deleted file mode 100644 index c3c7ebe..0000000 --- a/config/01/output_ro.html +++ /dev/null @@ -1,14 +0,0 @@ -
╭────────────────────────── Caption ──────────────────────────╮
-│ Variable                           Default value            │
-│ Undocumented variable              Modified value           │
-│ Undocumented but modified variable (Original default value) │
-│ Unmodifiable variable                                       │
-╰─────────────────────────────────────────────────────────────╯
-Variables:
-┣━━ 📂 firefox
-┣━━ 📓 proxy_mode: No proxy
-┗━━ 📂 dns_over_https
-    ┗━━ 📓 enable_dns_over_https: False
-┗━━ 📂 foxyproxy
-    ┗━━ 📂 proxies
-
diff --git a/config/02/config.yaml b/config/02/config.yaml deleted file mode 100644 index ffa7a24..0000000 --- a/config/02/config.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -foxyproxy: - proxies: - - title: My company - color: '#66cc66' - type: HTTP - address: proxy.company.net diff --git a/config/02/output_ro.html b/config/02/output_ro.html deleted file mode 100644 index 1c24b02..0000000 --- a/config/02/output_ro.html +++ /dev/null @@ -1,4 +0,0 @@ -
🛑 ERRORS
-┣━━ The following variables are mandatory but have no value:
-┗━━   - foxyproxy.proxies.port (Port)
-
diff --git a/config/03/config.yaml b/config/03/config.yaml deleted file mode 100644 index bf2cc98..0000000 --- a/config/03/config.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -firefox: - proxy_mode: Manual proxy configuration - manual: - http_proxy: - address: http.proxy.net -foxyproxy: - proxies: - - title: My company - color: '#66cc66' - type: HTTP - - title: An other company - color: '#cc66cc' - type: SOCKS5 - username: my_user - password: my_password - - title: WPAD - color: '#1166cc' - type: WPAD - url: http://wpad.proxy.net/wpad.dat diff --git a/config/03/output_ro.html b/config/03/output_ro.html deleted file mode 100644 index adddab8..0000000 --- a/config/03/output_ro.html +++ /dev/null @@ -1,57 +0,0 @@ -
🛑 ERRORS
-┣━━ cannot access to option "foxyproxy.proxies.password" (Password) because has property "disabled" 
-(disabled)
-┣━━ cannot access to option "foxyproxy.proxies.url" (URL) because has property "disabled" (proxy does not
-need url)
-┗━━ cannot access to option "foxyproxy.proxies.username" (Username) because has property "disabled" 
-    (disabled)
-╭────────────────────────── Caption ──────────────────────────╮
-│ Variable                           Default value            │
-│ Undocumented variable              Modified value           │
-│ Undocumented but modified variable (Original default value) │
-│ Unmodifiable variable                                       │
-╰─────────────────────────────────────────────────────────────╯
-Variables:
-┣━━ 📂 firefox
-┣━━ 📓 proxy_mode: Manual proxy configuration (No proxy)
-┣━━ 📂 manual
-┣━━ 📂 http_proxy
-┣━━ 📓 address: http.proxy.net
-┗━━ 📓 port: 8080
-┣━━ 📓 use_for_https: True
-┣━━ 📂 https_proxy
-┣━━ 📓 address: http.proxy.net
-┗━━ 📓 port: 8080
-┗━━ 📂 socks_proxy
-    ┣━━ 📓 address: http.proxy.net
-    ┣━━ 📓 port: 8080
-    ┗━━ 📓 version: v5
-┣━━ 📓 no_proxy :
-┣━━ 📓 prompt_authentication: True
-┣━━ 📓 proxy_dns_socks5: False
-┗━━ 📂 dns_over_https
-    ┗━━ 📓 enable_dns_over_https: False
-┗━━ 📂 foxyproxy
-    ┗━━ 📂 proxies
-        ┣━━ 📂 title
-        ┣━━ 📓 title: My company
-        ┣━━ 📓 type: HTTP (Direct (no proxy))
-        ┣━━ 📓 color: #66cc66
-        ┣━━ 📓 address: http.proxy.net
-        ┣━━ 📓 port: 8080
-        ┣━━ 📓 username: None
-        ┗━━ 📓 password: None
-        ┣━━ 📂 title
-        ┣━━ 📓 title: An other company
-        ┣━━ 📓 type: SOCKS5 (Direct (no proxy))
-        ┣━━ 📓 color: #cc66cc
-        ┣━━ 📓 address: http.proxy.net
-        ┣━━ 📓 port: 8080
-        ┣━━ 📓 username: my_user
-        ┗━━ 📓 password: **********
-        ┗━━ 📂 title
-            ┣━━ 📓 title: WPAD
-            ┣━━ 📓 type: WPAD (Direct (no proxy))
-            ┣━━ 📓 color: #1166cc
-            ┗━━ 📓 url: http://wpad.proxy.net/wpad.dat
-