Add WireGuard VPN

This commit is contained in:
2021-05-07 00:24:52 -04:00
parent ef8f38c09e
commit e3a89aecc2
4 changed files with 73 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
[Interface]
PrivateKey = {{ wgkey['content'] | b64decode | trim }}
Address = {{ wireguard.address }}
{% if wireguard.listenport is defined %}
ListenPort = {{ wireguard.listenport }}
{% endif %}
{% for peer in wireguard.peers %}
[Peer]
PublicKey = {{ peer.publickey }}
{% if peer.endpoint is defined %}
Endpoint = {{ peer.endpoint }}
{% endif %}
AllowedIPs = {{ peer.allowedips }}
{% if peer.keepalive is defined %}
PersistentKeepalive = {{ peer.keepalive }}
{% endif %}
{% endfor %}