forked from shaba/openuds
Merged 3.0 HTML5 RDP changes
This commit is contained in:
parent
af52727862
commit
328d35a289
@ -246,11 +246,16 @@ class HTML5RDPTransport(transports.Transport):
|
||||
|
||||
forceNewWindow = gui.ChoiceField(
|
||||
order=91,
|
||||
tooltip=_(
|
||||
'If checked, every connection will try to open its own window instead of reusing the "global" one.'
|
||||
),
|
||||
label=_('Force new HTML Window'),
|
||||
tooltip=_('Select windows behavior for new connections on HTML5'),
|
||||
required=True,
|
||||
values=[
|
||||
gui.choiceItem(gui.FALSE, _('Open every connection on the same window, but keeps UDS window.')),
|
||||
gui.choiceItem(gui.TRUE, _('Force every connection to be opened on a new window.')),
|
||||
gui.choiceItem('overwrite', _('Override UDS window and replace it with the connection.')),
|
||||
],
|
||||
defvalue=gui.FALSE,
|
||||
tab=gui.ADVANCED_TAB,
|
||||
tab=gui.ADVANCED_TAB
|
||||
)
|
||||
|
||||
def initialize(self, values: 'Module.ValuesType'):
|
||||
@ -412,11 +417,13 @@ class HTML5RDPTransport(transports.Transport):
|
||||
|
||||
ticket = models.TicketStore.create(params, validity=self.ticketValidity.num())
|
||||
|
||||
onw = (
|
||||
'&o_n_w={};'.format(hash(transport.name))
|
||||
if self.forceNewWindow.isTrue()
|
||||
else ''
|
||||
)
|
||||
onw = ''
|
||||
if self.forceNewWindow.value == gui.TRUE:
|
||||
onw = 'o_n_w={}'
|
||||
elif self.forceNewWindow.value == 'overwrite':
|
||||
onw = 'o_s_w=yes'
|
||||
onw = onw.format(hash(transport.name))
|
||||
|
||||
return str(
|
||||
"{}/guacamole/#/?data={}.{}{}".format(
|
||||
self.guacamoleServer.value, ticket, scrambler, onw
|
||||
|
@ -191,7 +191,13 @@ class HTML5VNCTransport(transports.Transport):
|
||||
scrambler = cryptoManager().randomString(32)
|
||||
ticket = models.TicketStore.create(params, validity=self.ticketValidity.num())
|
||||
|
||||
onw = '&o_n_w={};'.format(hash(transport.name)) if self.forceNewWindow.isTrue() else ''
|
||||
onw = ''
|
||||
if self.forceNewWindow.value == gui.TRUE:
|
||||
onw = 'o_n_w={}'
|
||||
elif self.forceNewWindow.value == 'overwrite':
|
||||
onw = 'o_s_w=yes'
|
||||
onw = onw.format(hash(transport.name))
|
||||
|
||||
return str(
|
||||
"{}/guacamole/#/?data={}.{}{}".format(
|
||||
self.guacamoleServer.value,
|
||||
|
Loading…
Reference in New Issue
Block a user