VPN: WireGuard / Peer generator - pass endpoint to validator using a volatile field.

When the endpoint is invalid, the ios/android app will fail without mentioning a cause. Let's prevent obvious issues from happening.
This commit is contained in:
Ad Schellevis 2024-05-15 20:41:53 +02:00
parent 030ed198a7
commit 3f6b9ec4f9
2 changed files with 4 additions and 0 deletions

View File

@ -48,6 +48,9 @@
</check001>
</Constraints>
</serverport>
<endpoint type="IPPortField" volatile="true">
<ValidationMessage>Please specify a valid host:port combination.</ValidationMessage>
</endpoint>
<keepalive type="IntegerField">
<MinimumValue>1</MinimumValue>
<MaximumValue>86400</MaximumValue>

View File

@ -167,6 +167,7 @@
tunneladdress: $("#configbuilder\\.address").val(),
keepalive: $("#configbuilder\\.keepalive").val(),
server: instance_id,
endpoint: endpoint.val()
}
};
ajaxCall('/api/wireguard/client/addClientBuilder', peer, function(data, status) {