This directory contains scripts for testing and benchmarking the flash
proxy.

== Preparation

You need to have installed certain software before running the tests.
	Firefox 8.0.1
	socat
	Wget
	Python
	thttpd
	websockify
socat, Wget, and Python are easily installed on most GNU/Linux
distributions. thttpd can be compiled from the packages at
http://acme.com/software/thttpd/. websockify is from
https://github.com/kanaka/websockify/. The old Firefox is from
http://download.mozilla.org/?product=firefox-8.0.1&os=linux&lang=en-US.

Before compiling thttpd, increade IDLE_READ_TIMEOUT in config.h to a
high value (several thousand). This is because some tests wait a long
time between making a connection and sending an HTTP request.

Firefox versions 9 and 10 will not work; these versions have a change to
the -no-remote option that prevents the tests from running. This is
supposed to be fixed with a -new-instance option in version 12.

You need to create some dedicated Firefox profiles. Create profiles
named flashexp1 and flashexp2 by running
	firefox -ProfileManager -no-remote
Start the browsers with
	firefox -P flashexp1 -no-remote &
	firefox -P flashexp2 -no-remote &
and in each one, set this about:config variable:
	browser.link.open_newwindow=1 (default is 3)
This allows the scripts to clear the contents of a tab and replace them
with another page.

I personally run these tests in an Arch Linux VM.
	useradd -m user
	passwd user
	pacman -Sy
	pacman -Su
	pacman -S firefox socat python2 xorg xorg-xinit xterm flashplugin gcc make
Download thttpd, compile it (you have to rename the getline function to
avoid a naming conflict), and install it in /usr/local/bin. Symlink
/usr/bin/python to /usr/bin/python2. Also you have to install the
ttf-ms-fonts package from the AUR for text to show up in Flash Player.
Add a window manager, run "startx", and you should be set.
