From Agentgroup
Revision as of 09:52, 29 May 2008 by Cynthia Emilia Villalba Cardozo (Talk | contribs) (Italiano)

Jump to: navigation, search

Download the PROOF (formerly ProWeb) code v1

The PROOF code was developed by Marco Massari during his thesis work at the University of Modena.

Download code



Guide to the installation of the framework


PROOF (formerly ProWeb) is a proxy server that can change its behaviour depending on the installed software module (called Proxy Module). PROOF is implemented as a general-purpose proxy framework that can embody an application-specific module. Users can exploit the services provided by the module using browsers which

Both the Proxy application and the Proxy Modules are implemented in Java; the classes and interfaces are grouped in the proxy package.

Requirements and Terminology

Two or more hosts are needed to let the application work. Only one of them executes the proxy application, and becomes the proxy server for the other hosts, which are the clients where users run the browsers. In the following, the host executing the proxy application is called Proxy-host, while the other hosts are called Client-hosts. Note that a user can run a browser also on the Proxy-host; in this case, the Proxy-host is also a Client-host. The proxy application requires a Java Virtual Machine 1.1.4 or later running on the Proxy-host. On the client side, a Java 1.1 enabled browser is required on the Client-host.

The following table summarises the above requirements:


  • Operating System for which the JDK 1.1.4 or later is available (i.e., Windows 9x, Unix);
  • JDK 1.1.4 or later.


  • Browser Java 1.1 enabled (i.e., Netscape o Communicator 4.04 or later, Internet Explorer 4.0x)

Configuration of the Proxy-host

First of all, creating a "container" directory could be useful. Such directory is called BASE_DIR in the following, and will contain all the directories created during the configuration process. We assume that the absolute path, including the BASE_DIR directory, is called BASE_PATH.

For example, on a Unix box you can create the directory marcomas in the path /export/home; the corresponding BASE_PATH is: /export/home/marcomas

Installation of the Proxy application

To install the proxy application, you need:

  1. Being sure that on the Proxy-host the JDK 1.1.4 or later is available.
  2. Creating a directory in the BASE_DIR one. Let PROXY_APP_DIR be the name of such directory.
  3. Copying in the directory PROXY_APP_DIR the following files that compose the Proxy application:

The main class (i.e., the class that contains the main() method) is in the file ProxyMain.class.

Since PROXY_APP_DIR is a subdirectory of BASE_DIR, the absolute path of the directory containing the .class files of the Proxy application is: BASE_PATH<DirSep>PROXY_APP_DIR Where <DirSep> is the directory separator of the used file-system (the slash "/" on Unix, the back-slash "\" on Windows 9x).

For example, you can chose the directory ProxyMain as PROXY_APP_DIR. Following the previous example, the absolute path becomes:

Installation of the "proxy" package

The Proxy application needs the classes and the interfaces of the "proxy" package to work correctly. To install such package act as follows:

  • Create a new subdirectory of the BASE_DIR one. The name of this new directory MUST be proxy, since it contains the files of the classes belonging to the package proxy.
  • Copy in the directory PROXY_APP_DIR the following files that belong to the "proxy" package:
     AppletMsg.class 	               HTTPRequest.class
     AppletMsgBuffer.class 	       HTTPResponse.class
     AppletMsgListener.class 	       IllegalMethodCallException.class
     AppletMsgProtocol.class 	       InvalidFrameTagException.class
     AppletMsgStatement.class 	       MalformedAppletMsgException.class
     AppletMsgSupport.class 	       MimeContent.class
     BadProxyModuleException.class   ProxyEnvironment.class
     BinaryContent.class 	       ProxyService.class
     ControlAppletTag.class 	       ProxyServiceMain.class
     EncodedUrlContent.class 	       ProxyServiceMsgManager.class
     Frame.class 	               TextContent.class
     FrameSet.class 	               ThisProxy.class
     HTMLParser.class                UnexpectedFrameException.class
     HTMLTag.class 	               User.class
     HTTPConnection.class 	       UserAlreadyLoggedException.class
     HTTPMessage.class 	       URLFile.class

Since proxy is a subdirectory of BASE_DIR, the absolute path of the directory containing the .class files of the "proxy" package is: BASE_PATH<DirSep>proxy

Following the previous example, the absolute path becomes: /export/home/marcomas/proxy

  • To let the application use the classes and the interfaces of the "proxy" package, the BASE_PATH must be added to the system variable CLASSPATH. Note that the directory containing the subdirectory proxy must be added to the CLASSPATH variable, NOT the directory proxy itself!

Installation of a Proxy Module in the Proxy Application

A Proxy Module must be installed in the Proxy application to make the application work. For each Proxy Module you must:

  1. Create a new subdirectory of BASE_DIR where all the .class files of the Proxy Module will be stored. Let call such directory PROXY_MOD_DIR.
  2. Copy in the directory PROXY_MOD_DIR all the .class files of the Proxy Module, except those ones that contain the byte-code of the Control Applet of the Proxy Module.Since PROXY_MOD_DIR is a subdirectory of BASE_DIR, the absolute path of the directory containing the .class files of the "proxy" package is: BASE_PATH<DirSep>PROXY_MOD_DIR
  3. Copy the files that define the Control Applet in the directory PROXY_APP_DIR (par. 3.1).
  4. To let the Proxy application use the classes of the Proxy Module, add the directory PROXY_MOD_DIR to the CLASSPATH variable.
  5. Add a line in the ASCII file proxyconfig.txt, to tell the Proxy which is the name (without the .class extension) of the main class that implement the Main Component of the Proxy Module. If the proxyconfig.txt file does not exist (you are installing the first ), it must be created in the PROXY_APP_DIR (par. 3.1) directory.

In the downloadable file with the code you can find two Proxy Module examples:

  • Cache Module;
  • SynchBrowsing Module;

Following the previous Unix example, to install the Cache Module, you must:

  • Create the directory CacheModule as subdirectory of /export/home/marcomas
  • Copy in the directory CacheModule the following files:
  • Copy the file: CacheApplet.class in the directory /export/home/marcomas
  • Add /export/home/marcomas/CacheModule in the CLASSPATH variable.
  • Add the following line to the proxyconfig.txt file:


To install the SynchBrowsing Module the needed actions are similar:

  • Create the directory SynchBrowsingModule as subdirectory of /export/home/marcomas.
  • Copy the following files in the SynchBrowsingModule directory:
  • Copy the file:

in the directory

  • Add /export/home/marcomas/SynchBrowsingModule in the CLASSPATH variable.
  • Add the following line to the proxyconfig.txt file:


Execution of the Proxy application

You can now execute the Proxy application, by the command

java ProxyMain

Remember that the ProxyMain.class is the class containing the main() method.

On a Unix box, you can define the following Shell script:

cd /export/home/marcomas/ProxyMain
java ProxyMain

Where the JDK library file is assumed to be set in :


Configuration of the Client-hosts

Disregarding the Operating System, on each Client-host there must be a browser Java 1.1 enabled. Such browser must be configured to use the Proxy-host as the proxy server.

In each HTML page, the Proxy application inserts the Control Applet provided by the installed Proxy Module. There are two ways the browser can load the .class files of the Control Applet:

  1. Retrieving all files from the Proxy itself
  2. Finding a local copy of the "proxy" package. i.e., a copy installed on the Client-host.

In the case 1: the Client-host does not need configuring.

In the case 2: the "proxy" package must be installed on the Client-host as done on the Proxy-host (par. 3.2). In particular, you must take care about the CLASSPATH variable, because the browser must be able to retrieve the .class files of the package.

In the following we assume to use the browser Netscape Communicator 4.05 on a Unix box and that the absolute path of the file java40.jar (which contains the JVM classes for the browser), is the following:


The following Shell script can be useful to run the browser:

/usr/local/communicator405/netscape &

We have assumed that the "proxy" package is installed in the directory /export/home/marcomas/. Note that the path of the classes of Communicator (java40.jar) must precede the other ones in the CLASSPATH variable.

Test Configuration

Our first test is based on 2 host. The Proxy-host is used also as Client-host, to have 2 Client-hosts.

Host                               Configuration
Proxy-host 	CPU 	             SPARC
               Operating System     Solaris
               JDK Version          1.1.5
Client-host 1 	CPU 	             SPARC
               Operating System     Solaris
               Browser 	      Netscape Communicator 4.04 + Patch for AWT 1.1
                                    (tested also with Netscape Communicator 4.05)
Client-host 2 	CPU 	             Pentium
               Operating System     Windows 95
               Browser 	     Netscape Communicator 4.04 + Patch for AWT 1.1


Guida all´Installazione del framework


Il framwork presentato nella tesi è rappresentato da un'applicazione Proxy scritta in Java, la quale ha la prerogativa di modificare il proprio comportamento sulla base del modulo software o Proxy Module installato sul Proxy. In altri termini il "servizio" che il Proxy fornisce agli utenti che, mediante un browser, si connettono al Proxy dipende dal Proxy Module installato sul Proxy.

Sia l'applicazione Proxy sia i Proxy Module utilizzano classi ed interfacce Java che, nell'ambito del progetto, sono state raggruppate in un apposito package Java: il package "proxy".

Requisiti e Terminologia

Il contesto applicativo del progetto prevede che siano disponibili più host (almeno due). Su uno solo di essi si richiede che venga installata e mandata in esecuzione l'applicazione Proxy scritta in Java. Ciò consente all'host in questione di funzionare da Proxy nei confronti degli altri host, che quindi funzionano da client. D'ora in avanti l'host su cui viene installata l'applicazione Java verrà indicata col termine Proxy-host, mentre i rimanenti host, ovvero gli host degli utenti che intendono connettersi al Proxy, ciascuno mediante il proprio browser, verranno indicati con il termine Client-host. Si noti che nulla impedisce che anche sul Proxy-host un utente possa utilizzare un browser per connettersi al Proxy stesso. In questa eventualità è ovvio che il Proxy-host è pure un Client-host.

Per quanto concerne il Proxy-host, affinché esso sia in condizione di eseguire un'applicazione Java, si richiede che su di esso sia presente una JVM, o, in altri termini, sia presente il JDK versione 1.1.4 o superiore.

Per ciò che riguarda invece i client, si richiede che su ciascun Client-host sia in esecuzione un browser. In particolare si richiede che tale browser sia Java 1.1 enabled, ovvero in grado di eseguire applet Java scritte con la versione 1.1 di Java (e quindi dell'AWT).

La seguente tabella riassume i requisiti sopra esposti:

Host                           Requisiti
Proxy-host 	           Sistema Operativo per il quale sia disponibile  
                          il JDK 1.1.4 o superiore (es. Windows 95, Unix);
                          JDK 1.1.4 o superiore.
Client-host 	           Browser Java 1.1 enabled (es. Netscape o Communicator 4.04 o  
                          superiore, Internet Explorer 4.0x)