README 13 KB

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