forked from shaba/openuds
Merge remote-tracking branch 'origin/v3.5'
This commit is contained in:
commit
7d5ff93946
@ -72,6 +72,7 @@ class RDPTransport(BaseRDPTransport):
|
|||||||
allowClipboard = BaseRDPTransport.allowClipboard
|
allowClipboard = BaseRDPTransport.allowClipboard
|
||||||
allowAudio = BaseRDPTransport.allowAudio
|
allowAudio = BaseRDPTransport.allowAudio
|
||||||
allowWebcam = BaseRDPTransport.allowWebcam
|
allowWebcam = BaseRDPTransport.allowWebcam
|
||||||
|
usbRedirection = BaseRDPTransport.usbRedirection
|
||||||
|
|
||||||
wallpaper = BaseRDPTransport.wallpaper
|
wallpaper = BaseRDPTransport.wallpaper
|
||||||
multimon = BaseRDPTransport.multimon
|
multimon = BaseRDPTransport.multimon
|
||||||
@ -143,6 +144,7 @@ class RDPTransport(BaseRDPTransport):
|
|||||||
r.printerString = self.printerString.value
|
r.printerString = self.printerString.value
|
||||||
r.linuxCustomParameters = self.customParameters.value
|
r.linuxCustomParameters = self.customParameters.value
|
||||||
r.enforcedShares = self.enforceDrives.value
|
r.enforcedShares = self.enforceDrives.value
|
||||||
|
r.redirectUSB = self.usbRedirection.value
|
||||||
|
|
||||||
osName = {
|
osName = {
|
||||||
OsDetector.KnownOS.Windows: 'windows',
|
OsDetector.KnownOS.Windows: 'windows',
|
||||||
|
@ -161,15 +161,34 @@ class BaseRDPTransport(transports.Transport):
|
|||||||
tab=gui.PARAMETERS_TAB,
|
tab=gui.PARAMETERS_TAB,
|
||||||
defvalue=gui.FALSE,
|
defvalue=gui.FALSE,
|
||||||
)
|
)
|
||||||
|
usbRedirection = gui.ChoiceField(
|
||||||
|
label=_('USB redirection'),
|
||||||
|
order=28,
|
||||||
|
tooltip=_('USB redirection policy'),
|
||||||
|
defvalue='false',
|
||||||
|
values=[
|
||||||
|
{'id': 'false', 'text': 'Allow none'},
|
||||||
|
{'id': 'true', 'text': 'Allow all'},
|
||||||
|
{'id': '{ca3e7ab9-b4c3-4ae6-8251-579ef933890f}', 'text': 'Cameras'},
|
||||||
|
{'id': '{4d36e967-e325-11ce-bfc1-08002be10318}', 'text': 'Disk Drives'},
|
||||||
|
{'id': '{4d36e979-e325-11ce-bfc1-08002be10318}', 'text': 'Printers'},
|
||||||
|
{'id': '{50dd5230-ba8a-11d1-bf5d-0000f805f530}', 'text': 'Smartcards'},
|
||||||
|
{'id': '{745a17a0-74d3-11d0-b6fe-00a0c90f57da}', 'text': 'HIDs'},
|
||||||
|
|
||||||
|
],
|
||||||
|
tab=gui.PARAMETERS_TAB,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
credssp = gui.CheckBoxField(
|
credssp = gui.CheckBoxField(
|
||||||
label=_('Credssp Support'),
|
label=_('Credssp Support'),
|
||||||
order=28,
|
order=29,
|
||||||
tooltip=_('If checked, will enable Credentials Provider Support)'),
|
tooltip=_('If checked, will enable Credentials Provider Support)'),
|
||||||
tab=gui.PARAMETERS_TAB,
|
tab=gui.PARAMETERS_TAB,
|
||||||
defvalue=gui.TRUE,
|
defvalue=gui.TRUE,
|
||||||
)
|
)
|
||||||
rdpPort = gui.NumericField(
|
rdpPort = gui.NumericField(
|
||||||
order=29,
|
order=30,
|
||||||
length=5, # That is, max allowed value is 65535
|
length=5, # That is, max allowed value is 65535
|
||||||
label=_('RDP Port'),
|
label=_('RDP Port'),
|
||||||
tooltip=_('Use this port as RDP port. Defaults to 3389.'),
|
tooltip=_('Use this port as RDP port. Defaults to 3389.'),
|
||||||
@ -180,7 +199,7 @@ class BaseRDPTransport(transports.Transport):
|
|||||||
|
|
||||||
screenSize = gui.ChoiceField(
|
screenSize = gui.ChoiceField(
|
||||||
label=_('Screen Size'),
|
label=_('Screen Size'),
|
||||||
order=30,
|
order=31,
|
||||||
tooltip=_('Screen size for this transport'),
|
tooltip=_('Screen size for this transport'),
|
||||||
defvalue='-1x-1',
|
defvalue='-1x-1',
|
||||||
values=[
|
values=[
|
||||||
@ -204,7 +223,7 @@ class BaseRDPTransport(transports.Transport):
|
|||||||
|
|
||||||
colorDepth = gui.ChoiceField(
|
colorDepth = gui.ChoiceField(
|
||||||
label=_('Color depth'),
|
label=_('Color depth'),
|
||||||
order=31,
|
order=32,
|
||||||
tooltip=_('Color depth for this connection'),
|
tooltip=_('Color depth for this connection'),
|
||||||
defvalue='24',
|
defvalue='24',
|
||||||
values=[
|
values=[
|
||||||
@ -218,7 +237,7 @@ class BaseRDPTransport(transports.Transport):
|
|||||||
|
|
||||||
wallpaper = gui.CheckBoxField(
|
wallpaper = gui.CheckBoxField(
|
||||||
label=_('Wallpaper/theme'),
|
label=_('Wallpaper/theme'),
|
||||||
order=32,
|
order=33,
|
||||||
tooltip=_(
|
tooltip=_(
|
||||||
'If checked, the wallpaper and themes will be shown on machine (better user experience, more bandwidth)'
|
'If checked, the wallpaper and themes will be shown on machine (better user experience, more bandwidth)'
|
||||||
),
|
),
|
||||||
@ -226,7 +245,7 @@ class BaseRDPTransport(transports.Transport):
|
|||||||
)
|
)
|
||||||
multimon = gui.CheckBoxField(
|
multimon = gui.CheckBoxField(
|
||||||
label=_('Multiple monitors'),
|
label=_('Multiple monitors'),
|
||||||
order=33,
|
order=34,
|
||||||
tooltip=_(
|
tooltip=_(
|
||||||
'If checked, all client monitors will be used for displaying (only works on windows clients)'
|
'If checked, all client monitors will be used for displaying (only works on windows clients)'
|
||||||
),
|
),
|
||||||
@ -234,20 +253,20 @@ class BaseRDPTransport(transports.Transport):
|
|||||||
)
|
)
|
||||||
aero = gui.CheckBoxField(
|
aero = gui.CheckBoxField(
|
||||||
label=_('Allow Desk.Comp.'),
|
label=_('Allow Desk.Comp.'),
|
||||||
order=34,
|
order=35,
|
||||||
tooltip=_('If checked, desktop composition will be allowed'),
|
tooltip=_('If checked, desktop composition will be allowed'),
|
||||||
tab=gui.DISPLAY_TAB,
|
tab=gui.DISPLAY_TAB,
|
||||||
)
|
)
|
||||||
smooth = gui.CheckBoxField(
|
smooth = gui.CheckBoxField(
|
||||||
label=_('Font Smoothing'),
|
label=_('Font Smoothing'),
|
||||||
defvalue=gui.TRUE,
|
defvalue=gui.TRUE,
|
||||||
order=35,
|
order=36,
|
||||||
tooltip=_('If checked, fonts smoothing will be allowed'),
|
tooltip=_('If checked, fonts smoothing will be allowed'),
|
||||||
tab=gui.DISPLAY_TAB,
|
tab=gui.DISPLAY_TAB,
|
||||||
)
|
)
|
||||||
showConnectionBar = gui.CheckBoxField(
|
showConnectionBar = gui.CheckBoxField(
|
||||||
label=_('Connection Bar'),
|
label=_('Connection Bar'),
|
||||||
order=36,
|
order=37,
|
||||||
tooltip=_('If checked, connection bar will be shown (only on Windows clients)'),
|
tooltip=_('If checked, connection bar will be shown (only on Windows clients)'),
|
||||||
tab=gui.DISPLAY_TAB,
|
tab=gui.DISPLAY_TAB,
|
||||||
defvalue=gui.TRUE,
|
defvalue=gui.TRUE,
|
||||||
|
@ -56,6 +56,7 @@ class RDPFile:
|
|||||||
redirectSmartcards = False
|
redirectSmartcards = False
|
||||||
redirectAudio = True
|
redirectAudio = True
|
||||||
redirectWebcam = False
|
redirectWebcam = False
|
||||||
|
redirectUSB = 'false' # Can have, false, true, or a GUID
|
||||||
compression = True
|
compression = True
|
||||||
multimedia = True
|
multimedia = True
|
||||||
alsa = True
|
alsa = True
|
||||||
@ -266,6 +267,13 @@ class RDPFile:
|
|||||||
res += 'drivestoredirect:s:{}DynamicDrives\n'.format(enforcedSharesStr)
|
res += 'drivestoredirect:s:{}DynamicDrives\n'.format(enforcedSharesStr)
|
||||||
res += 'devicestoredirect:s:*\n'
|
res += 'devicestoredirect:s:*\n'
|
||||||
|
|
||||||
|
if self.redirectUSB != 'false':
|
||||||
|
if self.redirectUSB == 'true':
|
||||||
|
res += 'usbdevicestoredirect:s:*\n'
|
||||||
|
else:
|
||||||
|
# add the USB device to the list of devices to redirect
|
||||||
|
res += 'usbdevicestoredirect:s:{}\n'.format(self.redirectUSB)
|
||||||
|
|
||||||
res += 'enablecredsspsupport:i:{}\n'.format(
|
res += 'enablecredsspsupport:i:{}\n'.format(
|
||||||
0 if self.enablecredsspsupport is False else 1
|
0 if self.enablecredsspsupport is False else 1
|
||||||
)
|
)
|
||||||
|
@ -111,6 +111,7 @@ class TRDPTransport(BaseRDPTransport):
|
|||||||
allowClipboard = BaseRDPTransport.allowClipboard
|
allowClipboard = BaseRDPTransport.allowClipboard
|
||||||
allowAudio = BaseRDPTransport.allowAudio
|
allowAudio = BaseRDPTransport.allowAudio
|
||||||
allowWebcam = BaseRDPTransport.allowWebcam
|
allowWebcam = BaseRDPTransport.allowWebcam
|
||||||
|
usbRedirection = BaseRDPTransport.usbRedirection
|
||||||
|
|
||||||
wallpaper = BaseRDPTransport.wallpaper
|
wallpaper = BaseRDPTransport.wallpaper
|
||||||
multimon = BaseRDPTransport.multimon
|
multimon = BaseRDPTransport.multimon
|
||||||
@ -195,6 +196,7 @@ class TRDPTransport(BaseRDPTransport):
|
|||||||
r.printerString = self.printerString.value
|
r.printerString = self.printerString.value
|
||||||
r.linuxCustomParameters = self.customParameters.value
|
r.linuxCustomParameters = self.customParameters.value
|
||||||
r.enforcedShares = self.enforceDrives.value
|
r.enforcedShares = self.enforceDrives.value
|
||||||
|
r.redirectUSB = self.usbRedirection.value
|
||||||
|
|
||||||
osName = {
|
osName = {
|
||||||
OsDetector.KnownOS.Windows: 'windows',
|
OsDetector.KnownOS.Windows: 'windows',
|
||||||
|
Loading…
Reference in New Issue
Block a user