EZProxy Test Suite

This software is intended to help solve problems in configuring EZProxy for particular resources. It allows one to maintain a list of urls in a database, and to generate an EZProxy configuration file out of that list. It also allows one to test a given a resource by accessing it both through EZProxy and directly simultaneously (in different frames), so as to see whether it needs proxying. The database can be updated based on the results of tests.

This software was developed to meet the particular needs I had in configuring EZProxy for the University of Alberta, and has not yet been adequately "generalized" for use in other environments. Rather than wait until I have time to rewrite it, I'm releasing it as is, in case anyone has an urgent need for it and is willing to do the generalizing work themselves.



This software arose in a particular environment which accounts for some of its oddities. We have lots of URLs in our 856 fields, and we don't know which ones need proxying. We have therefore configured EZProxy to proxy them all; we then go through and determine by testing which ones don't require proxying, and knock them out of the configuration one by one. This package facilitates the testing and the updating of the configuration.

This software was developed in Cold Fusion, because that was the scripting language that was available on the server that had access to the EZProxy configuration environment. Parts of it, however, which didn't have to be available through the web server on that machine, were done in PHP, which is my favoured language. At the Hackfest at Access 2002, Dan Chudnov and I attempted to recast all the Cold Fusion scripts into PHP. We almost made it, and I intend to finish the work in the next few weeks (unless someone else does it first).

What it does

A couple of screen shots should make it clear enough:

Config scripts

The config directory contains some scripts that may be useful in conjunction with the main test suite files.

Both config.php and runu2e.sh are reasonably well documented internally.

config.php parses the urls that it is given to produce the lists of domains and hosts. It will normally take the last two parts of the host name to generate the domain name (e.g. host "www.epnet.com" produces domain "epnet.com"). In some cases, though, this is unsatisfactory, as it would lead to proxying large diverse domains (e.g. *.ca.us, or *.ac.uk). The array $topdomains contains a list of this kind of domain (some of which are specific to our environment at the University of Alberta). If config.php generates a domain that matches a member of this array, it will backstep and include one more part.

The XML files that config.php reads are very simple in structure:

<?xml version="1.0"?>
		<title>Journal of Something</title>
If config.php finds an <error> element, it will abort the processing of this XML file. A script that generates an XML file for this purpose should therefore insert an <error> tag if it runs into any trouble.

Installing and customizing

The test suite was developed in an environment with MySQL 4 running under Solaris 2.8, with Cold Fusion 4.5 and PHP 4.1.2.

To use the Cold Fusion version, you'll need to have your MySQL database configured as a data source. To use config.php to populate the database automatically, you'll need to customize some settings around line 269:

The ezproxy.cfg output begins at line 360; you'll need to replace all our local stuff with your local stuff. The array $topdomains is set at line 226.

To run it, just put all the cfm files in a web-accessible directory. Don't forget to protect this directory, since anyone who reaches it can modify your database.

To do list


There are currently two versions: the original Cold Fusion version, with some code that is specific to the University of Alberta's environment, and the incomplete and not-yet-functional PHP version that was done at the Hackfest. If someone wants to complete the PHP conversion, please feel free, and let me have the code to post here.

This code is released under the GNU General Public License. It is released as is and without warrantee. It is not affiliated with or endorsed by Useful Utilities, the makers of EZProxy.


For more information, or (especially) to contribute improvements to the code, please contact Peter Binkley.

Last update: 4 November 2002