[X2Go-Commits] python-x2go.git - build-baikal (branch) updated: 0.0.44.2-11-g6e4e92f

X2Go dev team git-admin at x2go.org
Wed Jan 8 15:26:23 CET 2014


The branch, build-baikal has been updated
       via  6e4e92ff742a8547d2e55b5cd3774d1e7650c8dc (commit)
      from  80602371c96597c33b1699903532beebff716e2a (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/sshproxy.py |   64 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 62 insertions(+), 2 deletions(-)

The diff of changes is:
diff --git a/x2go/sshproxy.py b/x2go/sshproxy.py
index 1dadc18..fdbea3f 100644
--- a/x2go/sshproxy.py
+++ b/x2go/sshproxy.py
@@ -63,8 +63,51 @@ class X2goSSHProxy(paramiko.SSHClient, threading.Thread):
                  session_instance=None,
                  logger=None, loglevel=log.loglevel_DEFAULT, ):
         """\
-        STILL UNDOCUMENTED
-
+        Initialize an X2goSSHProxy instance. Use an instance of this class to tunnel X2go requests through
+        a proxying SSH server (i.e. to subLANs that are separated by firewalls or to private IP subLANs that
+        are NATted behind routers).
+
+        @param username: login user name to be used on the SSH proxy host
+        @type username: C{str}
+        @param password: user's password on the SSH proxy host
+        @type password: C{str}
+        @param key_filename: name of a SSH private key file
+        @type key_filename: C{str}
+        @param local_host: bind SSH tunnel to the C{local_host} IP socket address (default: localhost)
+        @type local_host: C{str}
+        @param local_port: IP socket port to bind the SSH tunnel to (default; 22022)
+        @type local_port: C{int}
+        @param remote_host: remote endpoint of the SSH proxying/forwarding tunnel (default: localhost)
+        @type remote_host: C{str}
+        @param remote_port: remote endpoint's IP socket port for listening SSH daemon (default: 22)
+        @type remote_port: C{int}
+        @param known_hosts: full path to a custom C{known_hosts} file
+        @type known_hosts: C{str}
+        @param add_to_known_hosts: automatically add host keys of unknown SSH hosts to the C{known_hosts} file
+        @type add_to_known_hosts: C{bool}
+        @param hostname: alias for C{local_host}
+        @type hostname: C{str}
+        @param port: alias for C{local_port}
+        @type port: C{int}
+        @param sshproxy_host: alias for C{remote_host}
+        @type sshproxy_host: C{str}
+        @param sshproxy_port: alias for C{remote_port}
+        @type sshproxy_port: C{int}
+        @param sshproxy_user: alias for C{username}
+        @type sshproxy_user: C{str}
+        @param sshproxy_password: alias for C{password}
+        @type sshproxy_password: C{str}
+        @param sshproxy_key_filename: alias for C{key_filename}
+        @type sshproxy_key_filename: C{str}
+
+        @param sshproxy_tunnel: a string of the format <local_host>:<local_port>:<remote_host>:<remote_port> 
+            which will override---if used---the options: C{local_host}, C{local_port}, C{remote_host} and C{remote_port}
+        @type sshproxy_tunnel: C{str}
+
+        @param ssh_rootdir: local user's SSH base directory (default: ~/.ssh)
+        @type ssh_rootdir: C{str}
+        @param session_instance: the L{X2goSession} instance that builds up this SSH proxying tunnel
+        @type session_instance: L{X2goSession} instance
         @param logger: you can pass an L{X2goLogger} object to the
             L{X2goSSHProxy} constructor
         @type logger: L{X2goLogger} instance
@@ -166,7 +209,10 @@ class X2goSSHProxy(paramiko.SSHClient, threading.Thread):
         return _valid
 
     def run(self):
+        """\
+        Start the SSH proxying tunnel...
 
+        """
         if self.get_transport() is not None and self.get_transport().is_authenticated():
             self.local_port = utils.detect_unused_port(bind_address=self.local_host, preferred_port=self.local_port)
             self.fw_tunnel = forward.start_forward_tunnel(local_host=self.local_host,
@@ -185,9 +231,19 @@ class X2goSSHProxy(paramiko.SSHClient, threading.Thread):
             raise X2goSSHProxyException('SSH proxy connection could not retrieve an SSH transport')
 
     def get_local_proxy_port(self):
+        """\
+        Retrieve the local IP socket port this SSH proxying tunnel is (about to) bind/bound to.
+
+        @return: local IP socket port
+        @rtype: C{int}
+        """
         return self.local_port
 
     def stop_thread(self):
+        """\
+        Tear down the SSH proxying tunnel.
+
+        """
         if self.fw_tunnel is not None and self.fw_tunnel.is_active:
             self.logger('taking down SSH proxy tunnel via [%s]:%s' % (self.hostname, self.port), loglevel=log.loglevel_NOTICE)
         forward.stop_forward_tunnel(self.fw_tunnel)
@@ -198,4 +254,8 @@ class X2goSSHProxy(paramiko.SSHClient, threading.Thread):
         self.close()
 
     def __del__(self):
+        """\
+        Class desctructor.
+
+        """
         self.stop_thread()


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).




More information about the x2go-commits mailing list