mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-06-07 00:46:58 +03:00
Added UseServerDNS option for clients who do not have to use the DNS specified in the server configuration. (#79)
This commit is contained in:
parent
de0c9fd26b
commit
2aa042b919
8 changed files with 49 additions and 9 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue