Declared in module Ftp
Ftp.FtpProxyAllow
Ftp.FtpProxy
Proxy.Proxy
class FtpProxyAllow(FtpProxy): def Ftp.FtpProxyAllow.config(self) # Default config for FtpProxyAllow. # Inherited from Zorp.ZorpProxy def Zorp.ZorpProxy.__init__(self, name, session_id, client_stream) # Initialize a low level proxy instance. # Inherited from Proxy.Proxy def Proxy.Proxy.__init__(self, name, session) # Initializes a Proxy instance. def Proxy.Proxy.addPolicy(self, klass) # Adds a policy to the proxy. def Proxy.Proxy.connectServer(self, host, port) # Callback method called when a connection established # Inherited from Ftp.FtpProxy def Ftp.FtpProxy.__init__(self, session) # Initialize an FtpProxy instance def Ftp.FtpProxy.loadAnswers(self) # This function can be called by derived classes to initialize internal hashtables. def Ftp.FtpProxy.prepareData(self, side, mode) # Called by the low level proxy to prepare a given side according to mode. def Ftp.FtpProxy.resetData(self) # Called by the low level proxy to indicate that the data connection is to be shut down. def Ftp.FtpProxy.startData(self, side1, side2, way) # Called by the low level proxy to start the data connection as prepared by prepareData def Ftp.FtpProxy.stepData(self) # Called by the low level proxy to indicate that a processing step has been completed.
We defined two example classes derived from the default FtpProxy class, enabling some additional commands/answers from the FTP protocol. FtpProxyAllow as the name suggests allows any FTP command to pass through the proxy, and allows any answer in reply to them.
Default config for FtpProxyAllow.