Table of contents Index
class DirectedChainer - Connect to a predefined server.
Declared in module Chainer
Inheritance hierarchy:
Chainer.DirectedChainer
Chainer.Chainer
Synopsis
class DirectedChainer(Chainer):
def Chainer.DirectedChainer.__init__(self, remote, local=None, forge_addr=0) # Initializes a DirectedChainer instance.
def Chainer.DirectedChainer.connectServer(self, session, host, port) # Connect to the predefined remote server.
# Inherited from Chainer.Chainer
def Chainer.Chainer.connectServer(self, session, host, port) # Connect to the targeted server.
def Chainer.Chainer.establishConnection(self, session, local, remote) # Function to actually establish the connection.
Description
This chainer connects to a predefined server, independent
of the original destination. It can be used to address
a nonrouteable host from the firewall.
Attributes:
-
local
- The local data of the connection
-
remote
- The data of the server
-
forge_addr
- forge client address when connecting to the server
Usage
Service("plug",
DirectedChainer(SockAddr('192.168.0.2', 80)),
PlugProxy)
Initializes a DirectedChainer instance.
- self
- this instance
- remote
- Address of the server
- local=None
- Local address of the connection
- forge_addr=0
- forge client address when connecting to
the server
Sets instance attributes based on parameters.
Returns:
none
Chainer.DirectedChainer.connectServer(self, session, host, port)
Connect to the predefined remote server.
- self
- this instance
- session
- The data of the current session
- host
- not used
- port
- not used
This function establishes connection to the
remote server forging the client address
if necessary.
Returns:
The fd given by establishConnection
Copyright © 2000 BalaBit IT Ltd.
Written by: Balázs Scheidler