From 36512134822a5f6b8b296ccbd7e7d5a9b8e87f26 Mon Sep 17 00:00:00 2001 From: Ildar Kamalov Date: Wed, 26 May 2021 15:55:44 +0300 Subject: [PATCH] client: handle local ips rdns --- client/src/__locales/en.json | 4 +++- .../components/Settings/Dns/Upstream/Form.js | 17 +++++++++++++++-- .../components/Settings/Dns/Upstream/index.js | 4 ++++ 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/client/src/__locales/en.json b/client/src/__locales/en.json index e9599b9d9ca..837bd969722 100644 --- a/client/src/__locales/en.json +++ b/client/src/__locales/en.json @@ -8,11 +8,13 @@ "load_balancing_desc": "Query one upstream server at a time. AdGuard Home will use the weighted random algorithm to pick the server so that the fastest server is used more often.", "bootstrap_dns": "Bootstrap DNS servers", "bootstrap_dns_desc": "Bootstrap DNS servers are used to resolve IP addresses of the DoH/DoT resolvers you specify as upstreams.", - "local_ptr_title": "Private DNS servers", + "local_ptr_title": "Private reverse DNS servers", "local_ptr_desc": "The DNS servers that AdGuard Home uses for local PTR queries. These servers are used to resolve the hostnames of clients with private IP addresses, for example \"192.168.12.34\", using rDNS. If not set, AdGuard Home uses the default DNS resolvers of your OS.", "local_ptr_placeholder": "Enter one server address per line", "resolve_clients_title": "Enable reverse resolving of clients' IP addresses", "resolve_clients_desc": "If enabled, AdGuard Home will attempt to reversely resolve clients' IP addresses into their hostnames by sending PTR queries to corresponding resolvers (private DNS servers for local clients, upstream server for clients with public IP addresses).", + "local_ips_rdns_title": "Use private rDNS resolvers", + "local_ips_rdns_desc": "Perform reverse DNS lookups for locally-served addresses using these upstream servers. If disabled, AdGuard Home responds with NXDOMAIN to all such PTR requests except for clients known from DHCP, /etc/hosts, and so on.", "check_dhcp_servers": "Check for DHCP servers", "save_config": "Save configuration", "enabled_dhcp": "DHCP server enabled", diff --git a/client/src/components/Settings/Dns/Upstream/Form.js b/client/src/components/Settings/Dns/Upstream/Form.js index 33b746e3047..a0a179eb385 100644 --- a/client/src/components/Settings/Dns/Upstream/Form.js +++ b/client/src/components/Settings/Dns/Upstream/Form.js @@ -178,7 +178,7 @@ const Form = ({
-
+
-
+
+
+
{ upstream_mode, resolve_clients, local_ptr_upstreams, + local_ips_rdns, } = useSelector((state) => state.dnsConfig, shallowEqual); const upstream_dns_file = useSelector((state) => state.dnsConfig.upstream_dns_file); @@ -25,6 +26,7 @@ const Upstream = () => { upstream_mode, resolve_clients, local_ptr_upstreams, + local_ips_rdns, } = values; const dnsConfig = { @@ -32,6 +34,7 @@ const Upstream = () => { upstream_mode, resolve_clients, local_ptr_upstreams, + local_ips_rdns, ...(upstream_dns_file ? null : { upstream_dns }), }; @@ -53,6 +56,7 @@ const Upstream = () => { upstream_mode, resolve_clients, local_ptr_upstreams, + local_ips_rdns, }} onSubmit={handleSubmit} />