encrypted-dns.toml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. ####################################################
  2. # #
  3. # Encrypted DNS Server configuration #
  4. # #
  5. ####################################################
  6. ##################################
  7. # Global settings #
  8. ##################################
  9. ## IP addresses and ports to listen to, as well as their external IP
  10. ## If there is no NAT involved, `local` and `external` can be the same.
  11. ## As many addresses as needed can be configured here, IPv4 and/or IPv6.
  12. ## You should at least change the `external` IP address.
  13. ### Example with both IPv4 and IPv6 addresses:
  14. # listen_addrs = [
  15. # { local = "0.0.0.0:443", external = "198.51.100.1:443" },
  16. # { local = "[::]:443", external = "[2001:db8::1]:443" }
  17. # ]
  18. listen_addrs = [
  19. { local = "0.0.0.0:8443", external = "**YourIP**:8443" },
  20. { local = "[::]:8443", external = "[**YourIP**]:8443" }
  21. ]
  22. ## Upstream DNS server and port
  23. upstream_addr = "127.0.0.1:5353"
  24. ## File name to save the state to
  25. state_file = "encrypted-dns.state"
  26. ## UDP timeout in seconds
  27. udp_timeout = 10
  28. ## TCP timeout in seconds
  29. tcp_timeout = 10
  30. ## Maximum active UDP sockets
  31. udp_max_active_connections = 1000
  32. ## Maximum active TCP connections
  33. tcp_max_active_connections = 100
  34. ## Optional IP address to connect to upstream servers from.
  35. ## Leave commented/undefined to automatically select it.
  36. # external_addr = "0.0.0.0"
  37. ## Built-in DNS cache capacity
  38. cache_capacity = 100000
  39. ## DNS cache: minimum TTL
  40. cache_ttl_min = 3600
  41. ## DNS cache: max TTL
  42. cache_ttl_max = 86400
  43. ## DNS cache: error TTL
  44. cache_ttl_error = 600
  45. ## DNS cache: to avoid bursts of traffic for popular queries when an
  46. ## RRSET expires, hold a TTL received from an upstream server for
  47. ## `client_ttl_holdon` seconds before decreasing it in client responses.
  48. client_ttl_holdon = 60
  49. ## Run as a background process
  50. daemonize = false
  51. ## Log file
  52. # log_file = "/tmp/encrypted-dns.log"
  53. ## PID file
  54. pid_file = "/tmp/encrypted-dns.pid"
  55. ## User name to drop privileges to, when started as root.
  56. user = "DNSCrypt"
  57. ## Group name to drop privileges to, when started as root.
  58. group = "DNSCrypt"
  59. ## Path to chroot() to, when started as root.
  60. ## The path to the state file is relative to the chroot base.
  61. # chroot = "/var/empty"
  62. ## Queries sent to that name will return the client IP address.
  63. ## This can be very useful for debugging, or to check that relaying works.
  64. my_ip = "my.ip"
  65. ####################################
  66. # DNSCrypt settings #
  67. ####################################
  68. [dnscrypt]
  69. ## Provider name (with or without the `2.dnscrypt-cert.` prefix)
  70. provider_name = "**Your Preferred Name**"
  71. ## Does the server support DNSSEC?
  72. dnssec = true
  73. ## Does the server always returns correct answers (no filtering, including ad blocking)?
  74. no_filters = false
  75. ## Set to `true` if the server doesn't keep any information that can be used to identify users
  76. no_logs = true
  77. ## Key cache capacity, per certificate
  78. key_cache_capacity = 10000
  79. ###############################
  80. # TLS settings #
  81. ###############################
  82. [tls]
  83. ## Where to proxy TLS connections to (e.g. DoH server)
  84. # upstream_addr = "127.0.0.1:4343"
  85. #######################################
  86. # Server-side filtering #
  87. #######################################
  88. [filtering]
  89. ## List of domains to block, one per line
  90. # domain_blacklist = "/etc/domain_blacklist.txt"
  91. ## List of undelegated TLDs
  92. ## This is the list of nonexistent TLDs that queries are frequently observed for,
  93. ## but will never resolve to anything. The server will immediately return a
  94. ## synthesized NXDOMAIN response instead of hitting root servers.
  95. # undelegated_list = "/etc/undelegated.txt"
  96. ## Ignore A and AAAA queries for unqualified host names.
  97. # ignore_unqualified_hostnames = true
  98. #########################
  99. # Metrics #
  100. #########################
  101. # [metrics]
  102. # type = "prometheus"
  103. # listen_addr = "0.0.0.0:9100"
  104. # path = "/metrics"
  105. ################################
  106. # Anonymized DNS #
  107. ################################
  108. [anonymized_dns]
  109. # Enable relaying support for Anonymized DNS
  110. enabled = false
  111. # Allowed upstream ports
  112. # This is a list of commonly used ports for encrypted DNS services
  113. allowed_ports = [ 443, 553, 853, 1443, 2053, 4343, 4434, 4443, 5353, 5443, 8443, 15353 ]
  114. # Allow all ports >= 1024 in addition to the list above
  115. allow_non_reserved_ports = false
  116. # Blacklisted upstream IP addresses
  117. blacklisted_ips = [ "93.184.216.34" ]
  118. ################################
  119. # Access control #
  120. ################################
  121. [access_control]
  122. # Enable access control
  123. enabled = false
  124. # Only allow access to client queries including one of these random tokens
  125. # Tokens can be configured in the `query_meta` section of `dnscrypt-proxy` as
  126. # `query_meta = ["token:..."]` -- Replace ... with the token to use by the client.
  127. # Example: `query_meta = ["token:Y2oHkDJNHz"]`
  128. tokens = ["Y2oHkDJNHz", "G5zY3J5cHQtY", "C5zZWN1cmUuZG5z"]