Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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(','))) + "'" }}]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we do this to keep closer to the original and move join to the end?

Suggested change
bootstrap_resolvers = [{{ "'" + ("','".join(OPNsense.dnscryptproxy.general.fallback_resolver.split(','))) + "'" }}]
bootstrap_resolvers = ['{{ OPNsense.dnscryptproxy.general.fallback_resolver.split(',') | join("','") }}']

Copy link
Author

@hodorogandrei hodorogandrei Jan 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fichtner Thank you for the suggestion! 🙏 The Jinja2 filter syntax is indeed more readable and idiomatic:

bootstrap_resolvers = ['{{ OPNsense.dnscryptproxy.general.fallback_resolver.split(',') | join("','") }}']

However, I intentionally matched the existing pattern used elsewhere in this template for consistency.

Line 4:

server_names = [{{ "'" + ("','".join(OPNsense.dnscryptproxy.general.serverlist.split(','))) + "'" }}]

Line 8:

disabled_server_names = [{{ "'" + ("','".join(OPNsense.dnscryptproxy.general.disabled_serverlist.split(','))) + "'" }}]

Line 12:

listen_addresses = [{{ "'" + ("','".join(OPNsense.dnscryptproxy.general.listen_addresses.split(','))) + "'" }}]

Line 192:

via=[{{ "'" + ("','".join(OPNsense.dnscryptproxy.general.relaylist.split(','))) + "'" }}]

Options (I'm happy to go either way):

  • Option A — Keep current syntax for consistency with existing code

  • Option B — Use the suggested Jinja2 filter syntax and update all occurrences (lines 4, 8, 12, 98, 192) to standardise

NOTE: If you prefer Option B, I can submit a follow-up commit refactoring all five occurrences to the cleaner filter syntax.

Please let me know your preference!


{% if helpers.exists('OPNsense.dnscryptproxy.general.ignore_system_dns') and OPNsense.dnscryptproxy.general.ignore_system_dns == '1' %}
ignore_system_dns = true
Expand Down