PXYS

PXYS - IRC(u) Network ProxyScanner

2004-01-16 - Version 2.0

Back to home page

Table of contents

Requirements

Software

Operating system: pxys v2 should work in any Unix-like OS (Linux, FreeBSD, NetBSD, Mac OS X/Darwin, Solaris...). However, in practice, it's hard to test on any of them. A list of supported systems might be added later here. For now, I recommend you to contact me before trying it if you don't want to lose your time installing it on an unsupported system.

At this time, you need an IPv6 ready operating system to compile pxys v2 (or at least the good headers). You can't disable IPv6 support. Because ircu should shortly support IPv6 client connections, as a service server pxys needs to be able to recognize them. However, if your IRC network is IPv4 only, pxys v2 might work on a IPv6-disabled kernel.

Before you install pxys v2, please verify that you have the following libraries installed:

Additionally, but that's common sens, you need:

Hardware

[top]

Features

[top]

Best performance

[top]

License & Warranty

[top]

Installation

Once libxml2 and libpeak installed, you need to download the pxys2 archive (or source procured using anonymous CVS checkout) which contains the rest of the needed source code.

Go into the pxys2 directory. You are invited to read the README file which contains a quick view of the archive tree with a quick description of each directory. However, the installation is automated so you can install all required softwares all at once.

Pxys v2 doesn't need as much attention as v1 when it's time to compile it. Most things have moved to configuration files. However, in pxyservd, some rare options still remains:

  --enable-debug           turn on debugging mode
  --with-maxnicklen=NUMBER maximum nick length of network clients [default=15]

The first one is to enable the '-d' command line option in order to enable debugging output to the console.

The last one is not an option we change every day ;-) If you don't use the default MAXNICKLEN=15 on your network, please use it to change this value as needed. Be accurate: pxyservd will not work if MAXNICKLEN is not long enough for your network, and overestimation of this value unnecessarily increases the memory needed. This variable corresponds to new ircu's F:MAXNICKLEN.

Examples are better. Here is an example that show how to install pxyservd and pxyscand locally in $HOME/bin:

./configure --prefix=$HOME --with-maxnicklen=15
You can speed up things using the -C configure option to enable a shared cache between all local configure scripts:
./configure -C --prefix=$HOME --with-maxnicklen=15
If you see the following message:
checking for dbprim - version >= 0.9.1... no
*** The dbprim-config script installed by dbprim could not be found
*** If dbprim was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the DBPRIM_CONFIG environment variable to the
*** full path to dbprim-config.
configure: Will use dbprim provided in this package (static linkage)
...then pxys's package dbprim library will be used and linked statically. In general, it doesn't change anything to the performance, but it's recommended to install dbprim globally as a shared library if you use it for other softwares (as operating systems then optimize memory management of shared code...).

Once configured without error, please type:

make
to compile the source. Then to install the daemons, type:
make install
pxyservd the IRC service server, pxyscand the proxy scanner daemon, and a little program called px will be installed. px is a little OPAS client for pxyscand: you can send scan requests in command line (you need to specify the IP and the port of a running pxyscand, and a target IP). It's useful for testing purposes.

[top]

Configuration

pxyservd and pxyscand uses each one a different XML configuration file whose path must be passed in command line when launching the daemons.

Before this memorable moment of launching, you need to configure the xml files! The best thing to do is to copy the original example configuration files given in pxys2 archive:

$ cd pxys2
$ cp pxyservd/pxyservdconf.xml pxyscand/pxyscandconf.xml /home/pxys/etc/
Then edit them to fit your needs. Any doubts ? We added full documented configuration files in pxyservd/doc-pxyservdconf.xml and pxyscand/doc-pxyscandconf.xml. You can even copy those for edition, if you prefer.

[top]

Launching

Before really lauching pxyscand and pxyservd, you can verify if most of the configuration variables are correct. The '-c' option allows you to be sure they are correctly loaded. The program will check the configuration file, print its variables with values and then exit. Example:

$ ./pxyscand -c -f /home/pxys/etc/pxyscandconf.xml
$ ./pxyservd -c -f /home/pxys/etc/pxyservdconf.xml

For convenience, most options are similar between pxyscand and pxyservd. Example to launch them as daemons:

$ ./pxyscand -f /home/pxys/etc/pxyscandconf.xml
$ ./pxyservd -f /home/pxys/etc/pxyservdconf.xml

Example to run them in the foreground (without detaching from the terminal):

$ ./pxyscand -t -f /home/pxys/etc/pxyscandconf.xml
$ ./pxyservd -t -f /home/pxys/etc/pxyservdconf.xml

Example to enable debugging for pxyservd (will run on the foreground). This option is not available yet for pxyscand and is only available if --enable-debug has been used at compilation time for pxyservd:

$ ./pxyservd -d -f /home/pxys/etc/pxyservdconf.xml

[top]

Installation example 1

When I don't have too much time, I like when software's docs offer a realistic example of installation process, it often speeds up things, especially when it's not too complex, even if it doesn't match exactly my system configuration. Here is one for you, example 1: full installation for FreeBSD 4 or more, under tcsh. It uses libxml2's port (root needed to install) and install libpeak (current) and pxys (current) locally (root not needed). If wanted, please replace all cvs operations by getting corresponding release's tar.gz archives.

# cd /usr/ports/textproc/libxml2
# make && make install
# exit

% rehash
% cd libpeak
% cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/peak login
Logging in to :pserver:anonymous@cvs.sourceforge.net:2401/cvsroot/peak
CVS password: (just type return)
% cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/peak co libpeak
% cd libpeak
% ./configure --prefix=${HOME}/pxys2
% make && make install
% setenv PATH ${PATH}:${HOME}/pxys2/bin
% cd ..

% cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/pxys co pxys2
% cd pxys2
% ./configure -C --prefix=${HOME}/pxys2 --with-maxnicklen=15
% make && make install

% mkdir ${HOME}/pxys2/etc
% cp pxyservd/pxyservdconf.xml pxyscand/pxyscandconf.xml ${HOME}/pxys2/etc/

Then, after configuration, we can launch them. Don't forget to create logs directories (like the history directory) you've just setup in pxyservd's configuration file!

Because we have installed libpeak locally, you probably need to tell the dynamic loader you did it, for instance:

% setenv LD_LIBRARY_PATH ${HOME}/pxys2/lib

% pxyscand -c -f pxyscand/pxyscandconf.xml
% pxyscand -f pxyscand/pxyscandconf.xml
% pxyservd -c -f pxyservd/pxyservdconf.xml
% pxyservd -f pxyservd/pxyservdconf.xml
You might want to try with '-t' first to see if they correctly run. Don't forget to add environnement variables changes to a script loaded at login (for convenience).

Bash changes:

export PATH=$PATH:$HOME/pxys2/bin
export LD_LIBRARY_PATH=$HOME/pxys2/lib

Other different installation examples might be added in the future. On Linux, the example is very similiar to Example 1 (with bash changes).

[top]

St├ęphane Thiell (mbuna at bugged.org)