The branch, twofactorauth has been updated via a065dc391babac16ce5597b5026e9cf0e032e068 (commit) from ba8aaead73f6dae6a33744cedb667de6f2b0910b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: x2go/proxy.py | 63 +++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 22 deletions(-) The diff of changes is: diff --git a/x2go/proxy.py b/x2go/proxy.py index b81dd2c..5dd8c35 100644 --- a/x2go/proxy.py +++ b/x2go/proxy.py @@ -165,18 +165,7 @@ class X2goProxy(threading.Thread): # update the proxy port in PROXY_ARGS self._update_local_proxy_socket(local_graphics_port) - - if (_X2GOCLIENT_OS == "Windows") and (len(",".join(self.PROXY_OPTIONS)) >= 250): - _options_filename = os.path.join(self.session_info.local_container, 'options') - options = open(_options_filename, 'w') - options.write(','.join(self.PROXY_OPTIONS)) - options.close() - self.PROXY_OPTIONS= [ 'nx/nx', 'options=%s' % os.path.join('..', "S-%s" % self.session_info.name, 'options'), ] - - cmd_line = [ self.PROXY_CMD, ] - cmd_line.append(self.PROXY_MODE) - _proxy_options = "%s:%s" % (",".join(self.PROXY_OPTIONS), self.PROXY_DISPLAY) - cmd_line.append(_proxy_options) + cmd_line = self._generate_cmdline() # resume sessions needs a fraction of time for the forward_tunnel to be created... # TODO: call some code that checks if the tunnel is already up... @@ -197,6 +186,9 @@ class X2goProxy(threading.Thread): def _update_local_proxy_socket(self, port): pass + def _generate_cmdline(self): + return '' + def start_proxy(self): """\ Start the thread runner and wait for the proxy to come up. @@ -236,16 +228,27 @@ class X2goNX3Proxy(X2goProxy): "NX_ROOT": os.path.join(_LOCAL_HOME, _X2GO_SESSION_ROOTDIR) }) self.PROXY_MODE = '-S' - self.PROXY_OPTIONS = [ - "nx/nx" , - "root=%s" % self.session_info.local_container, - "retry=5", - "composite=1", - "connect=localhost", - "cookie=%s" % self.session_info.cookie, - "port=%d" % self.session_info.graphics_port, - "errors=%s" % os.path.join(self.session_info.local_container, self.session_log, ), - ] + if _X2GOCLIENT_OS == "Windows": + self.PROXY_OPTIONS = [ + "nx/nx" , + "retry=5", + "composite=1", + "connect=localhost", + "cookie=%s" % self.session_info.cookie, + "port=%d" % self.session_info.graphics_port, + "errors=%s" % os.path.join(".", "..", "S-%s" % self.session_info.name, self.session_log, ), + ] + else: + self.PROXY_OPTIONS = [ + "nx/nx" , + "retry=5", + "composite=1", + "connect=localhost", + "cookie=%s" % self.session_info.cookie, + "port=%d" % self.session_info.graphics_port, + "errors=%s" % os.path.join(self.session_info.local_container, self.session_log, ), + ] + self.PROXY_DISPLAY = self.session_info.display def _update_local_proxy_socket(self, port): @@ -253,6 +256,22 @@ class X2goNX3Proxy(X2goProxy): if a.startswith('port='): self.PROXY_OPTIONS[idx] = 'port=%s' % port + def _generate_cmdline(self): + + if (_X2GOCLIENT_OS == "Windows") and (len(",".join(self.PROXY_OPTIONS)) >= 250): + _options_filename = os.path.join(self.session_info.local_container, 'options') + options = open(_options_filename, 'w') + options.write('%s:%s' % (','.join(self.PROXY_OPTIONS), self.PROXY_DISPLAY)) + options.close() + self.PROXY_OPTIONS= [ 'nx/nx', 'options=%s' % os.path.join(".", "..", "S-%s" % self.session_info.name, 'options'), ] + + cmd_line = [ self.PROXY_CMD, ] + cmd_line.append(self.PROXY_MODE) + _proxy_options = "%s:%s" % (",".join(self.PROXY_OPTIONS), self.PROXY_DISPLAY) + cmd_line.append(_proxy_options) + return cmd_line + + def start_proxy(self): self.logger('starting local NX3 proxy...', loglevel=log.loglevel_INFO) self.logger('NX3 Proxy mode is server, cookie=%s, host=localhost, port=%s.' % (self.session_info.cookie, self.session_info.graphics_port,), loglevel=log.loglevel_DEBUG) hooks/post-receive -- python-x2go.git (Python X2Go Client API) This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "python-x2go.git" (Python X2Go Client API).