mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-07-13 18:18:15 +03:00
Make Interface PreDown setting. (#480)
This commit is contained in:
parent
af7742bfb3
commit
c8623082fe
3 changed files with 10 additions and 1 deletions
templates
|
@ -42,6 +42,12 @@ Wireguard Server Settings
|
|||
<input type="text" class="form-control" id="post_up" name="post_up"
|
||||
placeholder="Post Up Script" value="{{ .serverInterface.PostUp }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pre_down">Pre Down Script</label>
|
||||
<input type="text" class="form-control" id="pre_down" name="pre_down"
|
||||
placeholder="Pre Down Script" value="{{ .serverInterface.PreDown }}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="post_down">Post Down Script</label>
|
||||
<input type="text" class="form-control" id="post_down" name="post_down"
|
||||
|
@ -130,8 +136,9 @@ Wireguard Server Settings
|
|||
const addresses = $("#addresses").val().split(",");
|
||||
const listen_port = $("#listen_port").val();
|
||||
const post_up = $("#post_up").val();
|
||||
const pre_down = $("#pre_down").val();
|
||||
const post_down = $("#post_down").val();
|
||||
const data = {"addresses": addresses, "listen_port": listen_port, "post_up": post_up, "post_down": post_down};
|
||||
const data = {"addresses": addresses, "listen_port": listen_port, "post_up": post_up, "pre_down": pre_down, "post_down": post_down};
|
||||
|
||||
$.ajax({
|
||||
cache: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue