mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-07-25 19:54:06 +03:00
Fix PreUp, PostUp, PreDown, and PostDown
* Escaping HTML in several places. * Adds PreUp config when one didn't exist. * Adds environment variable support for PreUp and PreDown. closes #549 closes #655 closes #656 See also -------- - https://github.com/samrocketman/addons-homeassistant/issues/9 Co-authored-by: Robert Willert <rwillert@users.noreply.github.com>
This commit is contained in:
parent
2fdafd34ca
commit
2084a81297
10 changed files with 55 additions and 22 deletions
|
@ -58,7 +58,9 @@ const (
|
|||
LogLevel = "WGUI_LOG_LEVEL"
|
||||
ServerAddressesEnvVar = "WGUI_SERVER_INTERFACE_ADDRESSES"
|
||||
ServerListenPortEnvVar = "WGUI_SERVER_LISTEN_PORT"
|
||||
ServerPreUpScriptEnvVar = "WGUI_SERVER_PRE_UP_SCRIPT"
|
||||
ServerPostUpScriptEnvVar = "WGUI_SERVER_POST_UP_SCRIPT"
|
||||
ServerPreDownScriptEnvVar = "WGUI_SERVER_PRE_DOWN_SCRIPT"
|
||||
ServerPostDownScriptEnvVar = "WGUI_SERVER_POST_DOWN_SCRIPT"
|
||||
DefaultClientAllowedIpsEnvVar = "WGUI_DEFAULT_CLIENT_ALLOWED_IPS"
|
||||
DefaultClientExtraAllowedIpsEnvVar = "WGUI_DEFAULT_CLIENT_EXTRA_ALLOWED_IPS"
|
||||
|
|
10
util/html.go
Normal file
10
util/html.go
Normal file
|
@ -0,0 +1,10 @@
|
|||
package util
|
||||
|
||||
import (
|
||||
"html"
|
||||
)
|
||||
|
||||
func EscapeHtmlCode(s string) string {
|
||||
encodedString := html.EscapeString(s)
|
||||
return encodedString
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue