mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-06-07 00:46:58 +03:00
Add ForwardMark to global settings (#173)
This commit is contained in:
parent
100c4ee1f4
commit
a5fdb1ad1d
7 changed files with 30 additions and 4 deletions
|
@ -55,6 +55,12 @@ Global Settings
|
|||
name="persistent_keepalive" placeholder="Persistent Keepalive"
|
||||
value="{{if .globalSettings.PersistentKeepalive }}{{ .globalSettings.PersistentKeepalive }}{{end}}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="forward_mark">Forward Mark</label>
|
||||
<input type="text" class="form-control" id="forward_mark"
|
||||
name="forward_mark" placeholder="Forward Mark"
|
||||
value="{{ .globalSettings.ForwardMark }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="config_file_path">Wireguard Config File Path</label>
|
||||
<input type="text" class="form-control" id="config_file_path"
|
||||
|
@ -141,8 +147,9 @@ Global Settings
|
|||
const dns_servers = $("#dns_servers").val().split(",");
|
||||
const mtu = $("#mtu").val();
|
||||
const persistent_keepalive = $("#persistent_keepalive").val();
|
||||
const forward_mark = $("#forward_mark").val();
|
||||
const config_file_path = $("#config_file_path").val();
|
||||
const data = {"endpoint_address": endpoint_address, "dns_servers": dns_servers, "mtu": mtu, "persistent_keepalive": persistent_keepalive, "config_file_path": config_file_path};
|
||||
const data = {"endpoint_address": endpoint_address, "dns_servers": dns_servers, "mtu": mtu, "persistent_keepalive": persistent_keepalive, "forward_mark": forward_mark, "config_file_path": config_file_path};
|
||||
|
||||
$.ajax({
|
||||
cache: false,
|
||||
|
@ -211,6 +218,9 @@ Global Settings
|
|||
},
|
||||
config_file_path: {
|
||||
required: true
|
||||
},
|
||||
forward_mark: {
|
||||
required: false
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
|
@ -255,4 +265,4 @@ Global Settings
|
|||
});
|
||||
});
|
||||
</script>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue