wireguard: support 'Table' and 'PersistentKeepalive'

This commit is contained in:
Ryan Cavicchioni 2024-04-14 17:52:35 -05:00
parent 0addb1e6a0
commit 7ca9b6dc8c

View File

@ -15,6 +15,9 @@ Address = {{ address }}
{% if "listen_port" in i %} {% if "listen_port" in i %}
ListenPort = {{ i.listen_port }} ListenPort = {{ i.listen_port }}
{% endif %} {% endif %}
{% if "table" in i %}
Table = {{ i.table }}
{% endif %}
{% endmacro -%} {% endmacro -%}
{%- macro render_peer(p) %} {%- macro render_peer(p) %}
@ -35,6 +38,12 @@ AllowedIPs = {{ p.allowed_ips }}
AllowedIPs = {{ p.allowed_ips | join(', ') }} AllowedIPs = {{ p.allowed_ips | join(', ') }}
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if "preshared_key" in p %}
PresharedKey = {{ p.preshared_key }}
{% endif %}
{% if "persistent_keepalive" in p %}
PersistentKeepalive = {{ p.persistent_keepalive }}
{% endif %}
{% endmacro -%} {% endmacro -%}
{% if wireguard_interfaces[_wireguard_interface] and {% if wireguard_interfaces[_wireguard_interface] and