diff --git a/templates/wireguard_client.conf b/templates/wireguard_client.conf index 4d737ae..eaa3784 100644 --- a/templates/wireguard_client.conf +++ b/templates/wireguard_client.conf @@ -11,6 +11,6 @@ ListenPort = {{ listenport }} PublicKey = {{ item.PublicKey }} AllowedIPs = {{ item.AllowedIPs }} {% if item.EndPointIP is defined and item.EndPointIP != '' %} -EndPoint = {{ item.EndPointIP }}:{{ listenport }} +EndPoint = {{ item.EndPointIP }}:{{ item.listenport | default(listenport) }} {% endif %} {% endif %}{% endfor %}