COPYRIGHT POLICY
----------------
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
You should have received a copy of the GNU General Public License along
with this program; if not, write to Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA.

Copyright (C) 1998 Luc Deschenaux <lcd@gkb.com>


DISCLAIMER
----------
Use it at your own risk. You're sole responsible for anything that could
happend before, while, after or without using this program.


ABOUT VFTPD
-----------
vftpd means virtual ftp server daemon. It works also as a standard user@host
FTP proxy (like wingate). But more, it allows you to create virtual ftp
accounts. It runs on Linux and Win32 platforms, a MacOs port is planned.

vftpd acts like an opaque proxy server. You connect your ftp client on the
vftpd using a local account you created with command vftpdusers, and the vftpd
connects you to the remote ftp server, using the remote account details you
specified in the local account. IP access rules are defined with command
vftpdaccess.

The commands the ftp client sends to the vftpd are filtered and forwarded
to the remote ftp server. This way you can specify another root directory, add
file access restrictions to avoid deleters, add a ratio, set a maximum number
of simultaneous users, autoban abusing users..

You can also specify a cache directory. If the file is already in the cache,
it will be transmitted from here instead of the remote ftp server. The cache
may become corrupted because only the name and the size of the file are
actually used to tell if the cached file should be ignored, replaced,
transmitted and/or completed.
                                         
vftpd is still an alpha release but I test it while I work on it. So it's
almost stable even if some major parts are still missing.

Luc <lcd@gkb.com>


USING VFTPD:                           
------------

You'll need Tcl/Tk 8.0 (I'm using 8.0.4)
You can obtain it at www.sunscript.com

LINUX
-----

1. Compile (optional)
   From the ./linux directory..
   Type ./build
   
2. Setup accounts with command vftpdusers or edit ./conf/vftpd.users
   tip: to create an account from an existing one, edit it and change the 
   username.
 
3. Setup IP access and autoban with vftpdaccess or edit ./conf/vftpd.allow and vftpd.deny
   Connection will be refused if IP doesn't match an allow rule.
   Connection will be refused if IP match a deny rule even if it matched
   a previous allow rule.
   IPs entered here are compared with leftmost part of the connecting
   entity's IP. eg: "1.2.3." will match "1.2.3.x", a "*" alone means
   "any address".

4. vftpd options:
   
   required: -p <port>      # the port to listen for incoming connections.
   optional: -d             # daemon mode (when launched by tcpd)
             -i <ip>        # on multihomed systems you may need to specify the address to bind.
             -l <level>     # log level (0-7)
             -@             # disable USER user@host:port proxy support
             -s             # enable strict ip policy (deny FXP). When enabled, the control
	                      connection ip must match the data connections.
	     -r             # root directory. When run with -d vftpd needs to know where to
	                      find the configuration files. You can use it to switch between
			      different setups.

5a. You can run it from a shell (without -d option) but you'll need to kill it before
    your process table is filled with zombies.. see KNOWN BUGS

5b. Or you can link the executable with /usr/sbin/vftpd and add a line like:
      8888 stream tcp nowait root /usr/sbin/tcpd vftpd -d -r /usr/local/vftpd-0.5a -p 8888
    in /etc/inetd.conf and restart inetd: killall -HUP inetd


WINDOWS & MACOS
---------------

1. Wait ! It's not yet finished...


HISTORY
-------

Oct  8 1998 -  Started
Oct 28 1998 -  0.0a First alpha release (user editor unusable... sorry..) 
Oct 29 1998 -  0.1a Fixed filenames in tcl scripts... vftpdusers is now working.
Oct 31 1998 -  0.2a Fixed a bug in CWD. Messages reported to syslogd. IP restricted
               access (global level) and autoban added.
Nov  6 1998 -  0.3a Added WIN32 support(...). Autoban works also when remote server is
               full, fixed syslog ^M bug and maybe some others.
Nov  8 1998 -  0.4a Fixed -l bug in WIN32 version, Empty config files are now closed.
               MACOS port is in progress.
Nov 10 1998 -  started another project (CuteFXP)... MACOS port is for later.. I think I'll
               first modify vftpd so that it uses pthreads instead of fork()
Feb  4 1999 -  0.5a This is just a quick linux-only release but it should compile on win32.
               With linux you can use config files from previous version or create symlinks.
               Configuration scripts are missing in this distribution and config files
               location has changed so that it can be used from a shell without su.
               Added USER user@host:port proxy support (option -@ to disable it).
               Strict ip policy (control connection ip == data connection ip) now optional
               (-s), allowing FXP through vftpd.
               Fixed a few things.


KNOWN BUGS
----------
               - I can't get rid of those zombie processes under Linux when not running as
                 a daemon... patch welcome..
               - No multitasking support. Possible file access conflicts in critical
	         sections when number of connections > 1. 
               - Data connections always reported as BINARY. Not a problem.. (?)

TODO
----
	       - Use pthreads instead of fork()
	       - Main GUI application to setup, launch and monitor vftpd.              
