mod_disco
Clients can discover services and features available on the server if mod_disco is enabled. Some clients will automatically take advantage of the available items while others will need manual configuration.
Details
mod_disco implements XEP-0030. Some modules automatically add their service details such as mod_register and mod_proxy65. Additional disco items can be added using the disco_items configuration option.
Items
Clients use service discovery listing to automatically detect extra services associated with their domain, such as chatroom hosts and file transfer services. The results in this list are known as “items”.
By default Prosody will include all direct subdomains when responding
to a service discovery items request. For example, a query for the items
belonging to a host called example.com
would include a
component called rooms.example.com
or
proxy.example.com
, but wouldn’t include
rooms.example.net
(because it isn’t a subdomain of
example.com) or proxy.eu.example.com
(because it isn’t a
direct subdomain of example.com).
To include items that don’t match this pattern, you can use the
disco_items
option to specify additional items - you must
specify the address of the item and optionally a name (which some
clients may display). There is no requirement for the included items to
be on the same server.
Account Query Access
Normally, only contacts of an account can discover features of that account. For service administrators it might make sense to allow their status as admins to be discoverable by others, e.g. when reporting abuse or problems, especially on public services.
Usage
= {
modules_enabled -- Other modules
"disco"; -- Enable mod_disco
}
Configuration
Option | Default | Notes |
---|---|---|
disco_items | { } |
The extra items to add to service
discovery, specified as { "address", "name" } pairs |
disco_hidden | false |
Whether the host/component should be hidden from its parent’s discovery list by default |
disco_expose_admins | false |
Whether admin accounts can be identified as such by non-contacts |
Example
= {
modules_enabled -- Other modules
"disco"; -- Enable mod_disco
}
-- An example adding two additional services to the example.com host
"example.com"
VirtualHost = {
disco_items { "channels.example.net", "Public channels" };
{ "irc.jabberfr.org", "A public IRC gateway using biboumi" };
}
"secret.example.com"
Component -- Prevent a service discovery on example.com from showing this component:
= true disco_hidden