diff --git a/server/src/uds/transports/SPICE/remote_viewer_file.py b/server/src/uds/transports/SPICE/remote_viewer_file.py index f9a48571..a777afae 100644 --- a/server/src/uds/transports/SPICE/remote_viewer_file.py +++ b/server/src/uds/transports/SPICE/remote_viewer_file.py @@ -65,6 +65,7 @@ class RemoteViewerFile: usb_auto_share: bool = True new_usb_auto_share: bool = False delete_file: bool = True + ssl_connection: bool = False def __init__( self, @@ -101,6 +102,7 @@ class RemoteViewerFile: delete_file = '01'[self.delete_file] usb_auto_share = '01'[self.usb_auto_share] new_usb_auto_share = '01'[self.new_usb_auto_share] + ssl_connection = '01'[self.ssl_connection] ca = self.ca.strip().replace( '\n', '\\n' @@ -121,6 +123,6 @@ class RemoteViewerFile: host_subject=self.host_subject if tls_port != '-1' else '', ca=ca if tls_port != '-1' else '', secure_channel='secure-channels=main;inputs;cursor;playback;record;display;usbredir;smartcard' - if tls_port != '-1' + if ssl_connection and tls_port != '-1' else '', ) diff --git a/server/src/uds/transports/SPICE/spice.py b/server/src/uds/transports/SPICE/spice.py index dcf2f86f..5463c0e7 100644 --- a/server/src/uds/transports/SPICE/spice.py +++ b/server/src/uds/transports/SPICE/spice.py @@ -64,6 +64,7 @@ class SPICETransport(BaseSpiceTransport): usbShare = BaseSpiceTransport.usbShare autoNewUsbShare = BaseSpiceTransport.autoNewUsbShare smartCardRedirect = BaseSpiceTransport.smartCardRedirect + sslConnection = BaseSpiceTransport.SSLConnection def getUDSTransportScript( self, @@ -98,6 +99,7 @@ class SPICETransport(BaseSpiceTransport): r.usb_auto_share = self.usbShare.isTrue() r.new_usb_auto_share = self.autoNewUsbShare.isTrue() r.smartcard = self.smartCardRedirect.isTrue() + r.ssl = self.sslConnection.isTrue() osName = { OsDetector.KnownOS.Windows: 'windows', diff --git a/server/src/uds/transports/SPICE/spice_base.py b/server/src/uds/transports/SPICE/spice_base.py index 005ff65c..69f15a42 100644 --- a/server/src/uds/transports/SPICE/spice_base.py +++ b/server/src/uds/transports/SPICE/spice_base.py @@ -113,6 +113,12 @@ class BaseSpiceTransport(transports.Transport): defvalue=gui.FALSE, tab=gui.ADVANCED_TAB, ) + SSLConnection = gui.CheckBoxField( + order=9, + label=_('SSL Connection'), + tooltip=_('If checked, SPICE protocol will required SSL connection.'), + defvalue=gui.FALSE, + ) def isAvailableFor(self, userService: 'models.UserService', ip: str) -> bool: """