- update token handling
[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 GNU package (http://www.gnu.org/).
11
12 This is an ALPHA release.  There are known and significant bugs as
13 well as many missing features in this release.
14
15 Additional documentation about GNUnet can be found at
16 https://gnunet.org/.
17
18
19 Dependencies:
20 =============
21
22 Please note that for many of its dependencies GNUnet requires very
23 recent versions of the libraries which are often NOT to be found in
24 stable distributions in 2014.  While using older packages may in some
25 cases on some operating systems may seem to work in some limited
26 fashion, we are in many cases aware of serious problems with older
27 packages.  Hence please make sure to use  the versions listed below.
28
29 These are the direct dependencies for running GNUnet:
30
31 - libmicrohttpd >= 0.9.42
32 - libgcrypt     >= 1.6
33 - libgnurl      >= 7.35.0 (available from https://gnunet.org/gnurl)
34 - libunistring  >= 0.9.2
35 - gnutls        >= 3.2.12
36 - libidn        >= 1.0
37 - libextractor  >= 0.6.1 (highly recommended)
38 - openssl       >= 1.0 (binary, used to generate X.509 certificate)
39 - libltdl       >= 2.2 (part of GNU libtool)
40 - sqlite        >= 3.8 (default database, required)
41 - mysql         >= 5.1 (alternative to sqlite)
42 - postgres      >= 8.3 (alternative to sqlite)
43 - libopus       >= 1.0.1 (optional for experimental conversation tool)
44 - libpulse      >= 2.0 (optional for experimental conversation tool)
45 - libogg        >= 1.3.0 (optional for experimental conversation tool)
46 - python-zbar   >= 0.10 (optional for gnunet-qr)
47 - TeX Live      >= 2012 (optional for gnunet-bcd)
48 - libglpk       >= 4.45 (optional for experimental code)
49
50 Recommended autotools for compiling the SVN version are:
51 - autoconf >= 2.59
52 - automake >= 1.11.1
53 - libtool  >= 2.2
54
55
56 How to install?
57 ===============
58
59 The fastest way is to use a binary package if it is available for your
60 system.  For a more detailed description, read the installation
61 instructions on the webpage at https://gnunet.org/installation.
62
63 Note that some functions of GNUnet require "root" access.  GNUnet will
64 install (tiny) SUID binaries for those functions is you run "make
65 install" as root.  If you do not, GNUnet will still work, but some
66 functionality will not be available (including certain forms of NAT
67 traversal).
68
69 GNUnet requires the GNU MP library (http://www.gnu.org/software/gmp/)
70 and libgcrypt (http://www.gnupg.org/).  You can specify the path to
71 libgcrypt by passing "--with-gcrypt=PATH" to configure.  You will also
72 need either sqlite (http://www.sqlite.org/), MySQL
73 (http://www.mysql.org/) or PostGres (http://www.postgres.org/).
74
75 If you install from source, you need to install GNU libextractor first
76 (download from http://www.gnu.org/software/libextractor/).  We also
77 recommend installing GNU libmicrohttpd (download from
78 http://www.gnu.org/software/libmicrohttpd/).  Then you can start the
79 actual GNUnet compilation and installation process with:
80
81 $ export GNUNET_PREFIX=/usr/local/lib # or other directory of your choice
82 # addgroup gnunetdns
83 # adduser gnunet gnunet
84 # ./configure --prefix=$GNUNET_PREFIX/.. --with-extractor=$LE_PREFIX
85 $ make
86 # make install
87 # sudo -u gnunet gnunet-arm -s
88
89 Note that running the 'configure' and 'make install' steps as
90 root (or with sudo) is required as some parts of the installation
91 require the creation of SUID binaries.  The installation will
92 work if you do not run these steps as root, but some components
93 may not be installed in the perfect place or with the right
94 permissions and thus won't work.
95
96 This will create the users and groups needed for running GNUnet
97 securely and then compile and install GNUnet to $GNUNET_PREFIX/../bin/,
98 $GNUNET_PREFIX/ and $GNUNET_PREFIX/../share/ and start the system
99 with the default configuration.  It is strongly recommended that you
100 add a user "gnunet" to run "gnunet-arm".  You can then still run the
101 end-user applications as another user.
102
103 If you create a system user "gnunet", it is recommended that you edit
104 the configuration file slightly so that data can be stored in the
105 system user home directory at "/var/lib/gnunet".  Depending on what
106 the $HOME-directory of your "gnunet" user is, you might need to set
107 the SERVICEHOME option in section "[PATHS]" to "/var/lib/gnunet" to
108 do this.  Depending on your personal preferences, you may also want to
109 use "/etc/gnunet.conf" for the location of the configuration file in
110 this case (instead of ~gnunet/.config/gnunet.conf").  In this case,
111 you need to start GNUnet using "gnunet-arm -s -c /etc/gnunet.conf" or
112 set "XDG_CONFIG_HOME=/etc/".
113
114 You can avoid running 'make install' as root if you run configure
115 with the "--with-sudo=yes" option and have extensive sudo rights
116 (can run "chmod +s" and "chown" via 'sudo').  If you run 'make install'
117 as a normal user without sudo rights (or the configure option),
118 certain binaries that require additional priviledges will not be
119 installed properly (and autonomous NAT traversal, WLAN, DNS/GNS and
120 the VPN will then not work).
121
122 If you run 'configure' and 'make install' as root or use the SUDO
123 option, GNUnet's build system will install "libnss_gns*" libraries to
124 "/lib/" regardless (!) of the $GNUNET_PREFIX you might have specified,
125 as those libraries must be in "/lib/".  If you are packaging GNUnet
126 for binary distribution, this may cause your packaging script to miss
127 those plugins, so you might need to do some additional manual work to
128 include those libraries in your binary package(s).  Similarly, if you
129 want to use the GNUnet naming system and did NOT run GNUnet's 'make
130 install' process with SUDO rights, the libraries will be installed to
131 "$GNUNET_PREFIX" and you will have to move them to "/lib/"
132 manually.
133
134 Finally, if you are compiling the code from subversion, you have to
135 run ". bootstrap" before ./configure.  If you receive an error during
136 the running of ". bootstrap" that looks like "macro `AM_PATH_GTK' not
137 found in library", you may need to run aclocal by hand with the -I
138 option, pointing to your aclocal m4 macros, i.e.
139
140 $ aclocal -I /usr/local/share/aclocal
141
142
143 Configuration
144 =============
145
146 Note that additional, per-user configuration files can be created by
147 each user.  However, this is usually not necessary as there are few
148 per-user options that normal users would want to modify.  The defaults
149 that are shipped with the installation are usually just fine.
150
151 The gnunet-setup tool is particularly useful to generate the master
152 configuration for the peer.  gnunet-setup can be used to configure and
153 test (!) the network settings, choose which applications should be run
154 and configure databases.  Other options you might want to control
155 include system limitations (such as disk space consumption, bandwidth,
156 etc.).  The resulting configuration files are human-readable and can
157 theoretically be created or edited by hand.
158
159 gnunet-setup is a separate download and requires somewhat recent
160 versions of GTK+ and Glade. You can also create the configuration file
161 by hand, but this is not recommended.  For more general information
162 about the GNU build process read the INSTALL file.
163
164 GNUnet uses two types of configuration files, one that specifies the
165 system-wide defaults (typically located in
166 $GNUNET_PREFIX/../share/gnunet/config.d/) and a second one that overrides
167 default values with user-specific preferences.  The user-specific
168 configuration file should be located in "~/.config/gnunet.conf" or its
169 location can be specified by giving the "-c" option to the respective
170 GNUnet application.
171
172
173 Usage
174 =====
175
176 First, you must obtain an initial list of GNUnet hosts.  Knowing a
177 single peer is sufficient since after that GNUnet propagates
178 information about other peers.  Note that the default configuration
179 contains URLs from where GNUnet downloads an initial hostlist
180 whenever it is started.  If you want to create an alternative URL for
181 others to use, the file can be generated on any machine running
182 GNUnet by periodically executing
183
184 $ cat $SERVICEHOME/data/hosts/* > the_file
185
186 and offering 'the_file' via your web server.  Alternatively, you can
187 run the build-in web server by adding '-p' to the OPTIONS value
188 in the "hostlist" section of gnunet.conf and opening the respective
189 HTTPPORT to the public.
190
191 If the solution with the hostlist URL is not feasible for your
192 situation, you can also add hosts manually.  Simply copy the hostkeys
193 to "$SERVICEHOME/data/hosts/" (where $SERVICEHOME is the directory
194 specified in the gnunet.conf configuration file).  You can also use
195 "gnunet-peerinfo -g" to GET a URI for a peer and "gnunet-peerinfo -p
196 URI" to add a URI from another peer.  Finally, GNUnet peers that use
197 UDP or WLAN will discover each other automatically (if they are in the
198 vicinity of each other) using broadcasts (IPv4/WLAN) or multicasts
199 (IPv6).
200
201 The local node is started using "gnunet-arm -s".  GNUnet should run
202 24/7 if you want to maximize your anonymity, as this makes partitioning
203 attacks harder.
204
205 Once your peer is running, you should then be able to access GNUnet
206 using the shell:
207
208 $ gnunet-search KEYWORD
209
210 This will display a list of results to the console.  You can abort
211 the command using "CTRL-C".  Then use
212
213 $ gnunet-download -o FILENAME GNUNET_URI
214
215 to retrieve a file.  The GNUNET_URI is printed by gnunet-search
216 together with a description.  To publish files on GNUnet, use the
217 "gnunet-publish" command.
218
219
220 The GTK user interface is shipped separately.  After downloading and
221 installing gnunet-gtk, you can invoke the setup tool and the
222 file-sharing GUI with:
223
224 $ gnunet-setup
225 $ gnunet-fs-gtk
226
227 For further documentation, see our webpage.
228
229
230 Hacking GNUnet
231 ==============
232
233 Contributions are welcome, please submit bugs to
234 https://gnunet.org/bugs/.  Please make sure to run contrib/report.sh
235 and include the output with your bug reports.  More about how to
236 report bugs can be found in the GNUnet FAQ on the webpage.  Submit
237 patches via E-Mail to gnunet-developers@gnu.org.
238
239 In order to run the unit tests with by hand (instead of using
240 "make check"), you need to
241 set an environment variable ("GNUNET_PREFIX") to the directory
242 where GNUnet's libraries are installed.
243 Also, before running any testcases, you must
244 complete the installation first.  Quick summary:
245
246 $ ./configure --prefix=$SOMEWHERE
247 $ make
248 $ make install
249 $ make check
250
251 Some of the testcases require python >= 2.6 and pexpect to be
252 installed.  If any testcases fail to pass on your system, run
253 "contrib/report.sh" and report the output together with
254 information about the failing testcase to the Mantis bugtracking
255 system at https://gnunet.org/bugs/.
256
257
258 Running HTTP on port 80 and HTTPS on port 443
259 =============================================
260
261 In order to hide GNUnet's HTTP/HTTPS traffic perfectly, you might
262 consider running GNUnet's HTTP/HTTPS transport on port 80/443.
263 However, we do not recommend running GNUnet as root.  Instead, forward
264 port 80 to say 1080 with this command (as root, in your startup
265 scripts):
266
267 # iptables -t nat -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 1080
268
269 or for HTTPS
270
271 # iptables -t nat -A PREROUTING -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 4433
272
273 Then set in the HTTP section of gnunet.conf the "ADVERTISED_PORT" to
274 "80" and "PORT" to 1080 and similarly in the HTTPS section the
275 "ADVERTISED_PORT" to "443" and "PORT" to 4433.
276
277 You can do the same trick for the TCP and UDP transports if you want
278 to map them to a priviledged port (from the point of view of the
279 network).  However, we are not aware of this providing any advantages
280 at this point.
281
282 If you are already running an HTTP or HTTPS server on port 80 (or 443),
283 you may be able to configure it as a "ReverseProxy".  Here, you tell
284 GNUnet that the externally visible URI is some sub-page on your website,
285 and GNUnet can then tunnel its traffic via your existing HTTP server.
286 This is particularly powerful if your existing server uses HTTPS, as
287 it makes it harder for an adversary to distinguish normal traffic to
288 your server from GNUnet traffic.  Finally, even if you just use HTTP,
289 you might benefit (!) from ISP's traffic shaping as opposed to being
290 throttled by ISPs that dislike P2P.  Details for configuring the
291 reverse proxy are documented on our website.
292
293
294 Stay tuned
295 ==========
296
297 * https://gnunet.org/
298 * https://gnunet.org/bugs/
299 * https://gnunet.org/svn/
300 * http://www.gnu.org/software/gnunet/
301 * http://mail.gnu.org/mailman/listinfo/gnunet-developers
302 * http://mail.gnu.org/mailman/listinfo/help-gnunet
303 * http://mail.gnu.org/mailman/listinfo/info-gnunet
304 * http://mail.gnu.org/mailman/listinfo/gnunet-svn