From fd449608eb9016fb705eebbea784901b0242cbf2 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 12 Apr 2021 17:00:27 -0400 Subject: services: Add a service for opendht. * gnu/services/networking.scm (maybe-number?, maybe-string?): New procedures. (): New configuration record. (%opendht-accounts): New variable. (opendht-configuration->command-line-arguments): New procedure. (opendht-shepherd-service, opendht-service-type): New variables. * doc/guix.texi (Networking Services): Document the new service. --- doc/guix.texi | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index a10943f2d5..a8ee27cae7 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -16688,6 +16688,99 @@ must be @code{'()} or @code{'("internal")}. detailed discussion of each configuration field. @end deftp +@cindex opendht, distributed hash table network service +@cindex dhtproxy, for use with jami +@defvr {Scheme Variable} opendht-service-type +This is the type of the service running a @uref{https://opendht.net, +OpenDHT} node, @command{dhtnode}. The daemon can be used to host your +own proxy service to the distributed hash table (DHT), for example to +connect to with Jami, among other applications. + +@quotation Important +When using the OpenDHT proxy server, the IP addresses it ``sees'' from +the clients should be addresses reachable from other peers. In practice +this means that a publicly reachable address is best suited for a proxy +server, outside of your private network. For example, hosting the proxy +server on a IPv4 private local network and exposing it via port +forwarding could work for external peers, but peers local to the proxy +would have their private addresses shared with the external peers, +leading to connectivity problems. +@end quotation + +The value of this service is a @code{opendht-configuration} object, as +described below. +@end defvr + +@deftp {Data Type} opendht-configuration +This is the data type for the OpenDHT service configuration. + +@c The fields documentation has been auto-generated using the +@c configuration->documentation procedure from +@c (gnu services configuration). +Available @code{opendht-configuration} fields are: + +@deftypevr {@code{opendht-configuration} parameter} package opendht +The @code{opendht} package to use. + +@end deftypevr + +@deftypevr {@code{opendht-configuration} parameter} boolean peer-discovery? +Whether to enable the multicast local peer discovery mechanism. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{opendht-configuration} parameter} boolean enable-logging? +Whether to enable logging messages to syslog. It is disabled by default +as it is rather verbose. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{opendht-configuration} parameter} boolean debug? +Whether to enable debug-level logging messages. This has no effect if +logging is disabled. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{opendht-configuration} parameter} maybe-string bootstrap-host +The node host name that is used to make the first connection to the +network. A specific port value can be provided by appending the +@code{:PORT} suffix. By default, it uses the Jami bootstrap nodes, but +any host can be specified here. It's also possible to disable +bootsrapping by setting this to the @code{'disabled} symbol. + +Defaults to @samp{"bootstrap.jami.net:4222"}. + +@end deftypevr + +@deftypevr {@code{opendht-configuration} parameter} maybe-number port +The UDP port to bind to. When set to @code{'disabled}, an available +port is automatically selected. + +Defaults to @samp{4222}. + +@end deftypevr + +@deftypevr {@code{opendht-configuration} parameter} maybe-number proxy-server-port +Spawn a proxy server listening on the specified port. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{opendht-configuration} parameter} maybe-number proxy-server-port-tls +Spawn a proxy server listening to TLS connections on the specified port. + +Defaults to @samp{disabled}. + +@end deftypevr +@end deftp + @cindex Tor @defvr {Scheme Variable} tor-service-type This is the type for a service that runs the @uref{https://torproject.org, -- cgit v1.2.3