dnscrypt-proxy/dnscrypt-proxy
Robert Edmonds 49000cd4f4 Forwarding plugin: Support forwarding subdomains of the root domain
This commit updates the forwarding plugin to support matching subdomains
of the root domain ("."). It looks like the forwarding plugin already
performs subdomain matches against the domains specified in the
forwarding rules files, but matches against the root domain weren't
working because of the way matches are performed by comparing the
normalized presentation format QNAME (which omits the trailing dot for
all QNAMEs except the root domain name).

Without this commit, only queries where the QNAME is exactly "."
would match a forwarding rule for the "." domain, like this (with
`offline_mode = true` and a single forwarding rule for the "." domain):

```
[2024-03-25 21:13:31]	100.100.100.100	.	NS	FORWARD	0ms	127.0.0.1:53
[2024-03-25 21:13:36]	100.100.100.100	com	NS	NOT_READY	0ms	-
```

With this commit I get the expected result:

```
[2024-03-25 21:40:07]	100.100.100.100	.	NS	FORWARD	0ms	127.0.0.1:53
[2024-03-25 21:40:09]	100.100.100.100	com	NS	FORWARD	0ms	127.0.0.1:53
```
2024-03-25 21:30:09 -04:00
..
testdata
coldstart.go make expression be more self-explanatory 2024-02-27 22:05:40 +08:00
common.go Listen `0.0.0.0` only on IPv4 2024-02-27 19:04:09 +08:00
config.go Warn if the main config file could be written by other system users 2024-02-20 02:11:03 +01:00
crypto.go error check all the rand.Read() calls 2023-06-06 09:16:44 +02:00
dnscrypt_certs.go Fix miscellaneous style issues (#2421) 2023-06-24 21:56:03 +02:00
dnsutils.go Listen `0.0.0.0` only on IPv4 2024-02-27 19:04:09 +08:00
estimators.go Back to VividCortex/ewma 2022-04-05 14:04:26 +02:00
example-allowed-ips.txt
example-allowed-names.txt Explain the example allowlist 2021-01-03 18:18:46 +01:00
example-blocked-ips.txt Add another IP block list 2021-04-30 20:51:22 +02:00
example-blocked-names.txt Add an example for blocking private relay 2021-07-17 14:22:10 +02:00
example-captive-portals.txt fix grammar in example file (#2372) 2023-04-14 21:19:55 +02:00
example-cloaking-rules.txt allow ptr queries for cloaked domains (#1958) 2021-12-13 14:00:13 +01:00
example-dnscrypt-proxy.toml Support server refresh concurrency (#2537) 2023-12-18 19:25:54 +08:00
example-forwarding-rules.txt Add an IPv6 forwarding example 2023-08-30 21:32:22 +02:00
fuzzing_test.go Format with gofumpt 2023-02-11 14:27:12 +01:00
local-doh.go Mostly get rid of ioutil 2023-02-02 19:38:24 +01:00
localhost.pem
logger.go Logger: pre-create log files before lumberjack does 2023-02-25 23:42:38 +01:00
main.go Check for dumb file permissions on startup 2024-02-20 02:39:39 +01:00
netprobe_others.go Don't call "bin" what is actually text 2023-06-24 22:11:47 +02:00
netprobe_windows.go Keep lines short 2022-03-23 17:48:48 +01:00
oblivious_doh.go Fix miscellaneous style issues (#2421) 2023-06-24 21:56:03 +02:00
pattern_matcher.go pattern_matcher: check exact matches first 2020-12-07 12:58:05 +01:00
pidfile.go Format with gofumpt 2023-02-11 14:27:12 +01:00
plugin_allow_ip.go Don't call "bin" what is actually text 2023-06-24 22:11:47 +02:00
plugin_allow_name.go Don't call "bin" what is actually text 2023-06-24 22:11:47 +02:00
plugin_block_ip.go Don't call "bin" what is actually text 2023-06-24 22:11:47 +02:00
plugin_block_ipv6.go Format with gofumpt 2023-02-11 14:27:12 +01:00
plugin_block_name.go Don't call "bin" what is actually text 2023-06-24 22:11:47 +02:00
plugin_block_undelegated.go Add .mail & .home.arpa undelegated names 2023-07-15 13:12:40 +00:00
plugin_block_unqualified.go Format with gofumpt 2023-02-11 14:27:12 +01:00
plugin_cache.go Cache plugin: replace ARC cache with SIEVE 2024-01-19 00:05:33 +01:00
plugin_captive_portal.go Remove log messages that are not really needed 2021-01-02 22:59:21 +01:00
plugin_cloak.go Don't call "bin" what is actually text 2023-06-24 22:11:47 +02:00
plugin_dns64.go Format with gofumpt 2023-02-11 14:27:12 +01:00
plugin_ecs.go Log when the ECS plugin is enabled 2021-01-02 15:10:30 +01:00
plugin_firefox.go Format with gofumpt 2023-02-11 14:27:12 +01:00
plugin_forward.go Forwarding plugin: Support forwarding subdomains of the root domain 2024-03-25 21:30:09 -04:00
plugin_get_set_payload_size.go Keep lines short 2022-03-23 17:48:48 +01:00
plugin_nx_log.go Base on clientProto value explicitly to dereference clientAddr (#2393) 2023-05-13 11:22:52 +02:00
plugin_query_log.go Base on clientProto value explicitly to dereference clientAddr (#2393) 2023-05-13 11:22:52 +02:00
plugin_querymeta.go Format with gofumpt 2023-02-11 14:27:12 +01:00
plugins.go Fix miscellaneous style issues (#2421) 2023-06-24 21:56:03 +02:00
privilege_linux.go Use os.Geteuid() 2022-10-18 14:56:39 +02:00
privilege_others.go Use os.Geteuid() 2022-10-18 14:56:39 +02:00
privilege_windows.go
proxy.go make expression be more self-explanatory 2024-02-27 22:05:40 +08:00
resolve.go Format with gofumpt 2023-02-11 14:27:12 +01:00
serversInfo.go Support server refresh concurrency (#2537) 2023-12-18 19:25:54 +08:00
service_android.go // +build -> //go:build 2021-09-23 19:16:26 +02:00
service_linux.go systemd: use constants and update status on ready (#1993) 2022-01-19 20:30:15 +01:00
service_others.go // +build -> //go:build 2021-09-23 19:16:26 +02:00
service_windows.go
setsockopts_darwin.go Allow arbitrary addresses to be set in listen_addresses 2020-11-25 19:23:30 +01:00
setsockopts_freebsd.go Allow arbitrary addresses to be set in listen_addresses 2020-11-25 19:23:30 +01:00
setsockopts_linux.go Keep lines short 2022-03-23 17:48:48 +01:00
setsockopts_openbsd.go Allow arbitrary addresses to be set in listen_addresses 2020-11-25 19:23:30 +01:00
setsockopts_others.go // +build -> //go:build 2021-09-23 19:16:26 +02:00
setsockopts_windows.go Allow arbitrary addresses to be set in listen_addresses 2020-11-25 19:23:30 +01:00
sources.go Make fetchWithCache() more readable 2023-08-11 11:24:54 +02:00
sources_test.go Restore the cache update code from version 2.1.4 for now 2023-08-11 00:51:34 +02:00
staticcheck.conf Add staticcheck.conf 2021-01-02 15:36:30 +01:00
systemd_android.go
systemd_free.go // +build -> //go:build 2021-09-23 19:16:26 +02:00
systemd_linux.go Keep lines short 2022-03-23 17:48:48 +01:00
time_ranges.go Keep lines short 2022-03-23 17:48:48 +01:00
timezone_android.go
timezone_others.go // +build -> //go:build 2021-09-23 19:16:26 +02:00
xtransport.go Make error more explicit 2023-08-11 12:07:13 +02:00