import Connector
Implements classes to establish a connection.
import Proxy
Module defining classes encapsulating native proxies.
import Service
Module defining service related classes.
import Session
Module defining session related classes and functions.
import Stream
Module exporting an interface to the Zorp.Stream component.
from Zorp import *
Module defining global constants, and interface entry points to the Zorp core.
Implements a general plug proxy, with optionally disabling data transfer in either direction.
By default plug copies all data in both directions. To change this set the copy_to_client or copy_to_server attributes to FALSE.
![]() | Copying out of band data is not supported. |
Table 4-75. Attributes for class PlugProxy
copy_to_server | Copy data in client->server direction |
copy_to_client | Copy data in server->client direction |
bandwidth_to_client | Readonly variable containing the utilized bandwidth in server->client direction. |
bandwidth_to_server | Readonly variable containing the utilized bandwidth in client->server direction. |
packet_stats_interval | The number of milliseconds between two successive packetStats() events. By default: 0. NOTE: this is currently implemented as the number of passing packages, not as milliseconds. |
stack_proxy | the proxy class to stack into the connection |
packetStats() event is called whenever the time interval elapses (or as currently implemented the given number of packets were transmitted). this event receives packet statistics as parameters.
It's useful for terminating connections with excessive bandwidth requirements (for instance to limit the impact of the covert channel opened when using plug instead of a protocol specific proxy)
packetStats is defined as:
def packetStats(self, client_bytes, client_pkts, server_bytes, server_pkts)
Initialize a PlugProxy instance.
__init__ ( self, session ) |
Create and set up a PlugProxy instance.
Table 4-76. Arguments for PlugProxy.__init__()
self | this instance |
session | session this instance belongs to |
Query if something is to be stacked into this plug.
requestStack ( self ) |
Callback called by the underlying C proxy to query if something is to be stacked.
Table 4-77. Arguments for PlugProxy.requestStack()
self | this instance |
the class of the proxy to stack in
Stack a proxy instance within this plug.
stackProxy ( self, client_fd, server_fd, ) |
Callback called by the underlying C proxy to actually stack in something.
Table 4-78. Arguments for PlugProxy.stackProxy()
self | this instance |
client_fd | client fd |
server_fd | server fd |