Move variables to 1 place

Much easier to manage
This commit is contained in:
Jake Howard
2020-01-17 22:31:50 +00:00
parent 7b57e438c1
commit 78fa36f20a
11 changed files with 89 additions and 76 deletions

View File

@ -40,23 +40,23 @@ defaults
listen https
bind *:443
mode tcp
server default {{ wireguard.intersect_ip }}:443 check send-proxy
server default {{ wireguard.intersect.ip }}:443 check send-proxy
listen http
bind *:80
stats enable
stats show-node
stats uri /haproxy
stats auth stats:{{ haproxy_stats_pass }}
server default {{ wireguard.intersect_ip }}:80 check
stats auth stats:{{ haproxy.stats_pass }}
server default {{ wireguard.intersect.ip }}:80 check
listen matrix
bind *:8448
mode tcp
server default {{ wireguard.intersect_ip }}:8448 check
server default {{ wireguard.clients.intersect.ip }}:8448 check
listen gitea
bind *:3022
mode tcp
server default {{ wireguard.intersect_ip }}:3022 check
server default {{ wireguard.clients.intersect.ip }}:3022 check

View File

@ -1,9 +1,11 @@
[Interface]
Address = {{ wireguard.server_ip }}
PrivateKey = {{ wireguard.server_private_key }}
ListenPort = {{ wireguard.server_port }}
Address = {{ wireguard.server.ip }}
PrivateKey = {{ wireguard.server.private_key }}
ListenPort = {{ wireguard.port }}
{% for name, config in wireguard.clients.items() %}
[Peer]
# intersect
PublicKey = {{ wireguard.intersect_public_key }}
AllowedIPs = {{ wireguard.intersect_ip }}/32
# {{ name }}
PublicKey = {{ config.public_key }}
AllowedIPs = {{ config.ip }}/32
{% endfor %}