No description
Find a file
2024-08-06 10:05:23 +02:00
examples first commit 2024-08-06 10:05:23 +02:00
build.py first commit 2024-08-06 10:05:23 +02:00
build.sh first commit 2024-08-06 10:05:23 +02:00
firefox.png first commit 2024-08-06 10:05:23 +02:00
foxyproxy.png first commit 2024-08-06 10:05:23 +02:00
LICENSE Initial commit 2024-07-21 11:26:02 +02:00
load.py first commit 2024-08-06 10:05:23 +02:00
README.md first commit 2024-08-06 10:05:23 +02:00

Table of Contents

Tutorial description files

proxy

00-proxy.yml

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

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

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

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

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

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

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

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

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
choice standard mandatory
Configure Proxy Access to the Internet.
Choices:
- No proxy ← (default)
- Auto-detect proxy settings for this network
- Use system proxy settings
- Manual proxy configuration
- 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                                                                                                                  Description                                                                                                              
proxy.manual.http_proxy.address
domainname basic mandatory
HTTP address.
Validator: the domain name can be an IP
proxy.manual.http_proxy.port
port standard mandatory
HTTP Port.
Default: 8080
Variable                                                                                                                  Description                                                                                                              
proxy.manual.use_for_https
boolean standard mandatory
Also use this proxy for HTTPS.
Default: True

"HTTPS Proxy" ou "SOCKS Proxy"

standard hidden

Hidden: if HTTPS and HTTPS is same has HTTP

Cette famille constuit des familles dynamiquement.

Suffixes:
- HTTPS
- SOCKS

Variable                                                                                                                  Description                                                                                                              
proxy.manual.https_proxy.address +
proxy.manual.socks_proxy.address
domainname standard mandatory
Address.
Validator: the domain name can be an IP
Default: the value of the variable "proxy.manual.http_proxy.address"
proxy.manual.https_proxy.port +
proxy.manual.socks_proxy.port
port standard mandatory
Port.
Default: the value of the variable "proxy.manual.http_proxy.port"
proxy.manual.https_proxy.version +
proxy.manual.socks_proxy.version
choice standard mandatory disabled
SOCKS host version used by proxy.
Choices:
- v4
- v5 ← (default)
Disabled: if not SOCKS
Variable                                                                                                                  Description                                                                                                              
proxy.auto
web_address basic mandatory disabled
Automatic proxy configuration URL.
Disabled: if "proxy.proxy_mode" is not "automatic proxy configuration URL"
proxy.no_proxy
domainname standard disabled unique multiple
Address for which proxy will be desactivated.
Connections to localhost, 127.0.0.1/8 and ::1 are never proxied.
Validators:
- the domain name can starts by a dot
- the domain name can be only a hostname
- the domain name can be an IP
- the domain name can be network in CIDR format
Examples:
- .mozilla.org
- .net.nz
- 192.168.1.0/24
Disabled: if "proxy.proxy_mode" is "No proxy"
proxy.prompt_authentication
boolean standard mandatory disabled
Prompt for authentication if password is saved.
Default: True
Disabled: if "proxy.proxy_mode" is "No proxy"

DNS over HTTPS

basic

Variable                                                                                                                  Description                                                                                                              
proxy.dns_over_https.enable_dns_over_https
boolean standard mandatory
Enable DNS over HTTPS.
Default: False
proxy.dns_over_https.provider
choice standard mandatory disabled
Use Provider.
Choices:
- Cloudflare ← (default)
- NextDNS
- Custom
Disabled: if "proxy.dns_over_https.enable_dns_over_https" is not False
proxy.dns_over_https.custom_dns_url
web_address basic mandatory disabled
Custom DNS URL.
Validator: must starts with 'https://' only
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                                                                                                                  Description                                                                                                              
foxyproxy.proxies.title
string basic mandatory unique multiple
Title or Description.
foxyproxy.proxies.color
string basic mandatory
Color.
foxyproxy.proxies.type
choice standard mandatory
Type.
Choices:
- HTTP
- HTTPS/SSL
- SOCKS4
- SOCKS5
- PAC URL
- WPAD
- System (use system settings)
- Direct (no proxy) ← (default)
foxyproxy.proxies.address
string standard mandatory disabled multiple
IP address, DNS name, server name.
Default: copy HTTP address if proxy is not "Manual"
Disabled: if type not in:
- HTTP
- HTTPS/SSL
- SOCKS4
- SOCKS5
foxyproxy.proxies.port
port 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 standard disabled
Username.
Disabled: if type not in:
- HTTP
- HTTPS/SSL
- SOCKS4
- SOCKS5
foxyproxy.proxies.password
secret basic mandatory hidden disabled
Password.
Hidden: if username is not defined
Disabled: if type not in:
- HTTP
- HTTPS/SSL
- SOCKS4
- SOCKS5
foxyproxy.proxies.url
web_address basic mandatory disabled
URL.
Disabled: if type is not in:
- PAC URL
- WPAD

Exemple avec les variables obligatoires non renseignées

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

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