address resolution API implementation
[oweals/gnunet.git] / README
1                        Welcome to GNUnet
2
3
4 What is GNUnet?
5 ===============
6
7 GNUnet is peer-to-peer framework focusing on security.  The first and
8 primary application for GNUnet is anonymous file-sharing.  GNUnet is
9 currently developed by a worldwide group of independent free software
10 developers.  GNUnet is a part of the GNU project (http://www.gnu.org/).
11
12 This is a BETA release.  While there are no known significant bugs, we
13 are still changing significant aspects of the system in any other
14 version.  While we believe that the system is usable, quite a few
15 important features -- which would improve performance make the life of
16 users easier -- are still missing.  Also, the documentation may not be
17 adequate for inexperienced users.
18
19 For a longer description of the GNUnet System see our webpages
20 http://www.gnu.org/software/gnunet/ and http://gnunet.org/.
21
22
23 Dependencies:
24 =============
25
26 For the impatient, here is the list of immediate dependencies for
27 running GNUnet:
28
29 - libextractor  >= 0.5.23
30 - libmicrohttpd >= 0.4.2
31 - libgcrypt     >= 1.2
32 - libgmp        >= 4.0
33 - libcurl       >= 7.15.4
34 - libltdl       >= 2.2 (part of GNU libtool)
35 - mysql         >= 5.0 (strongly recommended)
36 - sqlite        >= 3.0 (alternative to MySQL)
37
38 Certain gnunet-setup plugins would also like to have:
39 - GTK          >= 2.6.0
40 - Qt           >= 4.0
41
42 Recommended autotools for compiling the SVN version are:
43 - autoconf >= 2.59
44 - automake >= 1.9.4
45 - libtool  >= 2.2 (only in Debian experimental)
46
47 See also README.debian for a list of Debian packages.
48
49
50 How to install?
51 ===============
52
53 The fastest way is to use a binary package if it is available for your
54 system.  For a more detailed description, read the installation
55 instructions on the webpage at http://gnunet.org/documentation.php3.
56
57
58 If you install from source, you need to install libextractor
59 first (download from http://gnunet.org/libextractor/).  Then
60 you can start the actual GNUnet compilation process with:
61
62 $ ./configure --prefix=$HOME --with-extractor=$HOME
63 $ make
64 # make install
65 # gnunet-setup # (note: does not yet exist!)
66 # gnunet-arm -s
67
68 This will compile and install GNUnet to ~/bin/, ~/lib/ and ~/man/.
69 gnunet-setup will create the configuration; this step is
70 interactive.  You can run gnunet-setup as root for a system-wide
71 installation or as a particular user to create a personal
72 installation.  If you do not want to run gnunetd as root, gnunet-setup
73 can be used to add a user "gnunet".  Data will then be stored in
74 /var/lib/gnunet and gnunetd will run as that user.  Note that
75 additional, per-user configuration files (~/.gnunet/gnunet.conf) also
76 need to be created by each user by running gnunet-setup without the -d
77 option.  Depending on your operating system the wizards of
78 gnunet-setup can also be used to create an init script that starts
79 gnunetd each time the system boots.  For more general information
80 about the GNU build process read the INSTALL file.
81
82 GNUnet requires the GNU MP library (http://www.gnu.org/software/gmp/)
83 and libgcrypt.  You can specify the path to libgcrypt by passing
84 "--with-gcrypt=PATH" to configure.  You will also need either sqlite
85 (version 3 or higher) or MySQL (version 5.0 or higher).
86
87 If you are compiling the code from subversion, you have to run
88 ". bootstrap" before ./configure.  If you receive an error during the
89 running of ". bootstrap" that looks like "macro `AM_PATH_GTK' not
90 found in library", you may need to run aclocal by hand with the -I
91 option, pointing to your aclocal m4 macros, i.e.
92
93 $ aclocal -I /usr/local/share/aclocal
94
95
96 Configuration
97 =============
98
99 // FIXME: update this section once we have gnunet-setup!
100 GNUnet uses two types of configuration files, one for the daemon
101 (called gnunetd.conf) and one for each user (gnunet.conf).  You can
102 create and edit these configuration files with the gnunet-setup tool.
103 You need to add the option "-d" to gnunet-setup in order to edit
104 gnunetd.conf (by default, gnunet-setup will edit gnunet.conf).  The
105 defaults that are created the first time you run gnunet-setup are
106 usually ok, you may want to adjust the limitations (space consumption,
107 bandwidth, etc.) though.  The configuration files are human-readable;
108 gnunetd's configuration is typically located at "/etc/gnunetd.conf".
109 The per-user configuration file should be at "~/.gnunet/gnunet.conf".
110 A default version of the per-user configuration will automatically
111 be created whenever you run any tool that needs that particular
112 cofniguration file.
113
114 You MUST create /etc/gnunet.conf explicitly before starting gnunetd,
115 and the recommended way to do this is to run gnunet-setup -d (plus
116 possibly options to specify which user interface you would perfer).
117
118 If you want to use a different configuration file, pass the name of
119 the configuration file as an argument with the option "-c" to any
120 GNUnet application.   Sending a SIGHUP to the gnunetd process will
121 cause gnunetd to re-read the configuration file.  Note that not all
122 options can be changed at runtime this way (e.g. to change any port
123 number, you must fully restart gnunetd).
124
125
126 Usage
127 =====
128
129 First, you must obtain an initial list of GNUnet hosts.  Knowing a
130 single peer is sufficient since after that GNUnet propagates
131 information about other peers.  Note that the default "gnunet.conf"
132 contains URLs from where GNUnet downloads an initial hostlist
133 whenever it is started.  If you want to create an alternative URL for
134 others to use, the file can be generated on any machine running
135 GNUnet by periodically executing
136
137 $ cat $GNUNETD_HOME/data/hosts/* > the_file
138
139 If the solution with the URL is not feasible for your situation, you
140 can also add hosts manually.  The GNUnet webpage has a public
141 directory of hostkeys under http://gnunet.org/hosts/.  You
142 can of course use any other source for these files.  Copy the hostkeys
143 to "$GNUNETD_HOME/data/hosts/" (where $GNUNETD_HOME is the
144 directory specified in the /etc/gnunet.conf configuration file).
145
146 Now start the local node using "gnunet-arm -s".  GNUnet should run 24/7 if
147 you want to maximize your anonymity.  You may start it as a service
148 with "/etc/init.d/gnunet start".  To publish files on GNUnet, use
149 the "gnunet-publish" command.
150
151 The GTK user interface is shipped separately from GNUnet.  After
152 downloading and installing gnunet-gtk, you can invoke the GUI with:
153
154 $ gnunet-gtk
155
156 For Qt/KDE users, there is also a QT user interface (also shipped 
157 separately).  If you install gnunet-qt, you can invoke the GUI with:
158
159 $ gnunet-qt
160
161 If you want to use the shell (part of this distribution), use
162
163 $ gnunet-search KEYWORD
164
165 This will display a list of results to the console. Then use
166
167 $ gnunet-download -o FILENAME GNUNET_URI
168
169 to retrieve a file.  The GNUNET_URI is printed by gnunet-search
170 together with a description.
171
172 In order to share files, the easiest way is to create a directory
173 with the files (and directories) that you want to share and run
174
175 $ nohup gnunet-auto-share NAME-OF-THE-DIRECTORY &
176
177 For further documentation, see our webpage.
178
179
180 Hacking GNUnet
181 ==============
182
183 Contributions are welcome, please submit bugs to
184 https://gnunet.org/mantis/.  Please make sure to run contrib/report.sh
185 and include the output with your bug reports.  More about how to
186 report bugs can be found in the GNUnet FAQ on the webpage.  Submit
187 patches via E-Mail to gnunet-developers@gnu.org.
188
189 In order to run the unit tests with "make check", you need to
190 set an environment variable ("GNUNET_PREFIX") to the directory
191 where GNUnet is installed (usually, GNUnet will use OS specific
192 tricks in order to try to figure out the PREFIX, but since the
193 testcase binaries are not installed, that trick does not work
194 for them).  Also, before running any testcases, you must
195 complete the installation first.  Quick summary:
196
197 $ ./configure --prefix=$SOMEWHERE
198 $ make
199 $ make install
200 $ export GNUNET_PREFIX=$SOMEWHERE
201 $ make check
202
203 If any testcases fail to pass on your system, run "contrib/report.sh"
204 and report the output together with information about the failing
205 testcase to the Mantis bugtracking system at
206 https://gnunet.org/mantis/.
207
208
209 Running http on port 80
210 =======================
211
212 In order to hide GNUnet's HTTP traffic perfectly, you might consider
213 running GNUnet's HTTP transport on port 80.  However, you should not
214 run GNUnet as root.  Instead, forward port 80 to say 8080 with this
215 command (as root, in your startup scripts):
216
217 # iptables -t nat -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
218
219 Then set in the HTTP section of gnunetd.conf the "ADVERTISED-PORT"
220 to "80" and "PORT" to 8080.   You can do the same trick for the
221 TCP and UDP transports if you want to map them to a priviledged
222 port (from the point of view of the network).
223
224
225 Running the SMTP transport
226 ==========================
227
228 // NOTE: SMTP is not currently available in this version of GNUnet
229 Running GNUnet over SMTP (e-mail) is a bit more involved.  Note that
230 you do not need to run all transports (only running the NAT transport
231 is the only thing that will not work).  If you really want to do
232 P2P over SMTP, read the instructions at http://gnunet.org/smtp.php3
233
234
235 Stay tuned
236 ==========
237
238 * http://www.gnu.org/software/gnunet/
239 * http://gnunet.org/
240 * https://gnunet.org/mantis/
241 * https://gnunet.org/drupal/
242 * http://mail.gnu.org/mailman/listinfo/gnunet-developers
243 * http://mail.gnu.org/mailman/listinfo/help-gnunet
244 * http://mail.gnu.org/mailman/listinfo/info-gnunet
245 * http://mail.gnu.org/mailman/listinfo/gnunet-svn
246