Per-Arne Andersen
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
7 additions and
1 deletions
-
wg_dashboard_backend/templates/peer.j2
-
wg_dashboard_backend/templates/server.j2
|
|
@ -1,7 +1,9 @@ |
|
|
|
[Interface] |
|
|
|
Address = {{ data.peer.address }}/{{ data.server.subnet }}{%- if is_ipv6 -%},{{ data.peer.v6_address }}/{{ data.server.v6_subnet }}{%- endif %} |
|
|
|
PrivateKey = {{ data.peer.private_key }} |
|
|
|
{% if data.peer.dns %}DNS = {{ data.peer.dns }}{% endif %} |
|
|
|
{% if data.peer.dns %} |
|
|
|
DNS = {{ data.peer.dns }} |
|
|
|
{% endif %} |
|
|
|
|
|
|
|
[Peer] |
|
|
|
PublicKey = {{ data.server.public_key }} |
|
|
|
|
|
@ -3,8 +3,12 @@ Address = {{ data.address }}/{{ data.subnet }}{%- if is_ipv6 -%},{{ data.v6_addr |
|
|
|
ListenPort = {{ data.listen_port }} |
|
|
|
PrivateKey = {{ data.private_key }} |
|
|
|
|
|
|
|
{% if data.post_up or data.v6_post_up %} |
|
|
|
PostUp = {{ data.post_up }}{%- if is_ipv6 -%} {{ data.v6_post_up }}{%- endif %} |
|
|
|
{%- endif %} |
|
|
|
{% if data.post_down or data.v6_post_down %} |
|
|
|
PostDown = {{ data.post_down }}{%- if is_ipv6 -%} {{ data.v6_post_down }}{%- endif %} |
|
|
|
{%- endif %} |
|
|
|
|
|
|
|
{% for peer in data.peers %} |
|
|
|
[Peer] |
|
|
|