dns/dnscrypt-proxy: fix bootstrap_resolvers with multiple comma-separated servers

When multiple bootstrap resolvers are configured in the "Fallback Resolver"
field (e.g., "1.1.1.1:53,9.9.9.9:53"), the generated config incorrectly
places the comma inside a single string:

  bootstrap_resolvers = ['1.1.1.1:53,9.9.9.9:53']

This causes dnscrypt-proxy to fail with:

  [FATAL] Bootstrap resolver [...]: Host does not parse as IP '1.1.1.1:53,9.9.9.9:53'

The fix applies the same split/join pattern already used for listen_addresses,
server_names, disabled_server_names, and relaylist in the same template:

  bootstrap_resolvers = ['1.1.1.1:53','9.9.9.9:53']

This bug was introduced in commit 1eec51a65 which renamed fallback_resolver
to bootstrap_resolvers but did not update the template syntax from a single
string to a TOML array format.
This commit is contained in:
Andrei Hodorog 2026-01-23 05:42:18 +00:00
parent f6576fb536
commit 8f5146f610

View file

@ -95,7 +95,7 @@ tls_disable_session_tickets = true
tls_disable_session_tickets = false
{% endif %}
bootstrap_resolvers = ['{{ OPNsense.dnscryptproxy.general.fallback_resolver }}']
bootstrap_resolvers = [{{ "'" + ("','".join(OPNsense.dnscryptproxy.general.fallback_resolver.split(','))) + "'" }}]
{% if helpers.exists('OPNsense.dnscryptproxy.general.ignore_system_dns') and OPNsense.dnscryptproxy.general.ignore_system_dns == '1' %}
ignore_system_dns = true