Add mobile configuration & load keys from paths

This commit is contained in:
sonny 2021-12-31 19:16:00 +01:00
parent 16a979b04b
commit 56331232e6
13 changed files with 106 additions and 183 deletions

View file

@ -9,11 +9,11 @@ Description=WireGuard tunnel wg0
ListenPort={{ vpn_port }}
PrivateKey={{ vpn_server_key }}
{% for peer in vpn_peers %}
{% for peer, properties in vpn_peers.items() %}
[WireGuardPeer]
PublicKey={{ peer.public_key }}
PresharedKey={{ peer.preshared_key }}
AllowedIPs={{ peer.ip }}/32
PublicKey={{ properties.public_key }}
PresharedKey={{ properties.preshared_key }}
AllowedIPs={{ properties.ip }}/32
{% if not loop.last %}
{% endif %}