Update TODO based on work for 0.4.1
[python-rwhoisd.git] / README
1 WHAT IS THIS?
2
3 In 2003, as a programming exercise for learning Python, I wrote a
4 simple rwhois server (described in RFC 2167).  It uses in-memory data
5 structures, and it intuits the schema based on the data it sees.  The
6 server takes as input a schema file, which for now just describes
7 which attributes should be indexed (and how), and data files which
8 look much like the C rwhoisd's data files.
9
10 This version supports a sort of extended query syntax: IP or CIDR
11 queries ending in "**" will result in a "subnet" search, where all of
12 the found subnets at or below the specified network will be returned.
13 Ending a IP or CIDR query with a single "*" will result in a
14 "supernet" search, returning all the networks enclosing the queried
15 network.  (A plain network query will return the closest enclosing
16 network, including matching networks).
17
18 It supports (as of v0.4) IPv6 CIDR networks and network blocks, and
19 supports indexing network-block type values.  That is, you can index
20 values like "10.131.10.0 - 10.131.11.255" and "3ffe:4:5::0 -
21 3ffe:4:6::ffff".
22
23 REQUIREMENTS
24
25 python 2.2 or later.
26
27 INSTALL
28
29 This can be run from it's source directory, which is a fine way to do
30 it.
31
32 However, if you wish to install it, as root:
33
34 % python setup.py install
35
36 This is just using the standard Python distutils, so there is actually
37 a great deal of flexibility here.  Try
38
39 % python setup.py install --help
40
41 to see some of the options available.
42
43 RUNNING IT
44
45 This is assuming that you are running it from the distribution
46 directory.
47
48 % tar zxvf python-rwhoisd-0.4.tar.gz
49
50 % cd python-rwhoisd-0.4
51
52 % ./bin/pyrwhoisd sample_data/example_schema \
53                   sample_data/example_data &
54
55 Voila!  You should now have some sort of rwhois server running on port
56 4321
57
58 You can also give it multiple data files:
59
60 % ./bin/pyrwhoisd sample_data/example_schema sample_data/*_data &
61
62 CONFIGURING IT
63
64 Edit rwhoisd/config.py.
65
66 This file has comments describing options that you can change.
67
68 DATA
69
70 See the example_schema and example_data files in the sample_data
71 directory.
72
73 The format of the data files is very similar to the format used by the
74 C rwhois server (rwhoisd-1.5.x from www.rwhois.net).  It has the
75 following differences, however:
76
77 * These files may have records separated by blank lines instead of
78   dashes.
79
80 * They are not sensitive to trailing separators (whitespace or dashes)
81
82 * They do not have to be arranged in any special manner.  That is, the
83   C rwhoisd forces (or at least encourages) you to arrange your data
84   files into different directories per authority-area.  These can be
85   wherever.
86
87 * This server does not support attribute "aliases".
88
89 It should be noted that this server in small ways violates the
90 description put forth by RFC 2167.  In particular, it does not
91 establish independent schemas for each authority area.  There may be
92 other violations as well.