Package x2go :: Package backends :: Package proxy :: Module nx3 :: Class X2GoProxy

[frames] | no frames]

# Class X2GoProxy

source code

            object --+
                     |
    threading._Verbose --+
                         |
          threading.Thread --+
                             |
                base.X2GoProxy --+
                                 |
                                X2GoProxy

This X2GoProxy class is a NX version 3 based X2Go proxy connection class.

It basically fills x2go.backends.proxy.base.X2GoProxy variables with sensible content. Its methods mostly wrap around the corresponding methods of the parent class.

Instance Methods

__init__(self, *args, **kwargs) For available parameters refer to x2go.backends.proxy.base.X2GoProxy class documentation. | source code

process_proxy_options(self) Override this method to incorporate elements from `proxy_options` into actual proxy subprocess execution. | source code

`obj`

start_proxy(self) Start the thread runner and wait for the proxy to come up. | source code

Inherited from `base.X2GoProxy`: `__del__`, `ok`, `run`, `stop_thread` Inherited from `threading.Thread`: `__repr__`, `getName`, `isAlive`, `isDaemon`, `is_alive`, `join`, `setDaemon`, `setName`, `start` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Variables
Inherited from `base.X2GoProxy`: `PROXY_ARGS`, `PROXY_CMD`, `PROXY_ENV`, `fw_tunnel`, `proxy`, `session_info`, `session_log_stderr`, `session_log_stdout`

Properties
Inherited from `threading.Thread`: `daemon`, `ident`, `name` Inherited from `object`: `__class__`

Method Details

### __init__(self, *args, **kwargs)
(Constructor)

source code

For available parameters refer to x2go.backends.proxy.base.X2GoProxy class documentation.

Parameters:
  - `session_info` - session information provided as an `X2GoServerSessionInfo*` backend instance
  - `ssh_transport` - SSH transport object from `paramiko.SSHClient`
  - `session_log` - name of the proxy's session logfile
  - `sessions_rootdir` - base dir where X2Go session files are stored (by default: ~/.x2go)
  - `proxy_options` - a set of very base.X2GoProxy backend specific options; any option that is not known to the base.X2GoProxy backend will simply be ignored
  - `logger` - you can pass an X2GoLogger object to the base.X2GoProxy constructor
  - `session_instance` - the X2GoSession instance this base.X2GoProxy instance belongs to
  - `loglevel` - if no X2GoLogger object has been supplied a new one will be constructed with the given loglevel
Overrides: object.__init__

### process_proxy_options(self)

source code

Override this method to incorporate elements from `proxy_options` into actual proxy subprocess execution.

This method (if overridden) should (by design) never fail nor raise an exception. Make sure to catch all possible errors appropriately.

If you want to log ignored proxy_options then

1. remove processed proxy_options from self.proxy_options
2. once you have finished processing the proxy_options call the parent class method x2go.backends.proxy.base.X2GoProxy.process_proxy_options()

Overrides: base.X2GoProxy.process_proxy_options
  (inherited documentation)

### start_proxy(self)

source code

Start the thread runner and wait for the proxy to come up.

Returns: `obj`
  a subprocess instance that knows about the externally started proxy command.
Overrides: base.X2GoProxy.start_proxy