mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-09-06 01:30:48 +03:00
add new client save
This commit is contained in:
parent
3af15f58b9
commit
6ea4b6b7a7
3 changed files with 13 additions and 3 deletions
|
@ -298,6 +298,12 @@
|
|||
const allocated_ips = $("#client_allocated_ips").val().split(",");
|
||||
const allowed_ips = $("#client_allowed_ips").val().split(",");
|
||||
let use_server_dns = false;
|
||||
let extra_allowed_ips = [];
|
||||
|
||||
if ($("#client_extra_allowed_ips").val() !== "") {
|
||||
extra_allowed_ips = $("#client_extra_allowed_ips").val().split(",");
|
||||
}
|
||||
|
||||
|
||||
if ($("#use_server_dns").is(':checked')){
|
||||
use_server_dns = true;
|
||||
|
@ -310,7 +316,7 @@
|
|||
}
|
||||
|
||||
const data = {"name": name, "email": email, "allocated_ips": allocated_ips, "allowed_ips": allowed_ips,
|
||||
"use_server_dns": use_server_dns, "enabled": enabled};
|
||||
"extra_allowed_ips": extra_allowed_ips, "use_server_dns": use_server_dns, "enabled": enabled};
|
||||
|
||||
$.ajax({
|
||||
cache: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue