Package x2go :: Module forward

[frames] | no frames]

# Module forward

source code

Python Gevent based port forwarding server (openssh -L option) for the proxying of graphical X2Go elements.

Classes
| X2GoFwServer X2GoFwServer implements a gevent's StreamServer based Paramiko/SSH port forwarding server.

Functions

`obj`

start_forward_tunnel(local_host=`'``127.0.0.1``'`, local_port=22022, remote_host=`'``127.0.0.1``'`, remote_port=22, ssh_transport=None, session_instance=None, session_name=None, subsystem=None, logger=None) Setup up a Paramiko/SSH port forwarding tunnel (like openssh -L option). | source code

stop_forward_tunnel(fw_server) Tear down a given Paramiko/SSH port forwarding tunnel. | source code

Variables
| __NAME__ = ``'``x2gofwtunnel-pylib``'``
| __package__ = ``'``x2go``'``

Function Details

### start_forward_tunnel(local_host=`'``127.0.0.1``'`, local_port=22022, remote_host=`'``127.0.0.1``'`, remote_port=22, ssh_transport=None, session_instance=None, session_name=None, subsystem=None, logger=None)

source code

Setup up a Paramiko/SSH port forwarding tunnel (like openssh -L option).

The tunnel is used to transport X2Go graphics data through a proxy application like nxproxy.

Parameters:
  - `local_host` (`int`) - local starting point of the forwarding tunnel
  - `local_port` (`int`) - listen port of the local starting point
  - `remote_host` (`str`) - from the endpoint of the tunnel, connect to host `<remote_host>`...
  - `remote_port` (`int`) - ... on port `<remote_port>`
  - `ssh_transport` (`obj`) - the Paramiko/SSH transport (i.e. the X2Go session's Paramiko/SSH transport object)
  - `session_instance` (`obj`) - the X2GoSession instance that initiates this tunnel
  - `session_name` (`str`) - the session name of the X2Go session this port forwarding server belongs to
  - `subsystem` (`str`) - a custom string with a component name that tries to evoke a new tunnel setup
  - `logger` (`obj`) - an X2GoLogger object
Returns: `obj`
  returns an X2GoFwServer instance

### stop_forward_tunnel(fw_server)

source code

Tear down a given Paramiko/SSH port forwarding tunnel.

Parameters:
  - `fw_server` (`obj`) - an X2GoFwServer instance as returned by the start_forward_tunnel() function