Advertisement
Guest User

My dnscrypt-proxy.toml

a guest
Jun 19th, 2024
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.61 KB | None | 0 0
  1.  
  2. ##############################################
  3. # #
  4. # dnscrypt-proxy configuration #
  5. # #
  6. ##############################################
  7.  
  8. ## This is an example configuration file.
  9. ## You should adjust it to your needs, and save it as "dnscrypt-proxy.toml"
  10. ##
  11. ## Online documentation is available here: https://dnscrypt.info/doc
  12.  
  13.  
  14.  
  15. ##################################
  16. # Global settings #
  17. ##################################
  18.  
  19. ## List of servers to use
  20. ##
  21. ## Servers from the "public-resolvers" source (see down below) can
  22. ## be viewed here: https://dnscrypt.info/public-servers
  23. ##
  24. ## The proxy will automatically pick working servers from this list.
  25. ## Note that the require_* filters do NOT apply when using this setting.
  26. ##
  27. ## By default, this list is empty and all registered servers matching the
  28. ## require_* filters will be used instead.
  29. ##
  30. ## Remove the leading # first to enable this; lines starting with # are ignored.
  31.  
  32. # server_names = ['scaleway-fr', 'google', 'yandex', 'cloudflare']
  33. server_names = [ 'quad9-doh-ip4-port443-filter-pri', 'quad9-doh-ip6-port443-filter-pri', 'quad9-dnscrypt-ip4-filter-pri', 'adguard-dns-doh', 'adguard-dns-ipv6']
  34.  
  35. ## List of local addresses and ports to listen to. Can be IPv4 and/or IPv6.
  36. ## Example with both IPv4 and IPv6:
  37. ## listen_addresses = ['127.0.0.1:53', '[::1]:53']
  38. ##
  39. ## To listen to all IPv4 addresses, use `listen_addresses = ['0.0.0.0:53']`
  40. ## To listen to all IPv4+IPv6 addresses, use `listen_addresses = ['[::]:53']`
  41.  
  42. listen_addresses = ['127.0.0.1:53', '[::1]:53']
  43.  
  44.  
  45. ## Maximum number of simultaneous client connections to accept
  46.  
  47. max_clients = 250
  48.  
  49.  
  50. ## Switch to a different system user after listening sockets have been created.
  51. ## Note (1): this feature is currently unsupported on Windows.
  52. ## Note (2): this feature is not compatible with systemd socket activation.
  53. ## Note (3): when using -pidfile, the PID file directory must be writable by the new user
  54.  
  55. # user_name = 'nobody'
  56.  
  57.  
  58. ## Require servers (from remote sources) to satisfy specific properties
  59.  
  60. # Use servers reachable over IPv4
  61. ipv4_servers = true
  62.  
  63. # Use servers reachable over IPv6 -- Do not enable if you don't have IPv6 connectivity
  64. ipv6_servers = false
  65.  
  66. # Use servers implementing the DNSCrypt protocol
  67. dnscrypt_servers = true
  68.  
  69. # Use servers implementing the DNS-over-HTTPS protocol
  70. doh_servers = true
  71.  
  72. # Use servers implementing the Oblivious DoH protocol
  73. odoh_servers = false
  74.  
  75.  
  76. ## Require servers defined by remote sources to satisfy specific properties
  77.  
  78. # Server must support DNS security extensions (DNSSEC)
  79. require_dnssec = false
  80.  
  81. # Server must not log user queries (declarative)
  82. require_nolog = true
  83.  
  84. # Server must not enforce its own blocklist (for parental control, ads blocking...)
  85. require_nofilter = true
  86.  
  87. # Server names to avoid even if they match all criteria
  88. disabled_server_names = []
  89.  
  90.  
  91. ## Always use TCP to connect to upstream servers.
  92. ## This can be useful if you need to route everything through Tor.
  93. ## Otherwise, leave this to `false`, as it doesn't improve security
  94. ## (dnscrypt-proxy will always encrypt everything even using UDP), and can
  95. ## only increase latency.
  96.  
  97. force_tcp = false
  98.  
  99.  
  100. ## Enable *experimental* support for HTTP/3 (DoH3, HTTP over QUIC)
  101. ## Note that, like DNSCrypt but unlike other HTTP versions, this uses
  102. ## UDP and (usually) port 443 instead of TCP.
  103.  
  104. http3 = false
  105.  
  106.  
  107. ## SOCKS proxy
  108. ## Uncomment the following line to route all TCP connections to a local Tor node
  109. ## Tor doesn't support UDP, so set `force_tcp` to `true` as well.
  110.  
  111. # proxy = 'socks5://127.0.0.1:9050'
  112.  
  113.  
  114. ## HTTP/HTTPS proxy
  115. ## Only for DoH servers
  116.  
  117. # http_proxy = 'http://127.0.0.1:8888'
  118.  
  119.  
  120. ## How long a DNS query will wait for a response, in milliseconds.
  121. ## If you have a network with *a lot* of latency, you may need to
  122. ## increase this. Startup may be slower if you do so.
  123. ## Don't increase it too much. 10000 is the highest reasonable value.
  124.  
  125. timeout = 5000
  126.  
  127.  
  128. ## Keepalive for HTTP (HTTPS, HTTP/2, HTTP/3) queries, in seconds
  129.  
  130. keepalive = 30
  131.  
  132.  
  133. ## Add EDNS-client-subnet information to outgoing queries
  134. ##
  135. ## Multiple networks can be listed; they will be randomly chosen.
  136. ## These networks don't have to match your actual networks.
  137.  
  138. # edns_client_subnet = ['0.0.0.0/0', '2001:db8::/32']
  139.  
  140.  
  141. ## Response for blocked queries. Options are `refused`, `hinfo` (default) or
  142. ## an IP response. To give an IP response, use the format `a:<IPv4>,aaaa:<IPv6>`.
  143. ## Using the `hinfo` option means that some responses will be lies.
  144. ## Unfortunately, the `hinfo` option appears to be required for Android 8+
  145.  
  146. # blocked_query_response = 'refused'
  147.  
  148.  
  149. ## Load-balancing strategy: 'p2' (default), 'ph', 'p<n>', 'first' or 'random'
  150. ## Randomly choose 1 of the fastest 2, half, n, 1 or all live servers by latency.
  151. ## The response quality still depends on the server itself.
  152.  
  153. # lb_strategy = 'p2'
  154.  
  155. ## Set to `true` to constantly try to estimate the latency of all the resolvers
  156. ## and adjust the load-balancing parameters accordingly, or to `false` to disable.
  157. ## Default is `true` that makes 'p2' `lb_strategy` work well.
  158.  
  159. # lb_estimator = true
  160.  
  161.  
  162. ## Log level (0-6, default: 2 - 0 is very verbose, 6 only contains fatal errors)
  163.  
  164. log_level = 2
  165.  
  166.  
  167. ## Log file for the application, as an alternative to sending logs to
  168. ## the standard system logging service (syslog/Windows event log).
  169. ##
  170. ## This file is different from other log files, and will not be
  171. ## automatically rotated by the application.
  172.  
  173. log_file = '/var/log/dnscrypt-proxy/dnscrypt-proxy.log'
  174.  
  175.  
  176. ## When using a log file, only keep logs from the most recent launch.
  177.  
  178. # log_file_latest = true
  179.  
  180.  
  181. ## Use the system logger (syslog on Unix, Event Log on Windows)
  182.  
  183. use_syslog = true
  184.  
  185.  
  186. ## Delay, in minutes, after which certificates are reloaded
  187.  
  188. cert_refresh_delay = 240
  189.  
  190.  
  191. ## Initially don't check DNSCrypt server certificates for expiration, and
  192. ## only start checking them after a first successful connection to a resolver.
  193. ## This can be useful on routers with no battery-backed clock.
  194.  
  195. # cert_ignore_timestamp = false
  196.  
  197.  
  198. ## DNSCrypt: Create a new, unique key for every single DNS query
  199. ## This may improve privacy but can also have a significant impact on CPU usage
  200. ## Only enable if you don't have a lot of network load
  201.  
  202. # dnscrypt_ephemeral_keys = false
  203.  
  204.  
  205. ## DoH: Disable TLS session tickets - increases privacy but also latency
  206.  
  207. # tls_disable_session_tickets = false
  208.  
  209.  
  210. ## DoH: Use TLS 1.2 and specific cipher suite instead of the server preference
  211. ## 49199 = TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
  212. ## 49195 = TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
  213. ## 52392 = TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
  214. ## 52393 = TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
  215. ##
  216. ## On non-Intel CPUs such as MIPS routers and ARM systems (Android, Raspberry Pi...),
  217. ## the following suite improves performance.
  218. ## This may also help on Intel CPUs running 32-bit operating systems.
  219. ##
  220. ## Keep tls_cipher_suite empty if you have issues fetching sources or
  221. ## connecting to some DoH servers.
  222.  
  223. # tls_cipher_suite = [52392, 49199]
  224.  
  225.  
  226. ## Log TLS key material to a file, for debugging purposes only.
  227. ## This file will contain the TLS master key, which can be used to decrypt
  228. ## all TLS traffic to/from DoH servers.
  229. ## Never ever enable except for debugging purposes with a tool such as mitmproxy.
  230.  
  231. # tls_key_log_file = '/var/log/dnscrypt-proxy/keylog.txt'
  232.  
  233.  
  234. ## Bootstrap resolvers
  235. ##
  236. ## These are normal, non-encrypted DNS resolvers, that will be only used
  237. ## for one-shot queries when retrieving the initial resolvers list and if
  238. ## the system DNS configuration doesn't work.
  239. ##
  240. ## No user queries will ever be leaked through these resolvers, and they will
  241. ## not be used after IP addresses of DoH resolvers have been found (if you are
  242. ## using DoH).
  243. ##
  244. ## They will never be used if lists have already been cached, and if the stamps
  245. ## of the configured servers already include IP addresses (which is the case for
  246. ## most of DoH servers, and for all DNSCrypt servers and relays).
  247. ##
  248. ## They will not be used if the configured system DNS works, or after the
  249. ## proxy already has at least one usable secure resolver.
  250. ##
  251. ## Resolvers supporting DNSSEC are recommended, and, if you are using
  252. ## DoH, bootstrap resolvers should ideally be operated by a different entity
  253. ## than the DoH servers you will be using, especially if you have IPv6 enabled.
  254. ##
  255. ## People in China may want to use 114.114.114.114:53 here.
  256. ## Other popular options include 8.8.8.8, 9.9.9.9 and 1.1.1.1.
  257. ##
  258. ## If more than one resolver is specified, they will be tried in sequence.
  259. ##
  260. ## TL;DR: put valid standard resolver addresses here. Your actual queries will
  261. ## not be sent there. If you're using DNSCrypt or Anonymized DNS and your
  262. ## lists are up to date, these resolvers will not even be used.
  263.  
  264. bootstrap_resolvers = ['9.9.9.11:53', '8.8.8.8:53']
  265.  
  266.  
  267. ## When internal DNS resolution is required, for example to retrieve
  268. ## the resolvers list:
  269. ##
  270. ## - queries will be sent to dnscrypt-proxy itself, if it is already
  271. ## running with active servers (*)
  272. ## - or else, queries will be sent to fallback servers
  273. ## - finally, if `ignore_system_dns` is `false`, queries will be sent
  274. ## to the system DNS
  275. ##
  276. ## (*) this is incompatible with systemd sockets.
  277. ## `listen_addrs` must not be empty.
  278.  
  279. ignore_system_dns = true
  280.  
  281.  
  282. ## Maximum time (in seconds) to wait for network connectivity before
  283. ## initializing the proxy.
  284. ## Useful if the proxy is automatically started at boot, and network
  285. ## connectivity is not guaranteed to be immediately available.
  286. ## Use 0 to not test for connectivity at all (not recommended),
  287. ## and -1 to wait as much as possible.
  288.  
  289. netprobe_timeout = 60
  290.  
  291. ## Address and port to try initializing a connection to, just to check
  292. ## if the network is up. It can be any address and any port, even if
  293. ## there is nothing answering these on the other side. Just don't use
  294. ## a local address, as the goal is to check for Internet connectivity.
  295. ## On Windows, a datagram with a single, nul byte will be sent, only
  296. ## when the system starts.
  297. ## On other operating systems, the connection will be initialized
  298. ## but nothing will be sent at all.
  299.  
  300. netprobe_address = '9.9.9.9:53'
  301.  
  302.  
  303. ## Offline mode - Do not use any remote encrypted servers.
  304. ## The proxy will remain fully functional to respond to queries that
  305. ## plugins can handle directly (forwarding, cloaking, ...)
  306.  
  307. # offline_mode = false
  308.  
  309.  
  310. ## Additional data to attach to outgoing queries.
  311. ## These strings will be added as TXT records to queries.
  312. ## Do not use, except on servers explicitly asking for extra data
  313. ## to be present.
  314. ## encrypted-dns-server can be configured to use this for access control
  315. ## in the [access_control] section
  316.  
  317. # query_meta = ['key1:value1', 'key2:value2', 'token:MySecretToken']
  318.  
  319.  
  320. ## Automatic log files rotation
  321.  
  322. # Maximum log files size in MB - Set to 0 for unlimited.
  323. log_files_max_size = 10
  324.  
  325. # How long to keep backup files, in days
  326. log_files_max_age = 7
  327.  
  328. # Maximum log files backups to keep (or 0 to keep all backups)
  329. log_files_max_backups = 1
  330.  
  331.  
  332.  
  333. #########################
  334. # Filters #
  335. #########################
  336.  
  337. ## Note: if you are using dnsmasq, disable the `dnssec` option in dnsmasq if you
  338. ## configure dnscrypt-proxy to do any kind of filtering (including the filters
  339. ## below and blocklists).
  340. ## You can still choose resolvers that do DNSSEC validation.
  341.  
  342.  
  343. ## Immediately respond to IPv6-related queries with an empty response
  344. ## This makes things faster when there is no IPv6 connectivity, but can
  345. ## also cause reliability issues with some stub resolvers.
  346.  
  347. block_ipv6 = false
  348.  
  349.  
  350. ## Immediately respond to A and AAAA queries for host names without a domain name
  351. ## This also prevents "dotless domain names" from being resolved upstream.
  352.  
  353. block_unqualified = true
  354.  
  355.  
  356. ## Immediately respond to queries for local zones instead of leaking them to
  357. ## upstream resolvers (always causing errors or timeouts).
  358.  
  359. block_undelegated = true
  360.  
  361.  
  362. ## TTL for synthetic responses sent when a request has been blocked (due to
  363. ## IPv6 or blocklists).
  364.  
  365. reject_ttl = 10
  366.  
  367.  
  368.  
  369. ##################################################################################
  370. # Route queries for specific domains to a dedicated set of servers #
  371. ##################################################################################
  372.  
  373. ## See the `example-forwarding-rules.txt` file for an example
  374.  
  375. # forwarding_rules = '/etc/dnscrypt-proxy/forwarding-rules.txt'
  376.  
  377.  
  378.  
  379. ###############################
  380. # Cloaking rules #
  381. ###############################
  382.  
  383. ## Cloaking returns a predefined address for a specific name.
  384. ## In addition to acting as a HOSTS file, it can also return the IP address
  385. ## of a different name. It will also do CNAME flattening.
  386. ## If 'cloak_ptr' is set, then PTR (reverse lookups) are enabled
  387. ## for cloaking rules that do not contain wild cards.
  388. ##
  389. ## See the `example-cloaking-rules.txt` file for an example
  390.  
  391. # cloaking_rules = '/etc/dnscrypt-proxy/cloaking-rules.txt'
  392.  
  393. ## TTL used when serving entries in cloaking-rules.txt
  394.  
  395. # cloak_ttl = 600
  396. # cloak_ptr = false
  397.  
  398.  
  399.  
  400. ###########################
  401. # DNS cache #
  402. ###########################
  403.  
  404. ## Enable a DNS cache to reduce latency and outgoing traffic
  405.  
  406. cache = true
  407.  
  408.  
  409. ## Cache size
  410.  
  411. cache_size = 4096
  412.  
  413.  
  414. ## Minimum TTL for cached entries
  415.  
  416. cache_min_ttl = 2400
  417.  
  418.  
  419. ## Maximum TTL for cached entries
  420.  
  421. cache_max_ttl = 86400
  422.  
  423.  
  424. ## Minimum TTL for negatively cached entries
  425.  
  426. cache_neg_min_ttl = 60
  427.  
  428.  
  429. ## Maximum TTL for negatively cached entries
  430.  
  431. cache_neg_max_ttl = 600
  432.  
  433.  
  434.  
  435. ########################################
  436. # Captive portal handling #
  437. ########################################
  438.  
  439. [captive_portals]
  440.  
  441. ## A file that contains a set of names used by operating systems to
  442. ## check for connectivity and captive portals, along with hard-coded
  443. ## IP addresses to return.
  444.  
  445. # map_file = '/etc/dnscrypt-proxy/captive-portals.txt'
  446.  
  447.  
  448.  
  449. ##################################
  450. # Local DoH server #
  451. ##################################
  452.  
  453. [local_doh]
  454.  
  455. ## dnscrypt-proxy can act as a local DoH server. By doing so, web browsers
  456. ## requiring a direct connection to a DoH server in order to enable some
  457. ## features will enable these, without bypassing your DNS proxy.
  458.  
  459. ## Addresses that the local DoH server should listen to
  460.  
  461. # listen_addresses = ['127.0.0.1:3000']
  462.  
  463.  
  464. ## Path of the DoH URL. This is not a file, but the part after the hostname
  465. ## in the URL. By convention, `/dns-query` is frequently chosen.
  466. ## For each `listen_address` the complete URL to access the server will be:
  467. ## `https://<listen_address><path>` (ex: `https://127.0.0.1/dns-query`)
  468.  
  469. # path = '/dns-query'
  470.  
  471.  
  472. ## Certificate file and key - Note that the certificate has to be trusted.
  473. ## Can be generated using the following command:
  474. ## openssl req -x509 -nodes -newkey rsa:2048 -days 5000 -sha256 -keyout localhost.pem -out localhost.pem
  475. ## See the documentation (wiki) for more information.
  476.  
  477. # cert_file = "/var/lib/dnscrypt-proxy/localhost.pem"
  478. # cert_key_file = "/var/lib/dnscrypt-proxy/localhost.pem"
  479.  
  480.  
  481.  
  482. ###############################
  483. # Query logging #
  484. ###############################
  485.  
  486. ## Log client queries to a file
  487.  
  488. [query_log]
  489.  
  490. ## Path to the query log file (absolute, or relative to the same directory as the config file)
  491. ## Can be set to /dev/stdout in order to log to the standard output.
  492.  
  493. # file = '/var/log/dnscrypt-proxy/query.log'
  494.  
  495.  
  496. ## Query log format (currently supported: tsv and ltsv)
  497.  
  498. format = 'tsv'
  499.  
  500.  
  501. ## Do not log these query types, to reduce verbosity. Keep empty to log everything.
  502.  
  503. # ignored_qtypes = ['DNSKEY', 'NS']
  504.  
  505.  
  506.  
  507. ############################################
  508. # Suspicious queries logging #
  509. ############################################
  510.  
  511. ## Log queries for nonexistent zones
  512. ## These queries can reveal the presence of malware, broken/obsolete applications,
  513. ## and devices signaling their presence to 3rd parties.
  514.  
  515. [nx_log]
  516.  
  517. ## Path to the query log file (absolute, or relative to the same directory as the config file)
  518.  
  519. # file = '/var/log/dnscrypt-proxy/nx.log'
  520.  
  521.  
  522. ## Query log format (currently supported: tsv and ltsv)
  523.  
  524. format = 'tsv'
  525.  
  526.  
  527.  
  528. ######################################################
  529. # Pattern-based blocking (blocklists) #
  530. ######################################################
  531.  
  532. ## Blocklists are made of one pattern per line. Example of valid patterns:
  533. ##
  534. ## example.com
  535. ## =example.com
  536. ## *sex*
  537. ## ads.*
  538. ## ads*.example.*
  539. ## ads*.example[0-9]*.com
  540. ##
  541. ## Example blocklist files can be found at https://download.dnscrypt.info/blocklists/
  542. ## A script to build blocklists from public feeds can be found in the
  543. ## `utils/generate-domains-blocklists` directory of the dnscrypt-proxy source code.
  544.  
  545. [blocked_names]
  546.  
  547. ## Path to the file of blocking rules (absolute, or relative to the same directory as the config file)
  548.  
  549. # blocked_names_file = '/etc/dnscrypt-proxy/blocked-names.txt'
  550.  
  551.  
  552. ## Optional path to a file logging blocked queries
  553.  
  554. # log_file = '/var/log/dnscrypt-proxy/blocked-names.log'
  555.  
  556.  
  557. ## Optional log format: tsv or ltsv (default: tsv)
  558.  
  559. # log_format = 'tsv'
  560.  
  561.  
  562.  
  563. ###########################################################
  564. # Pattern-based IP blocking (IP blocklists) #
  565. ###########################################################
  566.  
  567. ## IP blocklists are made of one pattern per line. Example of valid patterns:
  568. ##
  569. ## 127.*
  570. ## fe80:abcd:*
  571. ## 192.168.1.4
  572.  
  573. [blocked_ips]
  574.  
  575. ## Path to the file of blocking rules (absolute, or relative to the same directory as the config file)
  576.  
  577. # blocked_ips_file = '/etc/dnscrypt-proxy/blocked-ips.txt'
  578.  
  579.  
  580. ## Optional path to a file logging blocked queries
  581.  
  582. # log_file = '/var/log/dnscrypt-proxy/blocked-ips.log'
  583.  
  584.  
  585. ## Optional log format: tsv or ltsv (default: tsv)
  586.  
  587. # log_format = 'tsv'
  588.  
  589.  
  590.  
  591. ######################################################
  592. # Pattern-based allow lists (blocklists bypass) #
  593. ######################################################
  594.  
  595. ## Allowlists support the same patterns as blocklists
  596. ## If a name matches an allowlist entry, the corresponding session
  597. ## will bypass names and IP filters.
  598. ##
  599. ## Time-based rules are also supported to make some websites only accessible at specific times of the day.
  600.  
  601. [allowed_names]
  602.  
  603. ## Path to the file of allow list rules (absolute, or relative to the same directory as the config file)
  604.  
  605. # allowed_names_file = '/etc/dnscrypt-proxy/allowed-names.txt'
  606.  
  607.  
  608. ## Optional path to a file logging allowed queries
  609.  
  610. # log_file = '/var/log/dnscrypt-proxy/allowed-names.log'
  611.  
  612.  
  613. ## Optional log format: tsv or ltsv (default: tsv)
  614.  
  615. # log_format = 'tsv'
  616.  
  617.  
  618.  
  619. #########################################################
  620. # Pattern-based allowed IPs lists (blocklists bypass) #
  621. #########################################################
  622.  
  623. ## Allowed IP lists support the same patterns as IP blocklists
  624. ## If an IP response matches an allowed entry, the corresponding session
  625. ## will bypass IP filters.
  626. ##
  627. ## Time-based rules are also supported to make some websites only accessible at specific times of the day.
  628.  
  629. [allowed_ips]
  630.  
  631. ## Path to the file of allowed ip rules (absolute, or relative to the same directory as the config file)
  632.  
  633. # allowed_ips_file = '/etc/dnscrypt-proxy/allowed-ips.txt'
  634.  
  635.  
  636. ## Optional path to a file logging allowed queries
  637.  
  638. # log_file = '/var/log/dnscrypt-proxy/allowed-ips.log'
  639.  
  640. ## Optional log format: tsv or ltsv (default: tsv)
  641.  
  642. # log_format = 'tsv'
  643.  
  644.  
  645.  
  646. ##########################################
  647. # Time access restrictions #
  648. ##########################################
  649.  
  650. ## One or more weekly schedules can be defined here.
  651. ## Patterns in the name-based blocked_names file can optionally be followed with @schedule_name
  652. ## to apply the pattern 'schedule_name' only when it matches a time range of that schedule.
  653. ##
  654. ## For example, the following rule in a blocklist file:
  655. ## *.youtube.* @time-to-sleep
  656. ## would block access to YouTube during the times defined by the 'time-to-sleep' schedule.
  657. ##
  658. ## {after='21:00', before= '7:00'} matches 0:00-7:00 and 21:00-0:00
  659. ## {after= '9:00', before='18:00'} matches 9:00-18:00
  660.  
  661. [schedules]
  662.  
  663. # [schedules.time-to-sleep]
  664. # mon = [{after='21:00', before='7:00'}]
  665. # tue = [{after='21:00', before='7:00'}]
  666. # wed = [{after='21:00', before='7:00'}]
  667. # thu = [{after='21:00', before='7:00'}]
  668. # fri = [{after='23:00', before='7:00'}]
  669. # sat = [{after='23:00', before='7:00'}]
  670. # sun = [{after='21:00', before='7:00'}]
  671.  
  672. # [schedules.work]
  673. # mon = [{after='9:00', before='18:00'}]
  674. # tue = [{after='9:00', before='18:00'}]
  675. # wed = [{after='9:00', before='18:00'}]
  676. # thu = [{after='9:00', before='18:00'}]
  677. # fri = [{after='9:00', before='17:00'}]
  678.  
  679.  
  680.  
  681. #########################
  682. # Servers #
  683. #########################
  684.  
  685. ## Remote lists of available servers
  686. ## Multiple sources can be used simultaneously, but every source
  687. ## requires a dedicated cache file.
  688. ##
  689. ## Refer to the documentation for URLs of public sources.
  690. ##
  691. ## A prefix can be prepended to server names in order to
  692. ## avoid collisions if different sources share the same for
  693. ## different servers. In that case, names listed in `server_names`
  694. ## must include the prefixes.
  695. ##
  696. ## If the `urls` property is missing, cache files and valid signatures
  697. ## must already be present. This doesn't prevent these cache files from
  698. ## expiring after `refresh_delay` hours.
  699. ## `refreshed_delay` must be in the [24..168] interval.
  700. ## The minimum delay of 24 hours (1 day) avoids unnecessary requests to servers.
  701. ## The maximum delay of 168 hours (1 week) ensures cache freshness.
  702.  
  703. [sources]
  704.  
  705. ### An example of a remote source from https://github.com/DNSCrypt/dnscrypt-resolvers
  706.  
  707. [sources.public-resolvers]
  708. urls = ['https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md', 'https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md']
  709. cache_file = '/var/cache/dnscrypt-proxy/public-resolvers.md'
  710. minisign_key = 'RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3'
  711. refresh_delay = 72
  712. prefix = ''
  713.  
  714. ### Anonymized DNS relays
  715.  
  716. [sources.relays]
  717. urls = ['https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/relays.md', 'https://download.dnscrypt.info/resolvers-list/v3/relays.md']
  718. cache_file = '/var/cache/dnscrypt-proxy/relays.md'
  719. minisign_key = 'RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3'
  720. refresh_delay = 72
  721. prefix = ''
  722.  
  723. ### ODoH (Oblivious DoH) servers and relays
  724.  
  725. # [sources.odoh-servers]
  726. # urls = ['https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/odoh-servers.md', 'https://download.dnscrypt.info/resolvers-list/v3/odoh-servers.md']
  727. # cache_file = '/var/cache/dnscrypt-proxy/odoh-servers.md'
  728. # minisign_key = 'RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3'
  729. # refresh_delay = 24
  730. # prefix = ''
  731. # [sources.odoh-relays]
  732. # urls = ['https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/odoh-relays.md', 'https://download.dnscrypt.info/resolvers-list/v3/odoh-relays.md']
  733. # cache_file = '/var/cache/dnscrypt-proxy/odoh-relays.md'
  734. # minisign_key = 'RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3'
  735. # refresh_delay = 24
  736. # prefix = ''
  737.  
  738. ### Quad9
  739.  
  740. # [sources.quad9-resolvers]
  741. # urls = ['https://www.quad9.net/quad9-resolvers.md']
  742. # minisign_key = 'RWQBphd2+f6eiAqBsvDZEBXBGHQBJfeG6G+wJPPKxCZMoEQYpmoysKUN'
  743. # cache_file = '/var/cache/dnscrypt-proxy/quad9-resolvers.md'
  744. # prefix = 'quad9-'
  745.  
  746. ### Another example source, with resolvers censoring some websites not appropriate for children
  747. ### This is a subset of the `public-resolvers` list, so enabling both is useless.
  748.  
  749. # [sources.parental-control]
  750. # urls = ['https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/parental-control.md', 'https://download.dnscrypt.info/resolvers-list/v3/parental-control.md']
  751. # cache_file = '/var/cache/dnscrypt-proxy/parental-control.md'
  752. # minisign_key = 'RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3'
  753.  
  754.  
  755.  
  756. #########################################
  757. # Servers with known bugs #
  758. #########################################
  759.  
  760. [broken_implementations]
  761.  
  762. ## Cisco servers currently cannot handle queries larger than 1472 bytes, and don't
  763. ## truncate responses larger than questions as expected by the DNSCrypt protocol.
  764. ## This prevents large responses from being received over UDP and over relays.
  765. ##
  766. ## Older versions of the `dnsdist` server software had a bug with queries larger
  767. ## than 1500 bytes. This is fixed since `dnsdist` version 1.5.0, but
  768. ## some server may still run an outdated version.
  769. ##
  770. ## The list below enables workarounds to make non-relayed usage more reliable
  771. ## until the servers are fixed.
  772.  
  773. fragments_blocked = ['cisco', 'cisco-ipv6', 'cisco-familyshield', 'cisco-familyshield-ipv6', 'cleanbrowsing-adult', 'cleanbrowsing-adult-ipv6', 'cleanbrowsing-family', 'cleanbrowsing-family-ipv6', 'cleanbrowsing-security', 'cleanbrowsing-security-ipv6']
  774.  
  775.  
  776.  
  777. #################################################################
  778. # Certificate-based client authentication for DoH #
  779. #################################################################
  780.  
  781. ## Use a X509 certificate to authenticate yourself when connecting to DoH servers.
  782. ## This is only useful if you are operating your own, private DoH server(s).
  783. ## 'creds' maps servers to certificates, and supports multiple entries.
  784. ## If you are not using the standard root CA, an optional "root_ca"
  785. ## property set to the path to a root CRT file can be added to a server entry.
  786.  
  787. [doh_client_x509_auth]
  788.  
  789. # creds = [
  790. # { server_name='*', client_cert='client.crt', client_key='client.key' }
  791. # ]
  792.  
  793.  
  794.  
  795. ################################
  796. # Anonymized DNS #
  797. ################################
  798.  
  799. [anonymized_dns]
  800.  
  801. ## Routes are indirect ways to reach DNSCrypt servers.
  802. ##
  803. ## A route maps a server name ("server_name") to one or more relays that will be
  804. ## used to connect to that server.
  805. ##
  806. ## A relay can be specified as a DNS Stamp (either a relay stamp, or a
  807. ## DNSCrypt stamp) or a server name.
  808. ##
  809. ## The following example routes "example-server-1" via `anon-example-1` or `anon-example-2`,
  810. ## and "example-server-2" via the relay whose relay DNS stamp is
  811. ## "sdns://gRIxMzcuNzQuMjIzLjIzNDo0NDM".
  812. ##
  813. ## !!! THESE ARE JUST EXAMPLES !!!
  814. ##
  815. ## Review the list of available relays from the "relays.md" file, and, for each
  816. ## server you want to use, define the relays you want connections to go through.
  817. ##
  818. ## Carefully choose relays and servers so that they are run by different entities.
  819. ##
  820. ## "server_name" can also be set to "*" to define a default route, for all servers:
  821. ## { server_name='*', via=['anon-example-1', 'anon-example-2'] }
  822. ##
  823. ## If a route is ["*"], the proxy automatically picks a relay on a distinct network.
  824. ## { server_name='*', via=['*'] } is also an option, but is likely to be suboptimal.
  825. ##
  826. ## Manual selection is always recommended over automatic selection, so that you can
  827. ## select (relay,server) pairs that work well and fit your own criteria (close by or
  828. ## in different countries, operated by different entities, on distinct ISPs...)
  829.  
  830. # routes = [
  831. # { server_name='example-server-1', via=['anon-example-1', 'anon-example-2'] },
  832. # { server_name='example-server-2', via=['sdns://gRIxMzcuNzQuMjIzLjIzNDo0NDM'] }
  833. # ]
  834.  
  835.  
  836. ## Skip resolvers incompatible with anonymization instead of using them directly
  837.  
  838. skip_incompatible = false
  839.  
  840.  
  841. ## If public server certificates for a non-conformant server cannot be
  842. ## retrieved via a relay, try getting them directly. Actual queries
  843. ## will then always go through relays.
  844.  
  845. # direct_cert_fallback = false
  846.  
  847.  
  848.  
  849. ###############################
  850. # DNS64 #
  851. ###############################
  852.  
  853. ## DNS64 is a mechanism for synthesizing AAAA records from A records.
  854. ## It is used with an IPv6/IPv4 translator to enable client-server
  855. ## communication between an IPv6-only client and an IPv4-only server,
  856. ## without requiring any changes to either the IPv6 or the IPv4 node,
  857. ## for the class of applications that work through NATs.
  858. ##
  859. ## There are two options to synthesize such records:
  860. ## Option 1: Using a set of static IPv6 prefixes;
  861. ## Option 2: By discovering the IPv6 prefix from DNS64-enabled resolver.
  862. ##
  863. ## If both options are configured - only static prefixes are used.
  864. ## (Ref. RFC6147, RFC6052, RFC7050)
  865. ##
  866. ## Do not enable unless you know what DNS64 is and why you need it, or else
  867. ## you won't be able to connect to anything at all.
  868.  
  869. [dns64]
  870.  
  871. ## Static prefix(es) as Pref64::/n CIDRs
  872.  
  873. # prefix = ['64:ff9b::/96']
  874.  
  875. ## DNS64-enabled resolver(s) to discover Pref64::/n CIDRs
  876. ## These resolvers are used to query for Well-Known IPv4-only Name (WKN) "ipv4only.arpa." to discover only.
  877. ## Set with your ISP's resolvers in case of custom prefixes (other than Well-Known Prefix 64:ff9b::/96).
  878. ## IMPORTANT: Default resolvers listed below support Well-Known Prefix 64:ff9b::/96 only.
  879.  
  880. # resolver = ['[2606:4700:4700::64]:53', '[2001:4860:4860::64]:53']
  881.  
  882.  
  883.  
  884. ########################################
  885. # Static entries #
  886. ########################################
  887.  
  888. ## Optional, local, static list of additional servers
  889. ## Mostly useful for testing your own servers.
  890.  
  891. [static]
  892.  
  893. # [static.myserver]
  894. # stamp = 'sdns://AQcAAAAAAAAAAAAQMi5kbnNjcnlwdC1jZXJ0Lg'
  895.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement