+ client: handle default blocking mode
This commit is contained in:
parent
8daca1a55a
commit
b01af453cc
|
@ -191,6 +191,7 @@
|
||||||
"query_log_retention_confirm": "Are you sure you want to change query log retention? If you decrease the interval value, some data will be lost",
|
"query_log_retention_confirm": "Are you sure you want to change query log retention? If you decrease the interval value, some data will be lost",
|
||||||
"dns_config": "DNS server configuration",
|
"dns_config": "DNS server configuration",
|
||||||
"blocking_mode": "Blocking mode",
|
"blocking_mode": "Blocking mode",
|
||||||
|
"default": "Default",
|
||||||
"nxdomain": "NXDOMAIN",
|
"nxdomain": "NXDOMAIN",
|
||||||
"null_ip": "Null IP",
|
"null_ip": "Null IP",
|
||||||
"custom_ip": "Custom IP",
|
"custom_ip": "Custom IP",
|
||||||
|
@ -203,7 +204,10 @@
|
||||||
"rate_limit_desc": "The number of requests per second that a single client is allowed to make (0: unlimited)",
|
"rate_limit_desc": "The number of requests per second that a single client is allowed to make (0: unlimited)",
|
||||||
"blocking_ipv4_desc": "IP address to be returned for a blocked A request",
|
"blocking_ipv4_desc": "IP address to be returned for a blocked A request",
|
||||||
"blocking_ipv6_desc": "IP address to be returned for a blocked AAAA request",
|
"blocking_ipv6_desc": "IP address to be returned for a blocked AAAA request",
|
||||||
"blocking_mode_desc": "<0>NXDOMAIN – Respond with NXDOMAIN code;</0> <0>Null IP – Respond with zero IP address (0.0.0.0 for A; :: for AAAA);</0> <0>Custom IP - Respond with a manually set IP address.</0>",
|
"blocking_mode_default": "Default: Respond with NXDOMAIN when blocked by Adblock-style rule; respond with the IP address specified in the rule when blocked by /etc/hosts-style rule",
|
||||||
|
"blocking_mode_nxdomain": "NXDOMAIN: Respond with NXDOMAIN code",
|
||||||
|
"blocking_mode_null_ip": "Null IP: Respond with zero IP address (0.0.0.0 for A; :: for AAAA)",
|
||||||
|
"blocking_mode_custom_ip": "Custom IP: Respond with a manually set IP address",
|
||||||
"upstream_dns_client_desc": "If you keep this field empty, AdGuard Home will use the servers configured in the <0>DNS settings</0>.",
|
"upstream_dns_client_desc": "If you keep this field empty, AdGuard Home will use the servers configured in the <0>DNS settings</0>.",
|
||||||
"source_label": "Source",
|
"source_label": "Source",
|
||||||
"found_in_known_domain_db": "Found in the known domains database.",
|
"found_in_known_domain_db": "Found in the known domains database.",
|
||||||
|
|
|
@ -83,7 +83,11 @@ let Form = ({
|
||||||
<Trans>blocking_mode</Trans>
|
<Trans>blocking_mode</Trans>
|
||||||
</label>
|
</label>
|
||||||
<div className="form__desc form__desc--top">
|
<div className="form__desc form__desc--top">
|
||||||
<Trans components={[<div key="0">text</div>]}>blocking_mode_desc</Trans>
|
{Object.values(BLOCKING_MODES).map(mode => (
|
||||||
|
<li key={mode}>
|
||||||
|
<Trans >{`blocking_mode_${mode}`}</Trans>
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
</div>
|
</div>
|
||||||
<div className="custom-controls-stacked">
|
<div className="custom-controls-stacked">
|
||||||
{getFields(processing, t)}
|
{getFields(processing, t)}
|
||||||
|
|
|
@ -359,6 +359,7 @@ export const QUERY_LOG_INTERVALS_DAYS = [1, 7, 30, 90];
|
||||||
export const FILTERS_INTERVALS_HOURS = [0, 1, 12, 24, 72, 168];
|
export const FILTERS_INTERVALS_HOURS = [0, 1, 12, 24, 72, 168];
|
||||||
|
|
||||||
export const BLOCKING_MODES = {
|
export const BLOCKING_MODES = {
|
||||||
|
default: 'default',
|
||||||
nxdomain: 'nxdomain',
|
nxdomain: 'nxdomain',
|
||||||
null_ip: 'null_ip',
|
null_ip: 'null_ip',
|
||||||
custom_ip: 'custom_ip',
|
custom_ip: 'custom_ip',
|
||||||
|
|
|
@ -39,7 +39,7 @@ const dnsConfig = handleActions(
|
||||||
{
|
{
|
||||||
processingGetConfig: false,
|
processingGetConfig: false,
|
||||||
processingSetConfig: false,
|
processingSetConfig: false,
|
||||||
blocking_mode: BLOCKING_MODES.nxdomain,
|
blocking_mode: BLOCKING_MODES.default,
|
||||||
ratelimit: 20,
|
ratelimit: 20,
|
||||||
blocking_ipv4: DEFAULT_BLOCKING_IPV4,
|
blocking_ipv4: DEFAULT_BLOCKING_IPV4,
|
||||||
blocking_ipv6: DEFAULT_BLOCKING_IPV6,
|
blocking_ipv6: DEFAULT_BLOCKING_IPV6,
|
||||||
|
|
Loading…
Reference in New Issue