$Id: README.usage,v 1.11 2012/12/31 20:51:30 karls Exp $

The socks package can be used in two ways.

Dynamically

	The simplest way to add socks support to an already
(dynamically) complied application is to use the LD_PRELOAD facility
to replace the standard library functions with socksified ones.  The
libdsocksd library is provided for this purpose.  See the
README.socksify file for more information.  This will probably only
work with non-setuid applications since LD_PRELOAD is usually ignored
otherwise.  If setting LD_PRELOAD is not possible, compilation is
another possibility.

	If the application can be compiled dynamically socks support
can be added explicitly by linking with libdsocksd (usually done by adding
'-ldsocksd').  This will automagically give the application socks
support without making any code changes.

Static Compilation

	If the source code for an application is available it can be
changed to use socks, even if it is not linked dynamically.
Several system calls and library calls must be changed to use the
socksified versions instead of the standard ones.  The application
is then linked with the libsocks library in the distribution (-lsocksd,
not -ldsocksd).

These system calls can be found in the socks include file "socks.h"
which should be included in all relevant source files.

These calls currently does nothing and are only provided for
compatibility with programs which use them:
Rselect
SOCKSinit


Libraries
	In total there are three libraries distributed with this package:

 libsocksd.so  - standard shared library, contains Rfoo type functions.
 libsocksd.a   - static version of the above.
 libdsocksd.so - shared library which does "on the fly" socksification.
