forked from shaba/openuds
Fixing up things for 2.5
This commit is contained in:
parent
b9634bfd10
commit
a3eb1f6e3f
@ -39,8 +39,9 @@ from __future__ import unicode_literals
|
||||
from uds.core.util import OsDetector
|
||||
import six
|
||||
import os
|
||||
import urllib
|
||||
|
||||
__updated__ = '2017-09-01'
|
||||
__updated__ = '2017-09-18'
|
||||
|
||||
|
||||
class RDPFile(object):
|
||||
@ -210,6 +211,38 @@ class RDPFile(object):
|
||||
|
||||
return params
|
||||
|
||||
@property
|
||||
def as_cord_url(self):
|
||||
url = 'rdp://'
|
||||
|
||||
if self.username != '':
|
||||
url += urllib.quote(self.username)
|
||||
if self.password != '':
|
||||
url += ':' + urllib.quote(self.password)
|
||||
url += '@'
|
||||
url += self.address + '/'
|
||||
|
||||
if self.domain != '':
|
||||
url += self.domain
|
||||
|
||||
url += '?screenDepth###{}'.format(self.bpp)
|
||||
|
||||
if self.fullScreen: # @UndefinedVariable
|
||||
url += '&fullscreen###true'
|
||||
else:
|
||||
url += '&screenWidth###{}&screenHeight###{}'.format(self.width, self.height)
|
||||
|
||||
# url += '&forwardAudio###' + '01'[{m.r.redirectAudio}] # @UndefinedVariable
|
||||
|
||||
if self.redirectDrives: # @UndefinedVariable
|
||||
url += '&forwardDisks###true'
|
||||
|
||||
if self.redirectPrinters: # @UndefinedVariable
|
||||
url += '&forwardPrinters###true'
|
||||
|
||||
return url
|
||||
|
||||
|
||||
def getGeneric(self):
|
||||
password = "{password}"
|
||||
screenMode = self.fullScreen and "2" or "1"
|
||||
|
@ -44,7 +44,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
READY_CACHE_TIMEOUT = 30
|
||||
|
||||
__updated__ = '2017-09-01'
|
||||
__updated__ = '2017-09-18'
|
||||
|
||||
|
||||
class RDPTransport(BaseRDPTransport):
|
||||
@ -136,7 +136,7 @@ class RDPTransport(BaseRDPTransport):
|
||||
OsDetector.Linux: 'linux',
|
||||
OsDetector.Macintosh: 'macosx'
|
||||
|
||||
}.get(m.os)
|
||||
}.get(os['OS'])
|
||||
|
||||
if os is None:
|
||||
logger.ERROR('Os not detected for RDP Transport: {}'.format(request.META.get('HTTP_USER_AGENT', 'Unknown')))
|
||||
|
@ -47,9 +47,6 @@ if executable is None:
|
||||
<p>If both apps are installed, Remote Desktop Connection will be used as first option</p>
|
||||
'''.format(sp['this_server'])) # @UndefinedVariable
|
||||
|
||||
''')
|
||||
|
||||
|
||||
forwardThread, port = forward(sp['tunHost'], sp['tunPort'], sp['tunUser'], sp['tunPass'], sp['ip'], 3389, sp['tunWait']) # @UndefinedVariable
|
||||
address = '127.0.0.1:{}'.format(port)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user