mirror of
https://github.com/dkmstr/openuds.git
synced 2025-03-20 06:50:23 +03:00
Add support parameters field to HTML5RDPTransport for configurable options
This commit is contained in:
parent
0a45c06284
commit
92eee92b29
@ -303,6 +303,13 @@ class HTML5RDPTransport(transports.Transport):
|
||||
old_field_name='customGEPath',
|
||||
)
|
||||
|
||||
support_params = ui.gui.TextField(
|
||||
label=_('Support parameters'),
|
||||
order=999,
|
||||
tooltip=_('Support provided parameters. Do not modify'),
|
||||
tab=types.ui.Tab.ADVANCED,
|
||||
)
|
||||
|
||||
def initialize(self, values: 'types.core.ValuesType') -> None:
|
||||
if not values:
|
||||
return
|
||||
@ -491,6 +498,14 @@ class HTML5RDPTransport(transports.Transport):
|
||||
if self.smooth.as_bool():
|
||||
params['enable-font-smoothing'] = 'true'
|
||||
|
||||
# if support_params is not empty, add it to the params
|
||||
# a comma separated list of key=value pairs
|
||||
if self.support_params.value.strip():
|
||||
for param in self.support_params.value.split(','):
|
||||
if '=' in param:
|
||||
key, value = param.split('=', 1)
|
||||
params[key.strip()] = value.strip()
|
||||
|
||||
logger.debug('RDP Params: %s', params)
|
||||
|
||||
ticket = models.TicketStore.create(params, validity=self.ticket_validity.as_int())
|
||||
|
Loading…
x
Reference in New Issue
Block a user