fix: 监控时增加只读模式参数, 提升安全性 (#290)
看参考 https://guacamole.apache.org/doc/gug/configuring-guacamole.html read-only参数
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user