2018-01-10 12:01:49 +01:00
|
|
|
|
2018-01-17 09:50:21 +01:00
|
|
|
##############################################
|
|
|
|
# #
|
|
|
|
# dnscrypt-proxy configuration #
|
|
|
|
# #
|
|
|
|
##############################################
|
2018-01-10 13:33:06 +01:00
|
|
|
|
|
|
|
|
2018-01-17 09:50:21 +01:00
|
|
|
|
|
|
|
##################################
|
|
|
|
# Global settings #
|
|
|
|
##################################
|
2018-01-10 13:33:06 +01:00
|
|
|
|
|
|
|
## List of servers to use
|
2018-01-31 12:17:14 +01:00
|
|
|
## If this line is commented, all registered servers matching the require_* filters
|
|
|
|
## will be used
|
2018-01-31 15:08:58 +01:00
|
|
|
## The proxy will automatically pick the fastest, working servers from the list.
|
2018-01-10 13:33:06 +01:00
|
|
|
|
2018-01-30 17:40:38 +01:00
|
|
|
# server_names = ['scaleway-fr', 'google', 'yandex']
|
2018-01-10 13:33:06 +01:00
|
|
|
|
2018-01-30 15:58:13 +01:00
|
|
|
|
2018-01-10 13:33:06 +01:00
|
|
|
## List of local addresses and ports to listen to. Can be IPv4 and/or IPv6.
|
2018-01-24 14:44:32 +01:00
|
|
|
## To only use systemd activation sockets, use an empty set: []
|
2018-01-24 15:23:03 +01:00
|
|
|
|
2018-01-18 20:41:33 +01:00
|
|
|
listen_addresses = ['127.0.0.1:53', '[::1]:53']
|
2018-01-10 12:01:49 +01:00
|
|
|
|
2018-01-10 13:33:06 +01:00
|
|
|
|
2018-01-24 16:51:26 +01:00
|
|
|
## Maximum number of simultaneous client connections to accept
|
|
|
|
|
2018-01-30 15:58:13 +01:00
|
|
|
max_clients = 250
|
2018-01-24 16:51:26 +01:00
|
|
|
|
|
|
|
|
2018-01-31 12:17:14 +01:00
|
|
|
## Require servers (from static + remote sources) to satisfy specific properties
|
2018-01-19 16:38:43 +01:00
|
|
|
|
|
|
|
# Use servers reachable over IPv4
|
|
|
|
ipv4_servers = true
|
|
|
|
|
|
|
|
# Use servers reachable over IPv6 -- Do not enable if you don't have IPv6 connectivity
|
|
|
|
ipv6_servers = false
|
|
|
|
|
|
|
|
|
2018-01-18 13:01:16 +01:00
|
|
|
## Require servers defined by remote sources to satisfy specific properties
|
|
|
|
|
2018-01-31 15:08:58 +01:00
|
|
|
# Server must support DNS security extensions (DNSSEC)
|
2018-01-18 13:01:16 +01:00
|
|
|
require_dnssec = false
|
|
|
|
|
2018-01-31 12:17:14 +01:00
|
|
|
# Server must not log user queries (declarative)
|
2018-01-18 13:04:50 +01:00
|
|
|
require_nolog = true
|
|
|
|
|
|
|
|
# Server must not enforce its own blacklist (for parental control, ads blocking...)
|
|
|
|
require_nofilter = true
|
2018-01-18 13:01:16 +01:00
|
|
|
|
|
|
|
|
2018-01-10 13:33:06 +01:00
|
|
|
## Always use TCP to connect to upstream servers
|
|
|
|
|
2018-01-10 12:01:49 +01:00
|
|
|
force_tcp = false
|
|
|
|
|
2018-01-10 13:33:06 +01:00
|
|
|
|
2018-01-23 15:51:57 +01:00
|
|
|
## How long a DNS query will wait for a response, in milliseconds
|
2018-01-10 13:33:06 +01:00
|
|
|
|
2018-01-10 12:01:49 +01:00
|
|
|
timeout = 2500
|
|
|
|
|
2018-01-10 13:33:06 +01:00
|
|
|
|
2018-01-30 15:46:21 +01:00
|
|
|
## Log level (0-6, default: 2 - 0 is very verbose, 6 only contains fatal errors)
|
2018-01-19 20:06:04 +01:00
|
|
|
|
|
|
|
# log_level = 2
|
|
|
|
|
|
|
|
|
2018-01-30 15:46:21 +01:00
|
|
|
## log file for the application
|
2018-01-19 20:06:04 +01:00
|
|
|
|
2018-01-20 13:20:30 +01:00
|
|
|
# log_file = 'dnscrypt-proxy.log'
|
2018-01-19 20:06:04 +01:00
|
|
|
|
|
|
|
|
2018-01-30 15:46:21 +01:00
|
|
|
## Use the system logger (syslog on Unix, Event Log on Windows)
|
2018-01-19 20:06:04 +01:00
|
|
|
|
|
|
|
# use_syslog = true
|
|
|
|
|
|
|
|
|
2018-01-10 13:33:06 +01:00
|
|
|
## Delay, in minutes, after which certificates are reloaded
|
|
|
|
|
2018-01-31 00:21:25 +01:00
|
|
|
cert_refresh_delay = 240
|
2018-01-10 12:01:49 +01:00
|
|
|
|
2018-01-10 13:33:06 +01:00
|
|
|
|
2018-01-30 15:46:21 +01:00
|
|
|
## Fallback resolver
|
2018-01-30 15:58:13 +01:00
|
|
|
## This is a normal, non-encrypted DNS resolver, that will be only used
|
2018-01-30 15:46:21 +01:00
|
|
|
## for one-shot queries when retrieving the initial resolvers list, and
|
|
|
|
## only if the system DNS configuration doesn't work.
|
|
|
|
## No user application queries will ever be leaked through this resolver,
|
|
|
|
## and it will not be used after IP addresses of resolvers URLs have been found.
|
2018-01-30 15:58:13 +01:00
|
|
|
## It will never be used if lists have already been cached, and if stamps
|
|
|
|
## don't include host names without IP addresses.
|
|
|
|
## It will not be used if the configured system DNS works.
|
2018-01-30 15:46:21 +01:00
|
|
|
## A resolver supporting DNSSEC is recommended. This may become mandatory.
|
|
|
|
|
2018-02-01 08:51:29 +01:00
|
|
|
fallback_resolver = '9.9.9.9:53'
|
2018-01-30 15:46:21 +01:00
|
|
|
|
2018-01-17 09:50:21 +01:00
|
|
|
|
2018-01-30 17:37:35 +01:00
|
|
|
## Never try to use the system DNS settings; unconditionally use the
|
|
|
|
## fallback resolver.
|
|
|
|
|
|
|
|
ignore_system_dns = false
|
|
|
|
|
2018-01-30 15:58:13 +01:00
|
|
|
|
2018-01-30 17:43:15 +01:00
|
|
|
|
2018-01-17 09:50:21 +01:00
|
|
|
#########################
|
|
|
|
# Filters #
|
|
|
|
#########################
|
2018-01-10 17:23:20 +01:00
|
|
|
|
|
|
|
## Immediately respond to IPv6-related queries with an empty response
|
2018-01-21 00:54:20 +01:00
|
|
|
## This makes things faster when there is no IPv6 connectivity, but can
|
|
|
|
## also cause reliability issues with some stub resolvers. In
|
|
|
|
## particular, enabling this on macOS is not recommended.
|
2018-01-10 17:23:20 +01:00
|
|
|
|
|
|
|
block_ipv6 = false
|
|
|
|
|
2018-01-10 13:33:06 +01:00
|
|
|
|
2018-01-17 09:50:21 +01:00
|
|
|
|
|
|
|
##################################################################################
|
|
|
|
# Route queries for specific domains to a dedicated set of servers #
|
|
|
|
##################################################################################
|
|
|
|
|
2018-01-17 12:34:05 +01:00
|
|
|
## Example map entries (one entry per line):
|
2018-01-17 16:06:30 +01:00
|
|
|
## example.com 9.9.9.9
|
|
|
|
## example.net 9.9.9.9,8.8.8.8
|
2018-01-16 00:23:16 +01:00
|
|
|
|
2018-01-18 20:41:33 +01:00
|
|
|
# forwarding_rules = 'forwarding-rules.txt'
|
2018-01-17 02:40:47 +01:00
|
|
|
|
|
|
|
|
2018-01-17 09:50:21 +01:00
|
|
|
|
|
|
|
###########################
|
|
|
|
# DNS cache #
|
|
|
|
###########################
|
2018-01-10 18:32:05 +01:00
|
|
|
|
2018-01-23 15:51:57 +01:00
|
|
|
## Enable a DNS cache to reduce latency and outgoing traffic
|
2018-01-10 18:32:05 +01:00
|
|
|
|
|
|
|
cache = true
|
|
|
|
|
|
|
|
|
2018-01-10 19:32:56 +01:00
|
|
|
## Cache size
|
|
|
|
|
|
|
|
cache_size = 256
|
|
|
|
|
|
|
|
|
|
|
|
## Minimum TTL for cached entries
|
|
|
|
|
2018-01-13 23:52:44 +01:00
|
|
|
cache_min_ttl = 600
|
2018-01-10 19:32:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
## Maxmimum TTL for cached entries
|
|
|
|
|
|
|
|
cache_max_ttl = 86400
|
|
|
|
|
|
|
|
|
|
|
|
## TTL for negatively cached entries
|
|
|
|
|
|
|
|
cache_neg_ttl = 60
|
|
|
|
|
|
|
|
|
2018-01-30 15:58:13 +01:00
|
|
|
|
2018-01-17 09:50:21 +01:00
|
|
|
###############################
|
|
|
|
# Query logging #
|
|
|
|
###############################
|
|
|
|
|
|
|
|
## Log client queries to a file
|
2018-01-17 09:44:03 +01:00
|
|
|
|
|
|
|
[query_log]
|
2018-01-17 09:50:21 +01:00
|
|
|
|
2018-02-01 09:00:28 +01:00
|
|
|
## Path to the query log file (absolute, or relative to the same directory as the executable file)
|
2018-01-17 09:50:21 +01:00
|
|
|
|
2018-02-01 09:00:28 +01:00
|
|
|
# file = 'query.log'
|
2018-01-17 09:44:03 +01:00
|
|
|
|
2018-01-17 09:50:21 +01:00
|
|
|
|
2018-02-01 09:00:28 +01:00
|
|
|
## Query log format (currently supported: tsv and ltsv)
|
2018-01-17 09:50:21 +01:00
|
|
|
|
2018-02-01 09:00:28 +01:00
|
|
|
format = 'tsv'
|
2018-01-17 09:44:03 +01:00
|
|
|
|
|
|
|
|
2018-02-01 09:00:28 +01:00
|
|
|
## Do not log these query types, to reduce verbosity. Keep empty to log everything.
|
2018-01-19 12:57:47 +01:00
|
|
|
|
2018-02-01 09:00:28 +01:00
|
|
|
# ignored_qtypes = ['DNSKEY', 'NS']
|
2018-01-19 12:57:47 +01:00
|
|
|
|
2018-01-17 09:50:21 +01:00
|
|
|
|
2018-01-31 12:17:14 +01:00
|
|
|
|
2018-01-20 16:59:40 +01:00
|
|
|
############################################
|
|
|
|
# Suspicious queries logging #
|
|
|
|
############################################
|
|
|
|
|
|
|
|
## Log queries for nonexistent zones
|
2018-01-31 12:17:14 +01:00
|
|
|
## These queries can reveal the presence of malware, broken/obsolete applications,
|
|
|
|
## and devices signaling their presence to 3rd parties.
|
2018-01-20 16:59:40 +01:00
|
|
|
|
|
|
|
[nx_log]
|
|
|
|
|
2018-02-01 09:00:28 +01:00
|
|
|
## Path to the query log file (absolute, or relative to the same directory as the executable file)
|
2018-01-20 16:59:40 +01:00
|
|
|
|
2018-02-01 09:00:28 +01:00
|
|
|
# file = 'nx.log'
|
2018-01-20 16:59:40 +01:00
|
|
|
|
|
|
|
|
2018-02-01 09:00:28 +01:00
|
|
|
## Query log format (currently supported: tsv and ltsv)
|
2018-01-20 16:59:40 +01:00
|
|
|
|
2018-02-01 09:00:28 +01:00
|
|
|
format = 'tsv'
|
2018-01-20 16:59:40 +01:00
|
|
|
|
|
|
|
|
2018-01-30 15:58:13 +01:00
|
|
|
|
2018-01-17 09:50:21 +01:00
|
|
|
######################################################
|
|
|
|
# Pattern-based blocking (blacklists) #
|
|
|
|
######################################################
|
|
|
|
|
|
|
|
## Blacklists are made of one pattern per line. Example of valid patterns:
|
2018-01-17 16:06:30 +01:00
|
|
|
##
|
2018-01-17 09:50:21 +01:00
|
|
|
## example.com
|
|
|
|
## *sex*
|
|
|
|
## ads.*
|
|
|
|
## ads*.example.*
|
|
|
|
## ads*.example[0-9]*.com
|
2018-01-31 12:17:14 +01:00
|
|
|
##
|
|
|
|
## Example blacklist files can be found at https://download.dnscrypt.info/blacklists/
|
|
|
|
## A script to build blacklists from public feeds can be found in the
|
|
|
|
## `utils/generate-domains-blacklists` directory of the dnscrypt-proxy source code.
|
2018-01-17 09:44:03 +01:00
|
|
|
|
2018-01-17 17:03:42 +01:00
|
|
|
[blacklist]
|
2018-01-17 09:50:21 +01:00
|
|
|
|
2018-02-01 09:00:28 +01:00
|
|
|
## Path to the file of blocking rules (absolute, or relative to the same directory as the executable file)
|
2018-01-17 09:50:21 +01:00
|
|
|
|
2018-02-01 09:00:28 +01:00
|
|
|
# blacklist_file = 'blacklist.txt'
|
2018-01-17 17:03:42 +01:00
|
|
|
|
|
|
|
|
2018-02-01 09:00:28 +01:00
|
|
|
## Optional path to a file logging blocked queries
|
2018-01-17 17:03:42 +01:00
|
|
|
|
2018-02-01 09:00:28 +01:00
|
|
|
# log_file = 'blocked.log'
|
2018-01-17 17:03:42 +01:00
|
|
|
|
|
|
|
|
2018-02-01 09:00:28 +01:00
|
|
|
## Optional log format: tsv or ltsv (default: tsv)
|
2018-01-17 17:03:42 +01:00
|
|
|
|
2018-02-01 09:00:28 +01:00
|
|
|
# log_format = 'tsv'
|
2018-01-17 09:50:21 +01:00
|
|
|
|
2018-01-17 09:44:03 +01:00
|
|
|
|
|
|
|
|
2018-01-21 16:07:44 +01:00
|
|
|
###########################################################
|
|
|
|
# Pattern-based IP blocking (IP blacklists) #
|
|
|
|
###########################################################
|
|
|
|
|
|
|
|
## IP blacklists are made of one pattern per line. Example of valid patterns:
|
|
|
|
##
|
|
|
|
## 127.*
|
|
|
|
## fe80:abcd:*
|
|
|
|
## 192.168.1.4
|
|
|
|
|
|
|
|
[ip_blacklist]
|
|
|
|
|
2018-02-01 09:00:28 +01:00
|
|
|
## Path to the file of blocking rules (absolute, or relative to the same directory as the executable file)
|
2018-01-21 16:07:44 +01:00
|
|
|
|
2018-02-01 09:00:28 +01:00
|
|
|
# blacklist_file = 'ip-blacklist.txt'
|
2018-01-21 16:07:44 +01:00
|
|
|
|
|
|
|
|
2018-02-01 09:00:28 +01:00
|
|
|
## Optional path to a file logging blocked queries
|
2018-01-21 16:07:44 +01:00
|
|
|
|
2018-02-01 09:00:28 +01:00
|
|
|
# log_file = 'ip-blocked.log'
|
2018-01-21 16:07:44 +01:00
|
|
|
|
|
|
|
|
2018-02-01 09:00:28 +01:00
|
|
|
## Optional log format: tsv or ltsv (default: tsv)
|
2018-01-21 16:07:44 +01:00
|
|
|
|
2018-02-01 09:00:28 +01:00
|
|
|
# log_format = 'tsv'
|
2018-01-21 16:07:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
2018-01-17 09:50:21 +01:00
|
|
|
#########################
|
|
|
|
# Servers #
|
|
|
|
#########################
|
2018-01-10 13:33:06 +01:00
|
|
|
|
2018-01-14 00:24:05 +01:00
|
|
|
## Remote lists of available servers
|
2018-01-31 12:17:14 +01:00
|
|
|
## Multiple sources can be used simultaneously, but every source
|
|
|
|
## requires a dedicated cache file
|
|
|
|
##
|
2018-02-01 08:51:29 +01:00
|
|
|
## A prefix can be prepended to server names in order to
|
2018-01-31 12:17:14 +01:00
|
|
|
## avoid collisions if different sources share the same for
|
|
|
|
## different servers. In that case, names listed in `server_names`
|
|
|
|
## must include the prefixes.
|
2018-01-31 15:08:58 +01:00
|
|
|
##
|
|
|
|
## A cache file can be specified without a URL in order to maintain lists
|
|
|
|
## locally.
|
|
|
|
##
|
|
|
|
## The default format is "v2".
|
|
|
|
## format='v1' loads CSV files from dnscrypt-proxy 1.x instead.
|
2018-01-14 00:24:05 +01:00
|
|
|
|
2018-01-13 23:52:44 +01:00
|
|
|
[sources]
|
2018-01-31 00:37:56 +01:00
|
|
|
|
2018-02-01 09:00:28 +01:00
|
|
|
## An example of a remote source
|
2018-01-31 12:17:14 +01:00
|
|
|
|
2018-01-25 15:17:46 +01:00
|
|
|
[sources.'public-resolvers']
|
|
|
|
url = 'http://download.dnscrypt.info/resolvers-list/v2/public-resolvers.md'
|
|
|
|
cache_file = 'public-resolvers.md'
|
|
|
|
format = 'v2'
|
2018-01-27 19:46:50 +01:00
|
|
|
minisign_key = 'RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3'
|
2018-01-18 23:54:37 +01:00
|
|
|
refresh_delay = 168
|
2018-01-20 16:59:40 +01:00
|
|
|
prefix = ''
|
2018-01-13 23:52:44 +01:00
|
|
|
|
2018-02-01 09:00:28 +01:00
|
|
|
## Another example source, with resolvers censoring some websites not approriate for children
|
|
|
|
## This is a subset of the `public-resolvers` list, so enabling both is useless
|
2018-01-31 12:17:14 +01:00
|
|
|
|
2018-02-01 09:00:28 +01:00
|
|
|
# [sources.'parental-control']
|
|
|
|
# url = 'http://download.dnscrypt.info/resolvers-list/v2/parental-control.md'
|
|
|
|
# cache_file = 'parental-control.md'
|
|
|
|
# minisign_key = 'RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3'
|
2018-01-14 00:24:05 +01:00
|
|
|
|
2018-01-31 20:07:52 +01:00
|
|
|
|
|
|
|
|
2018-01-23 15:51:57 +01:00
|
|
|
## Optional, local, static list of additional servers
|
2018-01-25 17:41:36 +01:00
|
|
|
## Mostly useful for testing your own servers.
|
2018-01-10 13:33:06 +01:00
|
|
|
|
2018-01-31 00:37:56 +01:00
|
|
|
[static]
|
|
|
|
|
2018-02-01 09:00:28 +01:00
|
|
|
# [static.'google']
|
|
|
|
# stamp = 'sdns://AgEAAAAAAAAAACDyXGrcc5eNecJ8nomJCJ-q6eCLTEn6bHic0hWGUwYQaA5kbnMuZ29vZ2xlLmNvbQ0vZXhwZXJpbWVudGFs'
|
2018-01-31 22:18:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
2018-01-31 23:08:38 +01:00
|
|
|
## Time access restrictions (WIP)
|
|
|
|
|
2018-02-01 09:18:56 +01:00
|
|
|
[schedules]
|
2018-01-31 22:18:11 +01:00
|
|
|
|
2018-02-01 09:18:56 +01:00
|
|
|
[schedules.'time-to-sleep']
|
2018-02-01 08:51:29 +01:00
|
|
|
mon = [{after='21:00', before='07:00'}]
|
|
|
|
tue = [{after='21:00', before='07:00'}]
|
|
|
|
wed = [{after='21:00', before='07:00'}]
|
|
|
|
thu = [{after='21:00', before='07:00'}]
|
|
|
|
fri = [{after='23:00', before='07:00'}]
|
|
|
|
sat = [{after='23:00', before='07:00'}]
|
2018-02-01 09:18:56 +01:00
|
|
|
sun = [{after='21:00', before='07:00'}]
|