forked from shaba/openuds
Merge remote-tracking branch 'origin/v2.1'
This commit is contained in:
commit
4a16707be3
@ -46,7 +46,7 @@ import logging
|
||||
import random
|
||||
import string
|
||||
|
||||
__updated__ = '2016-11-07'
|
||||
__updated__ = '2017-01-09'
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@ -82,13 +82,13 @@ class TX2GOTransport(BaseX2GOTransport):
|
||||
raise BaseX2GOTransport.ValidationException(_('Must use HOST:PORT in Tunnel Server Field'))
|
||||
|
||||
def getUDSTransportScript(self, userService, transport, ip, os, user, password, request):
|
||||
priv, pub = self.getAndPushKey('user', userService)
|
||||
|
||||
prefs = user.prefs('nx')
|
||||
|
||||
ci = self.getConnectionInfo(userService, user, password)
|
||||
username = ci['username']
|
||||
|
||||
priv, pub = self.getAndPushKey(username, userService)
|
||||
|
||||
width, height = CommonPrefs.getWidthHeight(prefs)
|
||||
|
||||
logger.debug('')
|
||||
@ -102,7 +102,8 @@ class TX2GOTransport(BaseX2GOTransport):
|
||||
windowManager=self.desktopType.value,
|
||||
exports=self.exports.isTrue(),
|
||||
width=width,
|
||||
height=height
|
||||
height=height,
|
||||
user=username
|
||||
)
|
||||
|
||||
tunpass = ''.join(random.choice(string.letters + string.digits) for _i in range(12))
|
||||
|
@ -40,7 +40,7 @@ from . import x2gofile
|
||||
|
||||
import logging
|
||||
|
||||
__updated__ = '2016-11-07'
|
||||
__updated__ = '2017-01-09'
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@ -67,12 +67,11 @@ class X2GOTransport(BaseX2GOTransport):
|
||||
quality = BaseX2GOTransport.quality
|
||||
|
||||
def getUDSTransportScript(self, userService, transport, ip, os, user, password, request):
|
||||
priv, pub = self.getAndPushKey('user', userService)
|
||||
|
||||
prefs = user.prefs('nx')
|
||||
|
||||
ci = self.getConnectionInfo(userService, user, password)
|
||||
username = ci['username']
|
||||
priv, pub = self.getAndPushKey(username, userService)
|
||||
|
||||
width, height = CommonPrefs.getWidthHeight(prefs)
|
||||
|
||||
@ -85,7 +84,8 @@ class X2GOTransport(BaseX2GOTransport):
|
||||
windowManager=self.desktopType.value,
|
||||
exports=self.exports.isTrue(),
|
||||
width=width,
|
||||
height=height
|
||||
height=height,
|
||||
user=username
|
||||
)
|
||||
|
||||
# data
|
||||
|
@ -67,7 +67,7 @@ print=true
|
||||
name=UDS/connect
|
||||
icon=:/img/icons/128x128/x2gosession.png
|
||||
host={{ip}}
|
||||
user=user
|
||||
user={user}
|
||||
key={{keyFile}}
|
||||
rdpport=3389
|
||||
sshport={{port}}
|
||||
@ -94,7 +94,7 @@ sshproxyautologin=false
|
||||
sshproxykrblogin=false
|
||||
'''
|
||||
|
||||
def getTemplate(speed, pack, quality, sound, soundSystem, windowManager, exports, width, height):
|
||||
def getTemplate(speed, pack, quality, sound, soundSystem, windowManager, exports, width, height, user):
|
||||
trueFalse = lambda(x): 'true' if x else 'false'
|
||||
export = 'export="{export}"' if exports else ''
|
||||
if width == -1 or height == -1:
|
||||
@ -113,5 +113,6 @@ def getTemplate(speed, pack, quality, sound, soundSystem, windowManager, exports
|
||||
export=export,
|
||||
width=width,
|
||||
height=height,
|
||||
fullscreen=fullscreen
|
||||
fullscreen=fullscreen,
|
||||
user=user
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user