21 lines
597 B
Django/Jinja
21 lines
597 B
Django/Jinja
[Interface]
|
|
ListenPort = {{ item.lport }}
|
|
PrivateKey = {{ item.privkey }}
|
|
|
|
{% for peername in item.peers %}
|
|
{% set peer = {}|combine({'name': peername}, item.peers[peername]) %}
|
|
|
|
[Peer]
|
|
# {{ peer.name }}
|
|
PublicKey = {{ peer.PublicKey }}
|
|
AllowedIPs = {{ peer.AllowedIPs|d(['0.0.0.0/0', '::/0'])|join(', ') }}
|
|
{% if peer.PresharedKey is defined %}
|
|
PresharedKey = {{ peer.PresharedKey }}
|
|
{% endif %}
|
|
{% if peer.Endpoint is defined %}
|
|
Endpoint = {{ peer.Endpoint }}
|
|
{% endif %}
|
|
{% if peer.PersistentKeepalive is defined %}
|
|
PersistentKeepalive = {{ peer.PersistentKeepalive }}
|
|
{% endif %}
|
|
{% endfor %}
|