Commit 4712d6be authored by nanahira's avatar nanahira

dns

parent 3e66b113
...@@ -7,7 +7,7 @@ FwMark = {{conn.localGatewayMark}} ...@@ -7,7 +7,7 @@ FwMark = {{conn.localGatewayMark}}
{% endif %} {% endif %}
MTU = {{conn.mtu|int - 80}} MTU = {{conn.mtu|int - 80}}
Table = off Table = off
{% if dns is defined and (inventory_hostname_short == "103" and conn.name == "mc-drjin" or inventory_hostname_short == "218" and conn.name != "mc-drjin") %} {% if dns != "" and (inventory_hostname_short == "103" and conn.name == "mc-drjin" or inventory_hostname_short == "218" and conn.name != "mc-drjin") %}
DNS = {{dns}} DNS = {{dns}}
{% endif %} {% endif %}
PostUp = dev=%i localPeerAddress={{conn.localPeerAddress}} remotePeerAddress={{conn.remotePeerAddress}} remoteMark={{conn.remoteMark}} inbound={{conn.inbound}} outbound={{conn.outbound}} mtu={{conn.mtu|int - 80}} /etc/wireguard/postup.sh PostUp = dev=%i localPeerAddress={{conn.localPeerAddress}} remotePeerAddress={{conn.remotePeerAddress}} remoteMark={{conn.remoteMark}} inbound={{conn.inbound}} outbound={{conn.outbound}} mtu={{conn.mtu|int - 80}} /etc/wireguard/postup.sh
......
...@@ -9,7 +9,7 @@ FwMark = {{conn.localGatewayMark}} ...@@ -9,7 +9,7 @@ FwMark = {{conn.localGatewayMark}}
{% endif %} {% endif %}
MTU = {{conn.mtu|int - 80}} MTU = {{conn.mtu|int - 80}}
Table = off Table = off
{% if dns is defined and (inventory_hostname_short == "103" and conn.name == "mc-drjin" or inventory_hostname_short == "218" and conn.name != "mc-drjin") %} {% if dns != "" and (inventory_hostname_short == "103" and conn.name == "mc-drjin" or inventory_hostname_short == "218" and conn.name != "mc-drjin") %}
DNS = {{dns}} DNS = {{dns}}
{% endif %} {% endif %}
PostUp = dev=%i localPeerAddress={{conn.localPeerAddress}} remotePeerAddress={{conn.remotePeerAddress}} remoteMark={{conn.remoteMark}} inbound={{conn.inbound}} outbound={{conn.outbound}} mtu={{conn.mtu|int - 80}} /etc/wireguard/postup.sh PostUp = dev=%i localPeerAddress={{conn.localPeerAddress}} remotePeerAddress={{conn.remotePeerAddress}} remoteMark={{conn.remoteMark}} inbound={{conn.inbound}} outbound={{conn.outbound}} mtu={{conn.mtu|int - 80}} /etc/wireguard/postup.sh
......
...@@ -83,7 +83,7 @@ class InventoryBuilder { ...@@ -83,7 +83,7 @@ class InventoryBuilder {
const connections = []; const connections = [];
const null_connection = "10000,null"; const null_connection = "10000,null";
const lan_interfaces = host.lan_interfaces.length > 0 ? host.lan_interfaces.split(",") : []; const lan_interfaces = host.lan_interfaces.length > 0 ? host.lan_interfaces.split(",") : [];
const dns = host.dns.length > 0 ? host.dns : undefined; const dns = host.dns;
for (const h of this.connections) { for (const h of this.connections) {
if (h != host.name) { if (h != host.name) {
const to = host[h]; const to = host[h];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment