1.3. Procedure – Proxy startup and the server-side connection

  1. To create an instance of the application-level proxy, the __init__ constructor of the proxy class calls the Proxy.__init__ function of the Proxy module. The proxy instance is created into a new thread from the ZorpProxy ancestor class.

  2. From the new thread, the proxy loads its configuration.

  3. The proxy initiates connection to the server.

    Note

    Some proxies connect the server only after receiving the first client request.

  4. The Proxy.connectServer() method creates the server-side connection using the Chainer assigned to the service. The Chainer performs the following actions:

    • Reads the parameters related to the server-side connection from the Session object. These parameters were set by the Router and the Proxy.

    • Performs source and destination network address translation. This may modify the addresses set by the Router and the Proxy.

    • Verifies that access to the server is permitted.

    • Establishes the connection using the Attach subsystem, and passes to the proxy the stream that represents the connection.

    Note

    The Proxy.connectServer() method connects stacked proxies with their parent proxies.