1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-22 13:34:04 +03:00

Merge remote-tracking branch 'origin/v3.6'

This commit is contained in:
Adolfo Gómez García 2023-02-14 14:30:19 +01:00
commit bf21aad72f
No known key found for this signature in database
GPG Key ID: DD1ABF20724CDA23
3 changed files with 15 additions and 5 deletions

View File

@ -682,7 +682,11 @@ class ProxmoxClient:
'port': res.get('port', None),
'secure_port': res['tls-port'],
'cert_subject': res['host-subject'],
'ticket': {'value': res['password'], 'expiry': ''},
'ticket': {
'value': res['password'],
'expiry': '',
},
'ca': res.get('ca', None),
}
# Sample data:
# 'data': {'proxy': 'http://pvealone.dkmon.com:3128',
@ -696,4 +700,4 @@ class ProxmoxClient:
# 'toggle-fullscreen': 'Shift+F11',
# 'host-subject': 'OU=PVE Cluster Node,O=Proxmox Virtual Environment,CN=pvealone.dkmon.com',
# 'tls-port': 61000,
# 'ca': '-----BEGIN CERTIFICATE-----\\n......\\n-----END CERTIFICATE-----\\n'}}
# 'ca': '-----BEGIN CERTIFICATE-----\\n......\\n-----END CERTIFICATE-----\\n'}}

View File

@ -86,8 +86,6 @@ class SPICETransport(BaseSpiceTransport):
logger.debug('Connection data: %s', con)
# Spice connection
con = userServiceInstance.getConsoleConnection()
port: str = con['port'] or '-1'
secure_port: str = con['secure_port'] or '-1'
@ -96,7 +94,7 @@ class SPICETransport(BaseSpiceTransport):
port,
secure_port,
con['ticket']['value'],
self.serverCertificate.value,
self.serverCertificate.value.strip() or con.get('ca', ''),
con['cert_subject'],
fullscreen=self.fullScreen.isTrue(),
)

View File

@ -130,6 +130,14 @@ class BaseSpiceTransport(transports.Transport):
pattern=gui.TextField.PatternTypes.URL,
)
overridedProxy = gui.TextField(
order=10,
label=_('Override Proxy'),
tooltip=_('If not empty, this proxy will be used to connect to the service instead of the one provided by the hypervisor. Format: http://host:port'),
required=False,
tab=gui.ADVANCED_TAB,
)
def isAvailableFor(self, userService: 'models.UserService', ip: str) -> bool:
"""
Checks if the transport is available for the requested destination ip