add wireguard persistent keepalive option

This commit is contained in:
Lukas Steiner
2018-12-18 19:13:01 +01:00
committed by Franco Fichtner
parent 3758144f7e
commit ff8dc29e84
3 changed files with 15 additions and 0 deletions
@@ -43,4 +43,10 @@
<type>text</type>
<help>Set port the endpoint listens to.</help>
</field>
<field>
<id>client.keepalive</id>
<label>Keepalive</label>
<type>text</type>
<help>Set persistent keepalive interval.</help>
</field>
</form>
@@ -35,6 +35,12 @@
<serverport type="PortField">
<Required>N</Required>
</serverport>
<keepalive type="IntegerField">
<MinimumValue>1</MinimumValue>
<MaximumValue>86400</MaximumValue>
<ValidationMessage>Please specify a value between 1 and 86400.</ValidationMessage>
<Required>N</Required>
</keepalive>
</client>
</clients>
</items>
@@ -27,6 +27,9 @@ AllowedIPs = {{ peerlist2_data.tunneladdress }}
{% if peerlist2_data.serveraddress|default('') != '' %}
Endpoint = {{ peerlist2_data.serveraddress }}:{{ peerlist2_data.serverport }}
{% endif %}
{% if peerlist2_data.keepalive|default('') != '' %}
PersistentKeepalive = {{ peerlist2_data.keepalive }}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}