aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-11-27 23:04:49 +0100
committerLudovic Courtès <ludo@gnu.org>2015-11-27 23:04:49 +0100
commit6331bde73f26381e694f84e7e6885f1961abb8ae (patch)
tree0b05e019be400bcda9b7d1107cd8dd20a8a37629 /doc
parentfde40c98f916d36746dd78e742dff576146beef7 (diff)
downloadguix-6331bde73f26381e694f84e7e6885f1961abb8ae.tar
guix-6331bde73f26381e694f84e7e6885f1961abb8ae.tar.gz
services: Add 'tor-hidden-service'.
* gnu/services/networking.scm (<tor-configuration>, <hidden-service>): New record types. (tor-configuration->torrc): New procedure. (tor-dmd-service): Use it. (tor-hidden-service-activation): New procedure. (tor-service-type)[extensions]: Extend ACTIVATION-SERVICE-TYPE. [compose, extend]: New fields. (tor-service): Use 'tor-configuration'. (tor-hidden-service-type): New variable. (tor-hidden-service): New procedure.
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi25
1 files changed, 23 insertions, 2 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index b4044531ed..2252bf9c18 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -6580,8 +6580,29 @@ Return a service to run the @uref{https://torproject.org, Tor} anonymous
networking daemon.
The daemon runs as the @code{tor} unprivileged user. It is passed
-@var{config-file}, a file-like object, with an additional @code{User tor}
-line. Run @command{man tor} for information about the configuration file.
+@var{config-file}, a file-like object, with an additional @code{User tor} line
+and lines for hidden services added via @code{tor-hidden-service}. Run
+@command{man tor} for information about the configuration file.
+@end deffn
+
+@deffn {Scheme Procedure} tor-hidden-service @var{name} @var{mapping}
+Define a new Tor @dfn{hidden service} called @var{name} and implementing
+@var{mapping}. @var{mapping} is a list of port/host tuples, such as:
+
+@example
+ '((22 \"127.0.0.1:22\")
+ (80 \"127.0.0.1:8080\"))
+@end example
+
+In this example, port 22 of the hidden service is mapped to local port 22, and
+port 80 is mapped to local port 8080.
+
+This creates a @file{/var/lib/tor/@var{name}} directory, where the
+@file{hostname} file contains the @code{.onion} host name for the hidden
+service.
+
+See @uref{https://www.torproject.org/docs/tor-hidden-service.html.en, the Tor
+project's documentation} for more information.
@end deffn
@deffn {Scheme Procedure} bitlbee-service [#:bitlbee bitlbee] @