services: configuration: Step back from *unspecified*.
Fixes <https://issues.guix.gnu.org/56799>.
This partially reverts 8cb1a49a39
.
Rationale: *unspecified* cannot be serialized thus used as a G-Expression
input, which is problematic/inconvenient when using deeply nested records. As
an example, jami-service-type was broken when using partially defined
<jami-account> records.
* gnu/services/configuration.scm (define-maybe-helper): Check against the
'unset symbol.
(normalize-field-type+def): Adjust value to 'unset.
(define-configuration-helper): Use 'unset as the default value thunk.
* gnu/services/file-sharing.scm (serialize-maybe-string): Check against the
'unset symbol.
(serialize-maybe-file-object): Likewise.
* gnu/services/messaging.scm (define-all-configurations): Use 'unset as
value.
(raw-content?): Check against 'unset symbol.
(prosody-configuration)[http-max-content-size]: Default to 'unset.
[http-external-url]: Likewise.
[mod-muc]: Likewise.
[raw-content]: Likewise.
* gnu/services/networking.scm (opendht-configuration): Adjust documentation.
* gnu/services/telephony.scm (jami-shepherd-services): Replace *undefined*
with the 'unset symbol.
* tests/services/configuration.scm ("maybe type, no default"): Check against
the 'unset symbol.
* doc/guix.texi: Regenerate the opendht-configuration,
openvpn-client-configuration and openvpn-server-configuration documentation.
This commit is contained in:
parent
4905b5b839
commit
a2b89a3319
7 changed files with 103 additions and 311 deletions
369
doc/guix.texi
369
doc/guix.texi
|
@ -19769,75 +19769,46 @@ The value of this service is a @code{opendht-configuration} object, as
|
||||||
described below.
|
described below.
|
||||||
@end defvr
|
@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 The fields documentation has been auto-generated using the
|
||||||
@c configuration->documentation procedure from
|
@c configuration->documentation procedure from
|
||||||
@c (gnu services configuration).
|
@c (gnu services configuration).
|
||||||
|
@deftp {Data Type} opendht-configuration
|
||||||
Available @code{opendht-configuration} fields are:
|
Available @code{opendht-configuration} fields are:
|
||||||
|
|
||||||
@deftypevr {@code{opendht-configuration} parameter} package opendht
|
@table @asis
|
||||||
|
@item @code{opendht} (default: @code{opendht}) (type: file-like)
|
||||||
The @code{opendht} package to use.
|
The @code{opendht} package to use.
|
||||||
|
|
||||||
@end deftypevr
|
@item @code{peer-discovery?} (default: @code{#f}) (type: boolean)
|
||||||
|
|
||||||
@deftypevr {@code{opendht-configuration} parameter} boolean peer-discovery?
|
|
||||||
Whether to enable the multicast local peer discovery mechanism.
|
Whether to enable the multicast local peer discovery mechanism.
|
||||||
|
|
||||||
Defaults to @samp{#f}.
|
@item @code{enable-logging?} (default: @code{#f}) (type: boolean)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{opendht-configuration} parameter} boolean enable-logging?
|
|
||||||
Whether to enable logging messages to syslog. It is disabled by default
|
Whether to enable logging messages to syslog. It is disabled by default
|
||||||
as it is rather verbose.
|
as it is rather verbose.
|
||||||
|
|
||||||
Defaults to @samp{#f}.
|
@item @code{debug?} (default: @code{#f}) (type: boolean)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{opendht-configuration} parameter} boolean debug?
|
|
||||||
Whether to enable debug-level logging messages. This has no effect if
|
Whether to enable debug-level logging messages. This has no effect if
|
||||||
logging is disabled.
|
logging is disabled.
|
||||||
|
|
||||||
Defaults to @samp{#f}.
|
@item @code{bootstrap-host} (default: @code{"bootstrap.jami.net:4222"}) (type: maybe-string)
|
||||||
|
|
||||||
@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
|
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
|
network. A specific port value can be provided by appending the
|
||||||
@code{:PORT} suffix. By default, it uses the Jami bootstrap nodes, but
|
@code{:PORT} suffix. By default, it uses the Jami bootstrap nodes, but
|
||||||
any host can be specified here. It's also possible to disable
|
any host can be specified here. It's also possible to disable
|
||||||
bootsrapping by explicitly setting this to the @code{*unspecified*}
|
bootstrapping by explicitly setting this field to the
|
||||||
value.
|
@code{'unset} value.
|
||||||
|
|
||||||
Defaults to @samp{"bootstrap.jami.net:4222"}.
|
@item @code{port} (default: @code{4222}) (type: maybe-number)
|
||||||
|
The UDP port to bind to. When left unspecified, an available port is
|
||||||
|
automatically selected.
|
||||||
|
|
||||||
@end deftypevr
|
@item @code{proxy-server-port} (type: maybe-number)
|
||||||
|
|
||||||
@deftypevr {@code{opendht-configuration} parameter} maybe-number port
|
|
||||||
The UDP port to bind to. When explicitly set to @code{*unspecified*},
|
|
||||||
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.
|
Spawn a proxy server listening on the specified port.
|
||||||
|
|
||||||
Defaults to @samp{disabled}.
|
@item @code{proxy-server-port-tls} (type: maybe-number)
|
||||||
|
|
||||||
@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.
|
Spawn a proxy server listening to TLS connections on the specified port.
|
||||||
|
|
||||||
Defaults to @samp{disabled}.
|
@end table
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
@end deftp
|
@end deftp
|
||||||
|
|
||||||
@cindex Tor
|
@cindex Tor
|
||||||
|
@ -30532,362 +30503,184 @@ Both can be run simultaneously.
|
||||||
|
|
||||||
@c %automatically generated documentation
|
@c %automatically generated documentation
|
||||||
|
|
||||||
|
@deftp {Data Type} openvpn-client-configuration
|
||||||
Available @code{openvpn-client-configuration} fields are:
|
Available @code{openvpn-client-configuration} fields are:
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-client-configuration} parameter} package openvpn
|
@table @asis
|
||||||
|
@item @code{openvpn} (default: @code{openvpn}) (type: file-like)
|
||||||
The OpenVPN package.
|
The OpenVPN package.
|
||||||
|
|
||||||
@end deftypevr
|
@item @code{pid-file} (default: @code{"/var/run/openvpn/openvpn.pid"}) (type: string)
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-client-configuration} parameter} string pid-file
|
|
||||||
The OpenVPN pid file.
|
The OpenVPN pid file.
|
||||||
|
|
||||||
Defaults to @samp{"/var/run/openvpn/openvpn.pid"}.
|
@item @code{proto} (default: @code{udp}) (type: proto)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-client-configuration} parameter} proto proto
|
|
||||||
The protocol (UDP or TCP) used to open a channel between clients and
|
The protocol (UDP or TCP) used to open a channel between clients and
|
||||||
servers.
|
servers.
|
||||||
|
|
||||||
Defaults to @samp{udp}.
|
@item @code{dev} (default: @code{tun}) (type: dev)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-client-configuration} parameter} dev dev
|
|
||||||
The device type used to represent the VPN connection.
|
The device type used to represent the VPN connection.
|
||||||
|
|
||||||
Defaults to @samp{tun}.
|
@item @code{ca} (default: @code{"/etc/openvpn/ca.crt"}) (type: maybe-string)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
If you do not have some of these files (eg.@: you use a username and
|
|
||||||
password), you can disable any of the following three fields by setting
|
|
||||||
it to @code{*unspecified*}.
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-client-configuration} parameter} maybe-string ca
|
|
||||||
The certificate authority to check connections against.
|
The certificate authority to check connections against.
|
||||||
|
|
||||||
Defaults to @samp{"/etc/openvpn/ca.crt"}.
|
@item @code{cert} (default: @code{"/etc/openvpn/client.crt"}) (type: maybe-string)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-client-configuration} parameter} maybe-string cert
|
|
||||||
The certificate of the machine the daemon is running on. It should be
|
The certificate of the machine the daemon is running on. It should be
|
||||||
signed by the authority given in @code{ca}.
|
signed by the authority given in @code{ca}.
|
||||||
|
|
||||||
Defaults to @samp{"/etc/openvpn/client.crt"}.
|
@item @code{key} (default: @code{"/etc/openvpn/client.key"}) (type: maybe-string)
|
||||||
|
The key of the machine the daemon is running on. It must be the key
|
||||||
|
whose certificate is @code{cert}.
|
||||||
|
|
||||||
@end deftypevr
|
@item @code{comp-lzo?} (default: @code{#t}) (type: boolean)
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-client-configuration} parameter} maybe-string key
|
|
||||||
The key of the machine the daemon is running on. It must be the key whose
|
|
||||||
certificate is @code{cert}.
|
|
||||||
|
|
||||||
Defaults to @samp{"/etc/openvpn/client.key"}.
|
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-client-configuration} parameter} boolean comp-lzo?
|
|
||||||
Whether to use the lzo compression algorithm.
|
Whether to use the lzo compression algorithm.
|
||||||
|
|
||||||
Defaults to @samp{#t}.
|
@item @code{persist-key?} (default: @code{#t}) (type: boolean)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-client-configuration} parameter} boolean persist-key?
|
|
||||||
Don't re-read key files across SIGUSR1 or --ping-restart.
|
Don't re-read key files across SIGUSR1 or --ping-restart.
|
||||||
|
|
||||||
Defaults to @samp{#t}.
|
@item @code{persist-tun?} (default: @code{#t}) (type: boolean)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-client-configuration} parameter} boolean persist-tun?
|
|
||||||
Don't close and reopen TUN/TAP device or run up/down scripts across
|
Don't close and reopen TUN/TAP device or run up/down scripts across
|
||||||
SIGUSR1 or --ping-restart restarts.
|
SIGUSR1 or --ping-restart restarts.
|
||||||
|
|
||||||
Defaults to @samp{#t}.
|
@item @code{fast-io?} (default: @code{#f}) (type: boolean)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-client-configuration} parameter} boolean fast-io?
|
|
||||||
(Experimental) Optimize TUN/TAP/UDP I/O writes by avoiding a call to
|
(Experimental) Optimize TUN/TAP/UDP I/O writes by avoiding a call to
|
||||||
poll/epoll/select prior to the write operation.
|
poll/epoll/select prior to the write operation.
|
||||||
|
|
||||||
Defaults to @samp{#f}.
|
@item @code{verbosity} (default: @code{3}) (type: number)
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-client-configuration} parameter} number verbosity
|
|
||||||
Verbosity level.
|
Verbosity level.
|
||||||
|
|
||||||
Defaults to @samp{3}.
|
@item @code{tls-auth} (default: @code{#f}) (type: tls-auth-client)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-client-configuration} parameter} tls-auth-client tls-auth
|
|
||||||
Add an additional layer of HMAC authentication on top of the TLS control
|
Add an additional layer of HMAC authentication on top of the TLS control
|
||||||
channel to protect against DoS attacks.
|
channel to protect against DoS attacks.
|
||||||
|
|
||||||
Defaults to @samp{#f}.
|
@item @code{auth-user-pass} (type: maybe-string)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-client-configuration} parameter} maybe-string auth-user-pass
|
|
||||||
Authenticate with server using username/password. The option is a file
|
Authenticate with server using username/password. The option is a file
|
||||||
containing username/password on 2 lines. Do not use a file-like object as it
|
containing username/password on 2 lines. Do not use a file-like object
|
||||||
would be added to the store and readable by any user.
|
as it would be added to the store and readable by any user.
|
||||||
|
|
||||||
@end deftypevr
|
@item @code{verify-key-usage?} (default: @code{#t}) (type: key-usage)
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-client-configuration} parameter} key-usage verify-key-usage?
|
|
||||||
Whether to check the server certificate has server usage extension.
|
Whether to check the server certificate has server usage extension.
|
||||||
|
|
||||||
Defaults to @samp{#t}.
|
@item @code{bind?} (default: @code{#f}) (type: bind)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-client-configuration} parameter} bind bind?
|
|
||||||
Bind to a specific local port number.
|
Bind to a specific local port number.
|
||||||
|
|
||||||
Defaults to @samp{#f}.
|
@item @code{resolv-retry?} (default: @code{#t}) (type: resolv-retry)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-client-configuration} parameter} resolv-retry resolv-retry?
|
|
||||||
Retry resolving server address.
|
Retry resolving server address.
|
||||||
|
|
||||||
Defaults to @samp{#t}.
|
@item @code{remote} (default: @code{()}) (type: openvpn-remote-list)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-client-configuration} parameter} openvpn-remote-list remote
|
|
||||||
A list of remote servers to connect to.
|
A list of remote servers to connect to.
|
||||||
|
|
||||||
Defaults to @samp{()}.
|
@deftp {Data Type} openvpn-remote-configuration
|
||||||
|
|
||||||
Available @code{openvpn-remote-configuration} fields are:
|
Available @code{openvpn-remote-configuration} fields are:
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-remote-configuration} parameter} string name
|
@table @asis
|
||||||
|
@item @code{name} (default: @code{"my-server"}) (type: string)
|
||||||
Server name.
|
Server name.
|
||||||
|
|
||||||
Defaults to @samp{"my-server"}.
|
@item @code{port} (default: @code{1194}) (type: number)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-remote-configuration} parameter} number port
|
|
||||||
Port number the server listens to.
|
Port number the server listens to.
|
||||||
|
|
||||||
Defaults to @samp{1194}.
|
@end table
|
||||||
|
|
||||||
@end deftypevr
|
@end deftp
|
||||||
|
|
||||||
|
@end table
|
||||||
|
|
||||||
|
@end deftp
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
@c %end of automatic openvpn-client documentation
|
@c %end of automatic openvpn-client documentation
|
||||||
|
|
||||||
@c %automatically generated documentation
|
@c %automatically generated documentation
|
||||||
|
|
||||||
|
@deftp {Data Type} openvpn-server-configuration
|
||||||
Available @code{openvpn-server-configuration} fields are:
|
Available @code{openvpn-server-configuration} fields are:
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-server-configuration} parameter} package openvpn
|
@table @asis
|
||||||
|
@item @code{openvpn} (default: @code{openvpn}) (type: file-like)
|
||||||
The OpenVPN package.
|
The OpenVPN package.
|
||||||
|
|
||||||
@end deftypevr
|
@item @code{pid-file} (default: @code{"/var/run/openvpn/openvpn.pid"}) (type: string)
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-server-configuration} parameter} string pid-file
|
|
||||||
The OpenVPN pid file.
|
The OpenVPN pid file.
|
||||||
|
|
||||||
Defaults to @samp{"/var/run/openvpn/openvpn.pid"}.
|
@item @code{proto} (default: @code{udp}) (type: proto)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-server-configuration} parameter} proto proto
|
|
||||||
The protocol (UDP or TCP) used to open a channel between clients and
|
The protocol (UDP or TCP) used to open a channel between clients and
|
||||||
servers.
|
servers.
|
||||||
|
|
||||||
Defaults to @samp{udp}.
|
@item @code{dev} (default: @code{tun}) (type: dev)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-server-configuration} parameter} dev dev
|
|
||||||
The device type used to represent the VPN connection.
|
The device type used to represent the VPN connection.
|
||||||
|
|
||||||
Defaults to @samp{tun}.
|
@item @code{ca} (default: @code{"/etc/openvpn/ca.crt"}) (type: maybe-string)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
If you do not have some of these files (eg.@: you use a username and
|
|
||||||
password), you can disable any of the following three fields by setting
|
|
||||||
it to @code{*unspecified*}.
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-server-configuration} parameter} maybe-string ca
|
|
||||||
The certificate authority to check connections against.
|
The certificate authority to check connections against.
|
||||||
|
|
||||||
Defaults to @samp{"/etc/openvpn/ca.crt"}.
|
@item @code{cert} (default: @code{"/etc/openvpn/client.crt"}) (type: maybe-string)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-server-configuration} parameter} maybe-string cert
|
|
||||||
The certificate of the machine the daemon is running on. It should be
|
The certificate of the machine the daemon is running on. It should be
|
||||||
signed by the authority given in @code{ca}.
|
signed by the authority given in @code{ca}.
|
||||||
|
|
||||||
Defaults to @samp{"/etc/openvpn/client.crt"}.
|
@item @code{key} (default: @code{"/etc/openvpn/client.key"}) (type: maybe-string)
|
||||||
|
The key of the machine the daemon is running on. It must be the key
|
||||||
|
whose certificate is @code{cert}.
|
||||||
|
|
||||||
@end deftypevr
|
@item @code{comp-lzo?} (default: @code{#t}) (type: boolean)
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-server-configuration} parameter} maybe-string key
|
|
||||||
The key of the machine the daemon is running on. It must be the key whose
|
|
||||||
certificate is @code{cert}.
|
|
||||||
|
|
||||||
Defaults to @samp{"/etc/openvpn/client.key"}.
|
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-server-configuration} parameter} boolean comp-lzo?
|
|
||||||
Whether to use the lzo compression algorithm.
|
Whether to use the lzo compression algorithm.
|
||||||
|
|
||||||
Defaults to @samp{#t}.
|
@item @code{persist-key?} (default: @code{#t}) (type: boolean)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-server-configuration} parameter} boolean persist-key?
|
|
||||||
Don't re-read key files across SIGUSR1 or --ping-restart.
|
Don't re-read key files across SIGUSR1 or --ping-restart.
|
||||||
|
|
||||||
Defaults to @samp{#t}.
|
@item @code{persist-tun?} (default: @code{#t}) (type: boolean)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-server-configuration} parameter} boolean persist-tun?
|
|
||||||
Don't close and reopen TUN/TAP device or run up/down scripts across
|
Don't close and reopen TUN/TAP device or run up/down scripts across
|
||||||
SIGUSR1 or --ping-restart restarts.
|
SIGUSR1 or --ping-restart restarts.
|
||||||
|
|
||||||
Defaults to @samp{#t}.
|
@item @code{fast-io?} (default: @code{#f}) (type: boolean)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-server-configuration} parameter} boolean fast-io?
|
|
||||||
(Experimental) Optimize TUN/TAP/UDP I/O writes by avoiding a call to
|
(Experimental) Optimize TUN/TAP/UDP I/O writes by avoiding a call to
|
||||||
poll/epoll/select prior to the write operation.
|
poll/epoll/select prior to the write operation.
|
||||||
|
|
||||||
Defaults to @samp{#f}.
|
@item @code{verbosity} (default: @code{3}) (type: number)
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-server-configuration} parameter} number verbosity
|
|
||||||
Verbosity level.
|
Verbosity level.
|
||||||
|
|
||||||
Defaults to @samp{3}.
|
@item @code{tls-auth} (default: @code{#f}) (type: tls-auth-server)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-server-configuration} parameter} tls-auth-server tls-auth
|
|
||||||
Add an additional layer of HMAC authentication on top of the TLS control
|
Add an additional layer of HMAC authentication on top of the TLS control
|
||||||
channel to protect against DoS attacks.
|
channel to protect against DoS attacks.
|
||||||
|
|
||||||
Defaults to @samp{#f}.
|
@item @code{port} (default: @code{1194}) (type: number)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-server-configuration} parameter} number port
|
|
||||||
Specifies the port number on which the server listens.
|
Specifies the port number on which the server listens.
|
||||||
|
|
||||||
Defaults to @samp{1194}.
|
@item @code{server} (default: @code{"10.8.0.0 255.255.255.0"}) (type: ip-mask)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-server-configuration} parameter} ip-mask server
|
|
||||||
An ip and mask specifying the subnet inside the virtual network.
|
An ip and mask specifying the subnet inside the virtual network.
|
||||||
|
|
||||||
Defaults to @samp{"10.8.0.0 255.255.255.0"}.
|
@item @code{server-ipv6} (default: @code{#f}) (type: cidr6)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-server-configuration} parameter} cidr6 server-ipv6
|
|
||||||
A CIDR notation specifying the IPv6 subnet inside the virtual network.
|
A CIDR notation specifying the IPv6 subnet inside the virtual network.
|
||||||
|
|
||||||
Defaults to @samp{#f}.
|
@item @code{dh} (default: @code{"/etc/openvpn/dh2048.pem"}) (type: string)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-server-configuration} parameter} string dh
|
|
||||||
The Diffie-Hellman parameters file.
|
The Diffie-Hellman parameters file.
|
||||||
|
|
||||||
Defaults to @samp{"/etc/openvpn/dh2048.pem"}.
|
@item @code{ifconfig-pool-persist} (default: @code{"/etc/openvpn/ipp.txt"}) (type: string)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-server-configuration} parameter} string ifconfig-pool-persist
|
|
||||||
The file that records client IPs.
|
The file that records client IPs.
|
||||||
|
|
||||||
Defaults to @samp{"/etc/openvpn/ipp.txt"}.
|
@item @code{redirect-gateway?} (default: @code{#f}) (type: gateway)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-server-configuration} parameter} gateway redirect-gateway?
|
|
||||||
When true, the server will act as a gateway for its clients.
|
When true, the server will act as a gateway for its clients.
|
||||||
|
|
||||||
Defaults to @samp{#f}.
|
@item @code{client-to-client?} (default: @code{#f}) (type: boolean)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-server-configuration} parameter} boolean client-to-client?
|
|
||||||
When true, clients are allowed to talk to each other inside the VPN.
|
When true, clients are allowed to talk to each other inside the VPN.
|
||||||
|
|
||||||
Defaults to @samp{#f}.
|
@item @code{keepalive} (default: @code{(10 120)}) (type: keepalive)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-server-configuration} parameter} keepalive keepalive
|
|
||||||
Causes ping-like messages to be sent back and forth over the link so
|
Causes ping-like messages to be sent back and forth over the link so
|
||||||
that each side knows when the other side has gone down. @code{keepalive}
|
that each side knows when the other side has gone down. @code{keepalive}
|
||||||
requires a pair. The first element is the period of the ping sending,
|
requires a pair. The first element is the period of the ping sending,
|
||||||
and the second element is the timeout before considering the other side
|
and the second element is the timeout before considering the other side
|
||||||
down.
|
down.
|
||||||
|
|
||||||
@end deftypevr
|
@item @code{max-clients} (default: @code{100}) (type: number)
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-server-configuration} parameter} number max-clients
|
|
||||||
The maximum number of clients.
|
The maximum number of clients.
|
||||||
|
|
||||||
Defaults to @samp{100}.
|
@item @code{status} (default: @code{"/var/run/openvpn/status"}) (type: string)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-server-configuration} parameter} string status
|
|
||||||
The status file. This file shows a small report on current connection.
|
The status file. This file shows a small report on current connection.
|
||||||
It is truncated and rewritten every minute.
|
It is truncated and rewritten every minute.
|
||||||
|
|
||||||
Defaults to @samp{"/var/run/openvpn/status"}.
|
@item @code{client-config-dir} (default: @code{()}) (type: openvpn-ccd-list)
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-server-configuration} parameter} openvpn-ccd-list client-config-dir
|
|
||||||
The list of configuration for some clients.
|
The list of configuration for some clients.
|
||||||
|
|
||||||
Defaults to @samp{()}.
|
@end table
|
||||||
|
|
||||||
Available @code{openvpn-ccd-configuration} fields are:
|
@end deftp
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-ccd-configuration} parameter} string name
|
|
||||||
Client name.
|
|
||||||
|
|
||||||
Defaults to @samp{"client"}.
|
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-ccd-configuration} parameter} ip-mask iroute
|
|
||||||
Client own network
|
|
||||||
|
|
||||||
Defaults to @samp{#f}.
|
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@deftypevr {@code{openvpn-ccd-configuration} parameter} ip-mask ifconfig-push
|
|
||||||
Client VPN IP.
|
|
||||||
|
|
||||||
Defaults to @samp{#f}.
|
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@end deftypevr
|
|
||||||
|
|
||||||
@c %end of automatic openvpn-server documentation
|
@c %end of automatic openvpn-server documentation
|
||||||
|
|
||||||
|
@ -31519,7 +31312,7 @@ Each parameter definition is preceded by its type; for example,
|
||||||
@samp{boolean foo} indicates that the @code{foo} parameter should be
|
@samp{boolean foo} indicates that the @code{foo} parameter should be
|
||||||
specified as a boolean. Types starting with @code{maybe-} denote
|
specified as a boolean. Types starting with @code{maybe-} denote
|
||||||
parameters that won't show up in TLP config file when their value is
|
parameters that won't show up in TLP config file when their value is
|
||||||
left unset, or is explicitly set to the @code{*unspecified*} value.
|
left unset, or is explicitly set to the @code{'unset} value.
|
||||||
|
|
||||||
@c The following documentation was initially generated by
|
@c The following documentation was initially generated by
|
||||||
@c (generate-tlp-documentation) in (gnu services pm). Manually maintained
|
@c (generate-tlp-documentation) in (gnu services pm). Manually maintained
|
||||||
|
@ -39136,7 +38929,7 @@ macro which is a shorthand of this.
|
||||||
Sometimes a field should not be serialized if the user doesn’t specify a
|
Sometimes a field should not be serialized if the user doesn’t specify a
|
||||||
value. To achieve this, you can use the @code{define-maybe} macro to
|
value. To achieve this, you can use the @code{define-maybe} macro to
|
||||||
define a ``maybe type''; if the value of a maybe type is left unset, or
|
define a ``maybe type''; if the value of a maybe type is left unset, or
|
||||||
is set to the @code{*unspecified*} value, then it will not be
|
is set to the @code{'unset} value, then it will not be
|
||||||
serialized.
|
serialized.
|
||||||
|
|
||||||
When defining a ``maybe type'', the corresponding serializer for the
|
When defining a ``maybe type'', the corresponding serializer for the
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
|
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||||
;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
|
;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
|
||||||
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
|
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
|
||||||
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||||
;;; Copyright © 2021 Andrew Tropin <andrew@trop.in>
|
;;; Copyright © 2021 Andrew Tropin <andrew@trop.in>
|
||||||
;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
|
;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
|
||||||
;;;
|
;;;
|
||||||
|
@ -142,8 +142,7 @@ does not have a default value" field kind)))
|
||||||
(id #'stem #'serialize-maybe- #'stem))))
|
(id #'stem #'serialize-maybe- #'stem))))
|
||||||
#`(begin
|
#`(begin
|
||||||
(define (maybe-stem? val)
|
(define (maybe-stem? val)
|
||||||
(or (unspecified? val)
|
(or (eq? val 'unset) (stem? val)))
|
||||||
(stem? val)))
|
|
||||||
#,@(if serialize?
|
#,@(if serialize?
|
||||||
(list #'(define (serialize-maybe-stem field-name val)
|
(list #'(define (serialize-maybe-stem field-name val)
|
||||||
(if (stem? val)
|
(if (stem? val)
|
||||||
|
@ -171,10 +170,10 @@ does not have a default value" field kind)))
|
||||||
(values #'(field-type def)))
|
(values #'(field-type def)))
|
||||||
((field-type)
|
((field-type)
|
||||||
(identifier? #'field-type)
|
(identifier? #'field-type)
|
||||||
(values #'(field-type *unspecified*)))
|
(values #'(field-type 'unset)))
|
||||||
(field-type
|
(field-type
|
||||||
(identifier? #'field-type)
|
(identifier? #'field-type)
|
||||||
(values #'(field-type *unspecified*)))))
|
(values #'(field-type 'unset)))))
|
||||||
|
|
||||||
(define (define-configuration-helper serialize? serializer-prefix syn)
|
(define (define-configuration-helper serialize? serializer-prefix syn)
|
||||||
(syntax-case syn ()
|
(syntax-case syn ()
|
||||||
|
@ -262,7 +261,7 @@ does not have a default value" field kind)))
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(display '#,(id #'stem #'% #'stem))
|
(display '#,(id #'stem #'% #'stem))
|
||||||
(if (eq? (syntax->datum field-default)
|
(if (eq? (syntax->datum field-default)
|
||||||
'*unspecified*)
|
'unset)
|
||||||
(configuration-missing-default-value
|
(configuration-missing-default-value
|
||||||
'#,(id #'stem #'% #'stem) 'field)
|
'#,(id #'stem #'% #'stem) 'field)
|
||||||
field-default)))
|
field-default)))
|
||||||
|
|
|
@ -115,7 +115,7 @@ type generated and used by Transmission clients, suitable for passing to the
|
||||||
(set! serialize-maybe-string
|
(set! serialize-maybe-string
|
||||||
(lambda (field-name val)
|
(lambda (field-name val)
|
||||||
(serialize-string field-name
|
(serialize-string field-name
|
||||||
(if (unspecified? val)
|
(if (eq? val 'unset)
|
||||||
""
|
""
|
||||||
val))))
|
val))))
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@ type generated and used by Transmission clients, suitable for passing to the
|
||||||
(define-maybe file-object)
|
(define-maybe file-object)
|
||||||
(set! serialize-maybe-file-object
|
(set! serialize-maybe-file-object
|
||||||
(lambda (field-name val)
|
(lambda (field-name val)
|
||||||
(if (unspecified? val)
|
(if (eq? val 'unset)
|
||||||
(serialize-string field-name "")
|
(serialize-string field-name "")
|
||||||
(serialize-file-object field-name val))))
|
(serialize-file-object field-name val))))
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
((new-def ...)
|
((new-def ...)
|
||||||
(map (lambda (def target)
|
(map (lambda (def target)
|
||||||
(if (eq? 'common (syntax->datum target))
|
(if (eq? 'common (syntax->datum target))
|
||||||
#'*unspecified* def))
|
#''unset def))
|
||||||
#'(def ...) #'(target ...)))
|
#'(def ...) #'(target ...)))
|
||||||
((new-doc ...)
|
((new-doc ...)
|
||||||
(map (lambda (doc target)
|
(map (lambda (doc target)
|
||||||
|
@ -200,7 +200,7 @@
|
||||||
(define-maybe file-object-list)
|
(define-maybe file-object-list)
|
||||||
|
|
||||||
(define (raw-content? val)
|
(define (raw-content? val)
|
||||||
(not (unspecified? val)))
|
(not (eq? val 'unset)))
|
||||||
(define (serialize-raw-content field-name val)
|
(define (serialize-raw-content field-name val)
|
||||||
val)
|
val)
|
||||||
(define-maybe raw-content)
|
(define-maybe raw-content)
|
||||||
|
@ -474,12 +474,12 @@ by the Prosody service. See @url{https://prosody.im/doc/logging}."
|
||||||
global)
|
global)
|
||||||
|
|
||||||
(http-max-content-size
|
(http-max-content-size
|
||||||
(maybe-non-negative-integer *unspecified*)
|
(maybe-non-negative-integer 'unset)
|
||||||
"Maximum allowed size of the HTTP body (in bytes)."
|
"Maximum allowed size of the HTTP body (in bytes)."
|
||||||
common)
|
common)
|
||||||
|
|
||||||
(http-external-url
|
(http-external-url
|
||||||
(maybe-string *unspecified*)
|
(maybe-string 'unset)
|
||||||
"Some modules expose their own URL in various ways. This URL is built
|
"Some modules expose their own URL in various ways. This URL is built
|
||||||
from the protocol, host and port used. If Prosody sits behind a proxy, the
|
from the protocol, host and port used. If Prosody sits behind a proxy, the
|
||||||
public URL will be @code{http-external-url} instead. See
|
public URL will be @code{http-external-url} instead. See
|
||||||
|
@ -556,7 +556,7 @@ support. To add an external component, you simply fill the hostname field. See
|
||||||
int-component)
|
int-component)
|
||||||
|
|
||||||
(mod-muc
|
(mod-muc
|
||||||
(maybe-mod-muc-configuration *unspecified*)
|
(maybe-mod-muc-configuration 'unset)
|
||||||
"Multi-user chat (MUC) is Prosody's module for allowing you to create
|
"Multi-user chat (MUC) is Prosody's module for allowing you to create
|
||||||
hosted chatrooms/conferences for XMPP users.
|
hosted chatrooms/conferences for XMPP users.
|
||||||
|
|
||||||
|
@ -573,7 +573,7 @@ See also @url{https://prosody.im/doc/modules/mod_muc}."
|
||||||
ext-component)
|
ext-component)
|
||||||
|
|
||||||
(raw-content
|
(raw-content
|
||||||
(maybe-raw-content *unspecified*)
|
(maybe-raw-content 'unset)
|
||||||
"Raw content that will be added to the configuration file."
|
"Raw content that will be added to the configuration file."
|
||||||
common)))
|
common)))
|
||||||
|
|
||||||
|
|
|
@ -772,11 +772,11 @@ logging is disabled.")
|
||||||
network. A specific port value can be provided by appending the @code{:PORT}
|
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
|
suffix. By default, it uses the Jami bootstrap nodes, but any host can be
|
||||||
specified here. It's also possible to disable bootstrapping by explicitly
|
specified here. It's also possible to disable bootstrapping by explicitly
|
||||||
setting this field to the @code{*unspecified*} value.")
|
setting this field to the @code{'unset} value.")
|
||||||
(port
|
(port
|
||||||
(maybe-number 4222)
|
(maybe-number 4222)
|
||||||
"The UDP port to bind to. When set to @code{*unspecified*}, an available
|
"The UDP port to bind to. When left unspecified, an available port is
|
||||||
port is automatically selected.")
|
automatically selected.")
|
||||||
(proxy-server-port
|
(proxy-server-port
|
||||||
maybe-number
|
maybe-number
|
||||||
"Spawn a proxy server listening on the specified port.")
|
"Spawn a proxy server listening on the specified port.")
|
||||||
|
|
|
@ -307,7 +307,7 @@ CONFIG, a <jami-configuration> object."
|
||||||
(dbus (jami-configuration-dbus config))
|
(dbus (jami-configuration-dbus config))
|
||||||
(dbus-daemon (file-append dbus "/bin/dbus-daemon"))
|
(dbus-daemon (file-append dbus "/bin/dbus-daemon"))
|
||||||
(accounts (jami-configuration-accounts config))
|
(accounts (jami-configuration-accounts config))
|
||||||
(declarative-mode? (not (unspecified? accounts))))
|
(declarative-mode? (not (eq? 'unset accounts))))
|
||||||
|
|
||||||
(with-extensions (list guile-packrat ;used by guile-ac-d-bus
|
(with-extensions (list guile-packrat ;used by guile-ac-d-bus
|
||||||
guile-ac-d-bus
|
guile-ac-d-bus
|
||||||
|
@ -649,7 +649,7 @@ argument, either a registered username or the fingerprint of the account.")
|
||||||
account-details)
|
account-details)
|
||||||
(let ((username (archive-name->username
|
(let ((username (archive-name->username
|
||||||
archive)))
|
archive)))
|
||||||
(when (not (unspecified? allowed-contacts))
|
(when (not (eq? 'unset allowed-contacts))
|
||||||
;; Reject calls from unknown contacts.
|
;; Reject calls from unknown contacts.
|
||||||
(set-account-details
|
(set-account-details
|
||||||
'(("DHT.PublicInCalls" . "false")) username)
|
'(("DHT.PublicInCalls" . "false")) username)
|
||||||
|
@ -659,7 +659,7 @@ argument, either a registered username or the fingerprint of the account.")
|
||||||
;; Add allowed ones.
|
;; Add allowed ones.
|
||||||
(for-each (cut add-contact <> username)
|
(for-each (cut add-contact <> username)
|
||||||
allowed-contacts))
|
allowed-contacts))
|
||||||
(when (not (unspecified? moderators))
|
(when (not (eq? 'unset moderators))
|
||||||
;; Disable the 'AllModerators' property.
|
;; Disable the 'AllModerators' property.
|
||||||
(set-all-moderators #f username)
|
(set-all-moderators #f username)
|
||||||
;; Remove all moderators.
|
;; Remove all moderators.
|
||||||
|
|
|
@ -151,7 +151,7 @@
|
||||||
(not (defined? 'serialize-maybe-string)))
|
(not (defined? 'serialize-maybe-string)))
|
||||||
|
|
||||||
(test-assert "maybe type, no default"
|
(test-assert "maybe type, no default"
|
||||||
(unspecified?
|
(eq? 'unset
|
||||||
(config-with-maybe-string/no-serialization-name
|
(config-with-maybe-string/no-serialization-name
|
||||||
(config-with-maybe-string/no-serialization))))
|
(config-with-maybe-string/no-serialization))))
|
||||||
|
|
||||||
|
|
Reference in a new issue