mirror of
https://github.com/trailofbits/algo.git
synced 2025-07-25 06:53:00 +02:00
- Adds an extra line after the if statement. Jinja2 trims such blocks by default in Ansible. Fixes #965 - More appropriate way to configure DNS servers - Removes `DNS` option from the wireguard server config - Fixes dnscrypt-proxy restart
17 lines
758 B
Django/Jinja
17 lines
758 B
Django/Jinja
[Interface]
|
|
Address = {{ wireguard_network_ipv4['subnet'] }}/{{ wireguard_network_ipv4['prefix'] }}{% if ipv6_support %},{{ wireguard_network_ipv6['gateway'] }}/{{ wireguard_network_ipv6['prefix'] }}
|
|
{% endif %}
|
|
|
|
ListenPort = {{ wireguard_port }}
|
|
PrivateKey = {{ lookup('file', wireguard_config_path + '/private/' + IP_subject_alt_name) }}
|
|
SaveConfig = true
|
|
Table = off
|
|
|
|
{% for u in users %}
|
|
|
|
[Peer]
|
|
# {{ u }}
|
|
PublicKey = {{ lookup('file', wireguard_config_path + '/public/' + u) }}
|
|
AllowedIPs = {{ wireguard_network_ipv4['clients_range'] }}.{{ wireguard_network_ipv4['clients_start'] + loop.index }}/32{% if ipv6_support %},{{ wireguard_network_ipv6['clients_range'] }}{{ wireguard_network_ipv6['clients_start'] + loop.index }}/128
|
|
{% endif %}
|
|
{% endfor %}
|