Added UseServerDNS option for clients who do not have to use the DNS specified in the server configuration. (#79)

This commit is contained in:
Gerwim 2021-08-05 19:58:01 +02:00 committed by GitHub
parent de0c9fd26b
commit 2aa042b919
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 49 additions and 9 deletions

View file

@ -155,6 +155,14 @@
<input type="text" data-role="tagsinput" class="form-control" id="client_allowed_ips"
value="0.0.0.0/0">
</div>
<div class="form-group">
<div class="icheck-primary d-inline">
<input type="checkbox" id="use_server_dns" checked>
<label for="use_server_dns">
Use server DNS
</label>
</div>
</div>
<div class="form-group">
<div class="icheck-primary d-inline">
<input type="checkbox" id="enabled" checked>
@ -276,6 +284,12 @@
const email = $("#client_email").val();
const allocated_ips = $("#client_allocated_ips").val().split(",");
const allowed_ips = $("#client_allowed_ips").val().split(",");
let use_server_dns = false;
if ($("#use_server_dns").is(':checked')){
use_server_dns = true;
}
let enabled = false;
if ($("#enabled").is(':checked')){
@ -283,7 +297,7 @@
}
const data = {"name": name, "email": email, "allocated_ips": allocated_ips, "allowed_ips": allowed_ips,
"enabled": enabled};
"use_server_dns": use_server_dns, "enabled": enabled};
$.ajax({
cache: false,