diff options
| author | Shulhan <ms@kilabit.info> | 2022-05-22 15:57:52 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2022-05-22 16:14:35 +0700 |
| commit | a676f04d2f8c1981fc953cc2e87adf059e23089a (patch) | |
| tree | d86300df47d53abdf7ccb0342f96ddd3a677fbd4 /_www/doc/rescached.cfg.adoc | |
| parent | bb08b5bb6ad6cf3e1c409db7d69ace4364e7bc8d (diff) | |
| download | rescached-a676f04d2f8c1981fc953cc2e87adf059e23089a.tar.xz | |
all: move the documentation under _www/doc directory
This also allow the latest/released documentation viewed on
the web user interface under /doc path.
While at it, reformat HTML and CSS files using js-beautify and
JavaScript files using clang-format [1].
[1] https://google.github.io/styleguide/jsguide.html#formatting
Diffstat (limited to '_www/doc/rescached.cfg.adoc')
| -rw-r--r-- | _www/doc/rescached.cfg.adoc | 263 |
1 files changed, 263 insertions, 0 deletions
diff --git a/_www/doc/rescached.cfg.adoc b/_www/doc/rescached.cfg.adoc new file mode 100644 index 0000000..2e19cac --- /dev/null +++ b/_www/doc/rescached.cfg.adoc @@ -0,0 +1,263 @@ +// SPDX-FileCopyrightText: 2020 M. Shulhan <ms@kilabit.info> +// SPDX-License-Identifier: GPL-3.0-or-later += RESCACHED.CONF(5) +:doctype: manpage +:man source: rescached.cfg +:man version: 2020.05.10 +:man manual: rescached.cfg + + +== NAME + +rescached.cfg - Configuration for rescached service + + +== SYNOPSIS + +/etc/rescached/rescached.cfg + + +== DESCRIPTION + +These file configure the behaviour of *rescached*(1) service. +This section will explain more about each option and how they effect +`rescached`. + +The configuration is using INI format where each options is grouped by header +in square bracket: + +* `[rescached]` +* `[dns "server"]` + + +== OPTIONS + +=== [rescached] + +This group of options contain the main configuration that related to +rescached. + +[#wui-listen] +==== wui.listen + +Format:: [host]:port +Default:: 127.0.0.1:5380 +Description:: The address to listen for web user interface. + +[#file-resolvconf] +==== file.resolvconf + +Format:: /any/path/to/file +Default:: /etc/rescached/resolv.conf +Description:: A path to dynamically generated *resolv.conf*(5) by +*resolvconf*(8). ++ +-- +If set, the nameserver values in referenced file will be used as "parent" name +server if no "parent" is defined in configuration file. + +To use this config, you must set either "dnsmasq_resolv", "pdnsd_resolv", or +"unbound_conf" in "/etc/resolvconf.conf" to point to +"/etc/rescached/resolv.conf". + +For example, +---- +resolv_conf=/etc/resolv.conf +name_servers=127.0.0.1 +dnsmasq_resolv=/etc/rescached/resolv.conf +#pdnsd_resolv=/etc/rescached/resolv.conf +#unbound_conf=/etc/rescached/resolv.conf +---- +-- + +[#debug] +==== debug + +Value:: +0::: log startup and errors. +1::: log startup, errors, request, response, caches, and exit status. +Format:: Number (0 or 1). +Default:: 0 +Description:: This option only used for debugging program or if user want to +monitor what kind of traffic goes in and out of rescached. + +[#dns_server] +=== [dns "server"] + +This group of options related to DNS server. + +[#parent] +==== parent + +Format:: + +---- +parent = "parent = " [ scheme "://"] ( ip-address / domain-name ) [ ":" port ] +scheme = ( "udp" / "https") +---- + +Default:: +* Address: udp://1.1.1.1 +* Port: 53 +Description:: List of parent DNS servers. ++ +When `rescached` receive a query from client (for example, your browser) and +when it does not have a cached answer for that query, it will forward the +query to one of the parent name servers. ++ +Using UDP as parent scheme, will automatically assume that the server also +capable of handling query in TCP. +This is required when client (for example, your browser) re-send the query +after receiving truncated UDP answer. +Any query received by `rescached` through TCP will forwarded to the parent +name server as TCP too, using the same address and port defined in one of UDP +parent. ++ +Please, do not use OpenDNS server. +If certain host-name not found (i.e. typo in host-name), OpenDNS will reply +with its own address, instead of replying with empty answer. +This will make `rescached` caching a false data and it may make your +application open or consume unintended resources. ++ +To check if your parent server reply the unknown host-name with no answer, use +*resolver*(1) tool. + +Example:: +---- +## Using UDP connection to forward request to parent name server. +parent = udp://1.1.1.1 + +## Using DNS over TLS to forward request to parent name server. +parent = https://1.1.1.1 + +## Using DNS over HTTPS to forward request to parent name server. +parent = https://kilabit.info/dns-query +---- + +[#listen] +==== listen + +Format:: <IP-ADDRESS>:<PORT> +Default:: 127.0.0.1:53 +Description:: Address in local network where `rescached` will listening for +query from client. ++ +If you want rescached to serve a query from another host in your local +network, change this value to `0.0.0.0:53`. + +[#http-port] +==== http.port + +Format:: Number +Default:: 443 +Description:: Port to serve DNS over HTTP. + +[#tls-port] +==== tls.port + +Format:: Number +Default:: 853 +Description:: Port to serve DNS over TLS. + +[#tls-certificate] +==== tls.certificate + +Format:: /path/to/file +Default:: (empty) +Description:: Path to certificate file to serve DNS over TLS and HTTPS. + + +[#tls-private_key] +==== tls.private_key + +Format:: /path/to/file +Default:: (empty) +Description:: Path to certificate private key file to serve DNS over TLS and +HTTPS. + +[#tls-allow_insecure] +==== tls.allow_insecure + +Format:: true | false +Default:: false +Description:: If its true, allow serving DoH and DoT with self-signed +certificate. + +[#doh-behind_proxy] +==== doh.behind_proxy + +Format:: true | false +Default:: false +Description:: If its true, serve DNS over HTTP only, even if +certificate files is defined. +This allow serving DNS request forwarded by another proxy server. + +[#cache-prune_delay] +==== cache.prune_delay + +Format:: Duration with time unit. Valid time units are "s", "m", "h". +Default:: 1h +Description:: Delay for pruning caches. ++ +Every N seconds/minutes/hours, rescached will traverse all +caches and remove response that has not been accessed less than +`cache.prune_threshold`. +Its value must be equal or greater than 1 hour (3600 seconds). + +[#cache-prune_threshold] +==== cache.prune_threshold + +Format:: Duration with time unit. Valid time units are "s", "m", "h". +Default:: -1h +Description:: The duration when the cache will be considered expired. +Its value must be negative and greater or equal than -1 hour (-3600 seconds). + +== FILES + +[#hosts-d] +=== /etc/rescached/hosts.d + +Path to hosts directory where rescached will load all hosts formatted files. + + +[#zone-d] +=== /etc/rescached/zone.d + +Path to zone directory where rescached will load all zone files. + + +== EXAMPLE + +Simple rescached configuration using dnscrypt-proxy that listen on port 54 as +parent resolver, with prune delay set to 60 seconds and threshold also to 60 +seconds. + +---- +[dns "server"] +parent=udp://127.0.0.1:54 +cache.prune_delay=60s +cache.prune_threshold=60s +---- + +Save the above script into `rescached.cfg` and run it, + + $ sudo rescached -config rescached.cfg + + +== AUTHOR + +`rescached` is developed by M. Shulhan (m.shulhan@gmail.com). + + +== LICENSE + +Copyright 2018, M. Shulhan (m.shulhan@gmail.com). +All rights reserved. + +Use of this source code is governed by a GPL-3.0 license that can be +found in the COPYING file. + + +== SEE ALSO + +*rescached*(1) |
