rougail-tutorials_builder/062/dictionaries/proxy/60-dns_over_https.yml
2024-07-21 11:52:28 +02:00

44 lines
1.1 KiB
YAML

---
version: 1.1
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 %}
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