Pull request 2338: AGDNS-2665-upstream-timeout
Merge in DNS/adguard-home from AGDNS-2665-upstream-timeout to master
Squashed commit of the following:
commit b4041c97f2ccd371a9cff8312bda72f4c18496b9
Merge: d939b3b3e b92a3cfb8
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Feb 7 16:15:19 2025 +0300
Merge branch 'master' into AGDNS-2665-upstream-timeout
commit d939b3b3ef2345d315c05a3730e81e1f1ea9f79f
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Feb 7 16:10:06 2025 +0300
client: imp i18n
commit 52089adb6c28d8c47f5a916d9df941c5fddea1fc
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date: Thu Feb 6 18:39:53 2025 +0300
all: fix typo
commit aca08b1873c9f39b8c1da0439a9057117e1dacce
Author: Ildar Kamalov <ik@adguard.com>
Date: Thu Feb 6 15:19:30 2025 +0300
client: rearrange upstream timeout settings
commit 48e75fabe2f65aeac7156a020cce3d4c2412e5f9
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date: Tue Feb 4 20:48:53 2025 +0300
github: upd actions cache
commit 64bac193fc834a975e6913bb86a6bf27e54c382a
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date: Tue Feb 4 20:28:54 2025 +0300
all: imp code
commit 95c73698985dc528a4af6ff0d3b8a301da1f0d4a
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date: Mon Feb 3 16:25:35 2025 +0300
all: upstream timeout
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
"upstream_parallel": "Use parallel queries to speed up resolving by querying all upstream servers simultaneously.",
|
||||
"parallel_requests": "Parallel requests",
|
||||
"load_balancing": "Load-balancing",
|
||||
"load_balancing_desc": "Query one upstream server at a time. AdGuard Home uses a weighted random algorithm to select servers with the lowest number of failed lookups and the lowest average lookup time.",
|
||||
"load_balancing_desc": "Query one upstream server at a time.<br/>AdGuard Home uses a weighted random algorithm to select servers with the lowest number of failed lookups and the lowest average lookup time.",
|
||||
"bootstrap_dns": "Bootstrap DNS servers",
|
||||
"bootstrap_dns_desc": "IP addresses of DNS servers used to resolve IP addresses of the DoH/DoT resolvers you specify as upstreams. Comments are not permitted.",
|
||||
"fallback_dns_title": "Fallback DNS servers",
|
||||
@@ -294,6 +294,9 @@
|
||||
"blocked_response_ttl": "Blocked response TTL",
|
||||
"blocked_response_ttl_desc": "Specifies for how many seconds the clients should cache a filtered response",
|
||||
"form_enter_blocked_response_ttl": "Enter blocked response TTL (seconds)",
|
||||
"upstream_timeout": "Upstream timeout",
|
||||
"upstream_timeout_desc": "Specifies the number of seconds to wait for a response from the upstream server",
|
||||
"form_enter_upstream_timeout": "Enter the upstream server timeout duration in seconds",
|
||||
"dnscrypt": "DNSCrypt",
|
||||
"dns_over_https": "DNS-over-HTTPS",
|
||||
"dns_over_tls": "DNS-over-TLS",
|
||||
@@ -598,7 +601,7 @@
|
||||
"disable_ipv6": "Disable resolving of IPv6 addresses",
|
||||
"disable_ipv6_desc": "Drop all DNS queries for IPv6 addresses (type AAAA) and remove IPv6 hints from HTTPS responses.",
|
||||
"fastest_addr": "Fastest IP address",
|
||||
"fastest_addr_desc": "Query all DNS servers and return the fastest IP address among all responses. This slows down DNS queries as AdGuard Home has to wait for responses from all DNS servers, but improves the overall connectivity.",
|
||||
"fastest_addr_desc": "Wait for responses from <b>all</b> DNS servers, measure the TCP connection speed for each server, and return the IP address of the server with the fastest connection speed.<br/>This mode can significantly slow down DNS queries, if one or more upstream servers are not responding. Make sure that your upstream servers are stable and your upstream timeout is low.",
|
||||
"autofix_warning_text": "If you click \"Fix\", AdGuard Home will configure your system to use AdGuard Home DNS server.",
|
||||
"autofix_warning_list": "It will perform these tasks: <0>Deactivate system DNSStubListener</0> <0>Set DNS server address to 127.0.0.1</0> <0>Replace symbolic link target of /etc/resolv.conf with /run/systemd/resolve/resolv.conf</0> <0>Stop DNSStubListener (reload systemd-resolved service)</0>",
|
||||
"autofix_warning_result": "As a result all DNS requests from your system will be processed by AdGuard Home by default.",
|
||||
|
||||
@@ -7,8 +7,19 @@ import classnames from 'classnames';
|
||||
|
||||
import Examples from './Examples';
|
||||
|
||||
import { renderRadioField, renderTextareaField, CheckboxField } from '../../../../helpers/form';
|
||||
import { DNS_REQUEST_OPTIONS, FORM_NAME, UPSTREAM_CONFIGURATION_WIKI_LINK } from '../../../../helpers/constants';
|
||||
import {
|
||||
renderRadioField,
|
||||
renderTextareaField,
|
||||
CheckboxField,
|
||||
renderInputField,
|
||||
toNumber,
|
||||
} from '../../../../helpers/form';
|
||||
import {
|
||||
DNS_REQUEST_OPTIONS,
|
||||
FORM_NAME,
|
||||
UINT32_RANGE,
|
||||
UPSTREAM_CONFIGURATION_WIKI_LINK,
|
||||
} from '../../../../helpers/constants';
|
||||
|
||||
import { testUpstreamWithFormValues } from '../../../../actions';
|
||||
|
||||
@@ -17,6 +28,7 @@ import { removeEmptyLines, trimLinesAndRemoveEmpty } from '../../../../helpers/h
|
||||
import { getTextareaCommentsHighlight, syncScroll } from '../../../../helpers/highlightTextareaComments';
|
||||
import '../../../ui/texareaCommentsHighlight.css';
|
||||
import { RootState } from '../../../../initialState';
|
||||
import { validateRequiredValue } from '../../../../helpers/validators';
|
||||
|
||||
const UPSTREAM_DNS_NAME = 'upstream_dns';
|
||||
const UPSTREAM_MODE_NAME = 'upstream_mode';
|
||||
@@ -301,7 +313,7 @@ const Form = ({ submitting, invalid, handleSubmit }: FormProps) => {
|
||||
<hr />
|
||||
</div>
|
||||
|
||||
<div className="col-12 mb-4">
|
||||
<div className="col-12">
|
||||
<Field
|
||||
name="resolve_clients"
|
||||
type="checkbox"
|
||||
@@ -311,6 +323,34 @@ const Form = ({ submitting, invalid, handleSubmit }: FormProps) => {
|
||||
disabled={processingSetConfig}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-12">
|
||||
<hr />
|
||||
</div>
|
||||
|
||||
<div className="col-12 col-md-7">
|
||||
<div className="form__group">
|
||||
<label htmlFor="upstream_timeout" className="form__label form__label--with-desc">
|
||||
<Trans>upstream_timeout</Trans>
|
||||
</label>
|
||||
|
||||
<div className="form__desc form__desc--top">
|
||||
<Trans>upstream_timeout_desc</Trans>
|
||||
</div>
|
||||
|
||||
<Field
|
||||
name="upstream_timeout"
|
||||
type="number"
|
||||
component={renderInputField}
|
||||
className="form-control"
|
||||
placeholder={t('form_enter_upstream_timeout')}
|
||||
normalize={toNumber}
|
||||
validate={validateRequiredValue}
|
||||
min={1}
|
||||
max={UINT32_RANGE.MAX}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="card-actions">
|
||||
|
||||
@@ -19,6 +19,7 @@ const Upstream = () => {
|
||||
resolve_clients,
|
||||
local_ptr_upstreams,
|
||||
use_private_ptr_resolvers,
|
||||
upstream_timeout,
|
||||
} = useSelector((state: RootState) => state.dnsConfig, shallowEqual);
|
||||
|
||||
const upstream_dns_file = useSelector((state: RootState) => state.dnsConfig.upstream_dns_file);
|
||||
@@ -32,6 +33,7 @@ const Upstream = () => {
|
||||
resolve_clients,
|
||||
local_ptr_upstreams,
|
||||
use_private_ptr_resolvers,
|
||||
upstream_timeout,
|
||||
} = values;
|
||||
|
||||
const dnsConfig = {
|
||||
@@ -41,6 +43,7 @@ const Upstream = () => {
|
||||
resolve_clients,
|
||||
local_ptr_upstreams,
|
||||
use_private_ptr_resolvers,
|
||||
upstream_timeout,
|
||||
...(upstream_dns_file ? null : { upstream_dns }),
|
||||
};
|
||||
|
||||
@@ -64,6 +67,7 @@ const Upstream = () => {
|
||||
resolve_clients,
|
||||
local_ptr_upstreams,
|
||||
use_private_ptr_resolvers,
|
||||
upstream_timeout,
|
||||
}}
|
||||
onSubmit={handleSubmit}
|
||||
/>
|
||||
|
||||
@@ -304,6 +304,7 @@ export type DnsConfigData = {
|
||||
blocking_ipv4: string;
|
||||
blocking_ipv6: string;
|
||||
blocked_response_ttl: number;
|
||||
upstream_timeout: number;
|
||||
edns_cs_enabled: boolean;
|
||||
disable_ipv6: boolean;
|
||||
dnssec_enabled: boolean;
|
||||
@@ -489,6 +490,7 @@ export const initialState: RootState = {
|
||||
blocking_ipv4: DEFAULT_BLOCKING_IPV4,
|
||||
blocking_ipv6: DEFAULT_BLOCKING_IPV6,
|
||||
blocked_response_ttl: 10,
|
||||
upstream_timeout: 10,
|
||||
edns_cs_enabled: false,
|
||||
disable_ipv6: false,
|
||||
dnssec_enabled: false,
|
||||
|
||||
@@ -66,6 +66,7 @@ const dnsConfig = handleActions(
|
||||
blocking_ipv4: DEFAULT_BLOCKING_IPV4,
|
||||
blocking_ipv6: DEFAULT_BLOCKING_IPV6,
|
||||
blocked_response_ttl: 10,
|
||||
upstream_timeout: 10,
|
||||
edns_cs_enabled: false,
|
||||
disable_ipv6: false,
|
||||
dnssec_enabled: false,
|
||||
|
||||
Reference in New Issue
Block a user