fix: 监控时增加只读模式参数, 提升安全性 (#290)

看参考 https://guacamole.apache.org/doc/gug/configuring-guacamole.html
read-only参数
This commit is contained in:
x_zhuo
2022-10-26 22:27:13 +08:00
committed by GitHub
parent 320eecdfd1
commit f87d44d38b
2 changed files with 6 additions and 0 deletions

View File

@ -52,6 +52,7 @@ const (
SwapRedBlue = "swap-red-blue"
DestHost = "dest-host"
DestPort = "dest-port"
ReadOnly = "read-only"
UsernameRegex = "username-regex"
PasswordRegex = "password-regex"
@ -83,6 +84,10 @@ func NewConfiguration() (config *Configuration) {
return config
}
func (opt *Configuration) SetReadOnlyMode() {
opt.Parameters[ReadOnly] = "true"
}
func (opt *Configuration) SetParameter(name, value string) {
opt.Parameters[name] = value
}