Port upstream security fixes and features from ngoduykhanh/wireguard-ui
- Escape HTML in client list and wake-on-LAN names to prevent XSS - Log successful/failed login attempts with remote address - Fix leading-comma bug in AllowedIPs template when only extra allowed IPs are set - Add PreUp script support for server interfaces (alongside existing PostUp/PreDown/PostDown) - Fix endpoint parsing to support IPv6 addresses (upstream PR #223) Cherry-picked from upstream PRs #656, #653, #680, #673, #223. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
5a7709bc6e
commit
fc0d192e59
@@ -143,6 +143,10 @@ All Servers
|
||||
<input type="text" class="form-control" id="_iface_listen_port" name="_iface_listen_port"
|
||||
placeholder="e.g. 51822">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="_iface_pre_up" class="control-label">Pre Up Script</label>
|
||||
<input type="text" class="form-control" id="_iface_pre_up" placeholder="Pre Up Script">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="_iface_post_up" class="control-label">Post Up Script</label>
|
||||
<input type="text" class="form-control" id="_iface_post_up" placeholder="Post Up Script">
|
||||
@@ -439,6 +443,7 @@ All Servers
|
||||
modal.find("#_iface_server_id").val(serverId);
|
||||
modal.find("#_iface_addresses").val((obj.Interface && obj.Interface.addresses) ? obj.Interface.addresses.join(", ") : "");
|
||||
modal.find("#_iface_listen_port").val(obj.Interface ? obj.Interface.listen_port : "");
|
||||
modal.find("#_iface_pre_up").val(obj.Interface ? obj.Interface.pre_up : "");
|
||||
modal.find("#_iface_post_up").val(obj.Interface ? obj.Interface.post_up : "");
|
||||
modal.find("#_iface_pre_down").val(obj.Interface ? obj.Interface.pre_down : "");
|
||||
modal.find("#_iface_post_down").val(obj.Interface ? obj.Interface.post_down : "");
|
||||
@@ -455,6 +460,7 @@ All Servers
|
||||
const data = {
|
||||
"addresses": addresses,
|
||||
"listen_port": $("#_iface_listen_port").val(),
|
||||
"pre_up": $("#_iface_pre_up").val(),
|
||||
"post_up": $("#_iface_post_up").val(),
|
||||
"pre_down": $("#_iface_pre_down").val(),
|
||||
"post_down": $("#_iface_post_down").val()
|
||||
|
||||
Reference in New Issue
Block a user