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, 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, 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 sessions Paramiko/SSH transport object)
  • session_instance (obj) - the X2goSession instance that initiates this tunnel
  • 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: