docstring_tokens stringlengths 0 76.5k | code_tokens stringlengths 75 1.81M | label_window listlengths 4 2.12k | html_url stringlengths 74 116 | file_name stringlengths 3 311 |
|---|---|---|---|---|
disabled={
setting.name !== 'use_global_settings'
? useGlobalSettings
: false
} | <mask> name={setting.name}
<mask> type="checkbox"
<mask> component={renderSelectField}
<mask> placeholder={t(setting.placeholder)}
<mask> disabled={setting.name !== 'use_global_settings' ? useGlobalSettings : false}
<mask> />
<mask> </div>
<mask> ))}
<mask> </div>
<mask> <div label="services" title={props.t('block_services')}>
</s> + client: add multiple fields client form </s> remove <div className="form__desc">
<Trans
components={[
<a href="#dhcp" key="0">
link
</a>,
]}
>
client_identifier_desc
</Trans>
</s> add <div className="form__group">
<FieldArray
name="ids"
component={renderFields(t('form_enter_id'), t('form_add_id'))}
/> </s> remove <div className="col col-sm-6">
<Field
id="name"
name="name"
component={renderField}
type="text"
className="form-control"
placeholder={t('form_client_name')}
validate={[required]}
/>
</s> add <div className="form__desc mt-0">
<Trans
components={[
<a href="#dhcp" key="0">
link
</a>,
]}
>
client_identifier_desc
</Trans> </s> remove return '';
</s> add return (
<div className="logs__row logs__row--overflow">
<span className="logs__text">
{value.map(address => (
<div key={address} title={address}>
{address}
</div>
))}
</span>
</div>
); </s> remove <div className="row">
<div className="col col-sm-6">
{clientIdentifier === CLIENT_ID.IP && (
<div className="form__group">
<Field
id="ip"
name="ip"
component={renderField}
type="text"
className="form-control"
placeholder={t('form_enter_ip')}
validate={[ip, required]}
/>
</div>
)}
{clientIdentifier === CLIENT_ID.MAC && (
<div className="form__group">
<Field
id="mac"
name="mac"
component={renderField}
type="text"
className="form-control"
placeholder={t('form_enter_mac')}
validate={[mac, required]}
/>
</div>
)}
</s> add <div className="form__group">
<div className="form__label">
<strong className="mr-3">
<Trans>client_identifier</Trans>
</strong> </s> remove <div className="form__group">
<div className="form__inline mb-2">
<strong className="mr-3">
<Trans>client_identifier</Trans>
</strong>
<div className="custom-controls-stacked">
<Field
name="identifier"
component={renderRadioField}
type="radio"
className="form-control mr-2"
value="ip"
placeholder={t('ip_address')}
/>
<Field
name="identifier"
component={renderRadioField}
type="radio"
className="form-control mr-2"
value="mac"
placeholder="MAC"
/>
</div>
</s> add <div className="form__group mb-0">
<div className="form__group">
<Field
id="name"
name="name"
component={renderField}
type="text"
className="form-control"
placeholder={t('form_client_name')}
/> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156 | client/src/components/Settings/Clients/Form.js |
disabled={
submitting ||
invalid ||
pristine ||
processingAdding ||
processingUpdating
} | <mask> </button>
<mask> <button
<mask> type="submit"
<mask> className="btn btn-success btn-standard"
<mask> disabled={submitting || pristine || processingAdding || processingUpdating}
<mask> >
<mask> <Trans>save_btn</Trans>
<mask> </button>
<mask> </div>
<mask> </div>
</s> + client: add multiple fields client form </s> remove const clientInfo = getClientInfo(clients, value) || getClientInfo(autoClients, value);
</s> add const clientInfo = getClientInfo(clients, value) || getAutoClientInfo(autoClients, value); </s> remove <div className="form__desc">
<Trans
components={[
<a href="#dhcp" key="0">
link
</a>,
]}
>
client_identifier_desc
</Trans>
</s> add <div className="form__group">
<FieldArray
name="ids"
component={renderFields(t('form_enter_id'), t('form_add_id'))}
/> </s> remove <div className="col col-sm-6">
<Field
id="name"
name="name"
component={renderField}
type="text"
className="form-control"
placeholder={t('form_client_name')}
validate={[required]}
/>
</s> add <div className="form__desc mt-0">
<Trans
components={[
<a href="#dhcp" key="0">
link
</a>,
]}
>
client_identifier_desc
</Trans> </s> remove return '';
</s> add return (
<div className="logs__row logs__row--overflow">
<span className="logs__text">
{value.map(address => (
<div key={address} title={address}>
{address}
</div>
))}
</span>
</div>
); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156 | client/src/components/Settings/Clients/Form.js |
<mask> reset: PropTypes.func.isRequired,
<mask> change: PropTypes.func.isRequired,
<mask> submitting: PropTypes.bool.isRequired,
<mask> toggleClientModal: PropTypes.func.isRequired,
<mask> clientIdentifier: PropTypes.string,
<mask> useGlobalSettings: PropTypes.bool,
<mask> useGlobalServices: PropTypes.bool,
<mask> t: PropTypes.func.isRequired,
<mask> processingAdding: PropTypes.bool.isRequired,
<mask> processingUpdating: PropTypes.bool.isRequired,
</s> + client: add multiple fields client form </s> remove import { MODAL_TYPE, CLIENT_ID } from '../../../helpers/constants';
</s> add import { MODAL_TYPE } from '../../../helpers/constants'; </s> remove <div className="logs__text" title={title}>
{title}
</div>
</s> add <div className="logs__text">{title}</div> </s> remove return '';
</s> add return (
<div className="logs__row logs__row--overflow">
<span className="logs__text">
{value.map(address => (
<div key={address} title={address}>
{address}
</div>
))}
</span>
</div>
); </s> remove if (row.original && row.original.mac) {
return (
<div className="logs__row logs__row--overflow">
<span className="logs__text" title={row.original.mac}>
{row.original.mac} <em>(MAC)</em>
</span>
</div>
);
} else if (row.value) {
return (
<div className="logs__row logs__row--overflow">
<span className="logs__text" title={row.value}>
{row.value} <em>(IP)</em>
</span>
</div>
);
}
</s> add const { value } = row; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156 | client/src/components/Settings/Clients/Form.js | |
invalid: PropTypes.bool.isRequired, | <mask> t: PropTypes.func.isRequired,
<mask> processingAdding: PropTypes.bool.isRequired,
<mask> processingUpdating: PropTypes.bool.isRequired,
<mask> };
<mask>
<mask> const selector = formValueSelector('clientForm');
<mask>
<mask> Form = connect((state) => {
</s> + client: add multiple fields client form </s> remove clientIdentifier: PropTypes.string,
</s> add </s> remove const clientIdentifier = selector(state, 'identifier');
</s> add </s> remove let data;
if (config.identifier === CLIENT_ID.MAC) {
const { ip, identifier, ...values } = config;
data = { name, data: { ...values } };
} else {
const { mac, identifier, ...values } = config;
data = { name, data: { ...values } };
}
</s> add const data = { name, data: { ...config } }; </s> remove let data;
if (config.identifier === CLIENT_ID.MAC) {
const { ip, identifier, ...values } = config;
data = { ...values };
} else {
const { mac, identifier, ...values } = config;
data = { ...values };
}
await apiClient.addClient(data);
</s> add await apiClient.addClient(config); | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156 | client/src/components/Settings/Clients/Form.js |
<mask>
<mask> const selector = formValueSelector('clientForm');
<mask>
<mask> Form = connect((state) => {
<mask> const clientIdentifier = selector(state, 'identifier');
<mask> const useGlobalSettings = selector(state, 'use_global_settings');
<mask> const useGlobalServices = selector(state, 'use_global_blocked_services');
<mask> return {
<mask> clientIdentifier,
<mask> useGlobalSettings,
</s> + client: add multiple fields client form </s> remove clientIdentifier,
</s> add </s> remove clientIdentifier,
</s> add </s> remove const identifier = client.mac ? CLIENT_ID.MAC : CLIENT_ID.IP;
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156 | client/src/components/Settings/Clients/Form.js | |
<mask> const clientIdentifier = selector(state, 'identifier');
<mask> const useGlobalSettings = selector(state, 'use_global_settings');
<mask> const useGlobalServices = selector(state, 'use_global_blocked_services');
<mask> return {
<mask> clientIdentifier,
<mask> useGlobalSettings,
<mask> useGlobalServices,
<mask> };
<mask> })(Form);
<mask>
</s> + client: add multiple fields client form </s> remove const clientIdentifier = selector(state, 'identifier');
</s> add </s> remove clientIdentifier,
</s> add </s> remove let data;
if (config.identifier === CLIENT_ID.MAC) {
const { ip, identifier, ...values } = config;
data = { name, data: { ...values } };
} else {
const { mac, identifier, ...values } = config;
data = { name, data: { ...values } };
}
</s> add const data = { name, data: { ...config } }; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156 | client/src/components/Settings/Clients/Form.js | |
validate, | <mask> reduxForm({
<mask> form: 'clientForm',
<mask> enableReinitialize: true,
<mask> }),
<mask> ])(Form);
</s> + client: add multiple fields client form </s> remove identifier: CLIENT_ID.IP,
</s> add ids: [''], </s> remove identifier,
</s> add </s> remove const identifier = client.mac ? CLIENT_ID.MAC : CLIENT_ID.IP;
</s> add </s> remove <div className="logs__text" title={title}>
{title}
</div>
</s> add <div className="logs__text">{title}</div> | [
"keep",
"keep",
"add",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156 | client/src/components/Settings/Clients/Form.js |
<symbol id="cross" viewBox="0 0 24 24" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2">
<line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line>
</symbol>
<symbol id="plus" viewBox="0 0 24 24" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2">
<line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line>
</symbol> | <mask> <symbol id="location" viewBox="0 0 24 24" fill="currentColor" strokeLinecap="round" strokeLinejoin="round">
<mask> <path d="M12,2C8.134,2,5,5.134,5,9c0,5,7,13,7,13s7-8,7-13C19,5.134,15.866,2,12,2z M12,11.5c-1.381,0-2.5-1.119-2.5-2.5 c0-1.381,1.119-2.5,2.5-2.5s2.5,1.119,2.5,2.5C14.5,10.381,13.381,11.5,12,11.5z"/>
<mask> </symbol>
<mask> </svg>
<mask> );
<mask>
<mask> export default Icons;
</s> + client: add multiple fields client form </s> remove const clientInfo = getClientInfo(clients, value) || getClientInfo(autoClients, value);
</s> add const clientInfo = getClientInfo(clients, value) || getAutoClientInfo(autoClients, value); </s> remove <div className="logs__text" title={title}>
{title}
</div>
</s> add <div className="logs__text">{title}</div> </s> remove return '';
</s> add return (
<div className="logs__row logs__row--overflow">
<span className="logs__text">
{value.map(address => (
<div key={address} title={address}>
{address}
</div>
))}
</span>
</div>
); | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156 | client/src/components/ui/Icons.js |
// Validation functions | <mask> </Fragment>
<mask> );
<mask>
<mask> export const required = (value) => {
<mask> if (value || value === 0) {
<mask> return false;
<mask> }
<mask> return <Trans>form_error_required</Trans>;
<mask> };
</s> + client: add multiple fields client form </s> remove const clientInfo = getClientInfo(clients, value) || getClientInfo(autoClients, value);
</s> add const clientInfo = getClientInfo(clients, value) || getAutoClientInfo(autoClients, value); </s> remove if (row.original && row.original.mac) {
return (
<div className="logs__row logs__row--overflow">
<span className="logs__text" title={row.original.mac}>
{row.original.mac} <em>(MAC)</em>
</span>
</div>
);
} else if (row.value) {
return (
<div className="logs__row logs__row--overflow">
<span className="logs__text" title={row.value}>
{row.value} <em>(IP)</em>
</span>
</div>
);
}
</s> add const { value } = row; </s> remove let data;
if (config.identifier === CLIENT_ID.MAC) {
const { ip, identifier, ...values } = config;
data = { ...values };
} else {
const { mac, identifier, ...values } = config;
data = { ...values };
}
await apiClient.addClient(data);
</s> add await apiClient.addClient(config); </s> remove let data;
if (config.identifier === CLIENT_ID.MAC) {
const { ip, identifier, ...values } = config;
data = { name, data: { ...values } };
} else {
const { mac, identifier, ...values } = config;
data = { name, data: { ...values } };
}
</s> add const data = { name, data: { ...config } }; | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156 | client/src/helpers/form.js |
import { getClientInfo, getAutoClientInfo, normalizeWhois } from './helpers'; | <mask> import React, { Fragment } from 'react';
<mask> import { getClientInfo, normalizeWhois } from './helpers';
<mask> import { WHOIS_ICONS } from './constants';
<mask>
<mask> const getFormattedWhois = (whois, t) => {
<mask> const whoisInfo = normalizeWhois(whois);
<mask> return (
</s> + client: add multiple fields client form </s> remove import { Field, reduxForm, formValueSelector } from 'redux-form';
</s> add import { Field, FieldArray, reduxForm, formValueSelector } from 'redux-form'; </s> remove import { renderField, renderRadioField, renderSelectField, renderServiceField, ip, mac, required } from '../../../helpers/form';
import { CLIENT_ID, SERVICES } from '../../../helpers/constants';
</s> add import {
renderField,
renderGroupField,
renderSelectField,
renderServiceField,
} from '../../../helpers/form';
import { SERVICES } from '../../../helpers/constants'; </s> remove import { MODAL_TYPE, CLIENT_ID } from '../../../helpers/constants';
</s> add import { MODAL_TYPE } from '../../../helpers/constants'; </s> remove import { CLIENT_ID } from '../helpers/constants';
</s> add | [
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156 | client/src/helpers/formatClientCell.js |
const clientInfo = getClientInfo(clients, value) || getAutoClientInfo(autoClients, value); | <mask> );
<mask> };
<mask>
<mask> export const formatClientCell = (value, clients, autoClients, t) => {
<mask> const clientInfo = getClientInfo(clients, value) || getClientInfo(autoClients, value);
<mask> const { name, whois } = clientInfo;
<mask> let whoisContainer = '';
<mask> let nameContainer = value;
<mask>
<mask> if (name) {
</s> + client: add multiple fields client form </s> remove let data;
if (config.identifier === CLIENT_ID.MAC) {
const { ip, identifier, ...values } = config;
data = { name, data: { ...values } };
} else {
const { mac, identifier, ...values } = config;
data = { name, data: { ...values } };
}
</s> add const data = { name, data: { ...config } }; </s> remove let data;
if (config.identifier === CLIENT_ID.MAC) {
const { ip, identifier, ...values } = config;
data = { ...values };
} else {
const { mac, identifier, ...values } = config;
data = { ...values };
}
await apiClient.addClient(data);
</s> add await apiClient.addClient(config); </s> remove if (row.original && row.original.mac) {
return (
<div className="logs__row logs__row--overflow">
<span className="logs__text" title={row.original.mac}>
{row.original.mac} <em>(MAC)</em>
</span>
</div>
);
} else if (row.value) {
return (
<div className="logs__row logs__row--overflow">
<span className="logs__text" title={row.value}>
{row.value} <em>(IP)</em>
</span>
</div>
);
}
</s> add const { value } = row; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156 | client/src/helpers/formatClientCell.js |
const client = clients
.find(item => item.ip_addrs && item.ip_addrs.find(clientIp => clientIp === ip));
if (!client) {
return '';
}
const { name, whois_info } = client;
const whois = Object.keys(whois_info).length > 0 ? whois_info : '';
return { name, whois };
};
export const getAutoClientInfo = (clients, ip) => { | <mask>
<mask> export const normalizeTextarea = text => text && text.replace(/[;, ]/g, '\n').split('\n').filter(n => n);
<mask>
<mask> export const getClientInfo = (clients, ip) => {
<mask> const client = clients.find(item => ip === item.ip);
<mask>
<mask> if (!client) {
<mask> return '';
<mask> }
</s> + client: add multiple fields client form </s> remove const identifier = client.mac ? CLIENT_ID.MAC : CLIENT_ID.IP;
</s> add </s> remove let data;
if (config.identifier === CLIENT_ID.MAC) {
const { ip, identifier, ...values } = config;
data = { ...values };
} else {
const { mac, identifier, ...values } = config;
data = { ...values };
}
await apiClient.addClient(data);
</s> add await apiClient.addClient(config); </s> remove const clientInfo = getClientInfo(clients, value) || getClientInfo(autoClients, value);
</s> add const clientInfo = getClientInfo(clients, value) || getAutoClientInfo(autoClients, value); </s> remove let data;
if (config.identifier === CLIENT_ID.MAC) {
const { ip, identifier, ...values } = config;
data = { name, data: { ...values } };
} else {
const { mac, identifier, ...values } = config;
data = { name, data: { ...values } };
}
</s> add const data = { name, data: { ...config } }; | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d6e9ec9ef0f6c13e88f1785366ba8e5cf08156 | client/src/helpers/helpers.js |
<mask> ParentalEnabled bool
<mask> ServicesRules []ServiceEntry
<mask> }
<mask>
<mask> // RewriteEntry is a rewrite array element
<mask> type RewriteEntry struct {
<mask> Domain string `yaml:"domain"`
<mask> Answer string `yaml:"answer"` // IP address or canonical name
<mask> }
<mask>
<mask> // Config allows you to configure DNS filtering with New() or just change variables directly.
<mask> type Config struct {
<mask> ParentalSensitivity int `yaml:"parental_sensitivity"` // must be either 3, 10, 13 or 17
<mask> ParentalEnabled bool `yaml:"parental_enabled"`
<mask> SafeSearchEnabled bool `yaml:"safesearch_enabled"`
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove ParentalSensitivity int `yaml:"parental_sensitivity"` // must be either 3, 10, 13 or 17
</s> add </s> remove // Return TRUE of host name matches a wildcard pattern
func matchDomainWildcard(host, wildcard string) bool {
return len(wildcard) >= 2 &&
wildcard[0] == '*' && wildcard[1] == '.' &&
strings.HasSuffix(host, wildcard[1:])
}
</s> add </s> remove // . Find CNAME for a domain name
</s> add // . Find CNAME for a domain name (exact match or by wildcard) </s> remove // . Find A or AAAA record for a domain name
</s> add // . repeat for the new domain name (Note: we return only the last CNAME)
// . Find A or AAAA record for a domain name (exact match or by wildcard) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/dnsfilter.go | |
<mask> }
<mask>
<mask> // Config allows you to configure DNS filtering with New() or just change variables directly.
<mask> type Config struct {
<mask> ParentalSensitivity int `yaml:"parental_sensitivity"` // must be either 3, 10, 13 or 17
<mask> ParentalEnabled bool `yaml:"parental_enabled"`
<mask> SafeSearchEnabled bool `yaml:"safesearch_enabled"`
<mask> SafeBrowsingEnabled bool `yaml:"safebrowsing_enabled"`
<mask> ResolverAddress string `yaml:"-"` // DNS server address
<mask>
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove // RewriteEntry is a rewrite array element
type RewriteEntry struct {
Domain string `yaml:"domain"`
Answer string `yaml:"answer"` // IP address or canonical name
}
</s> add </s> remove // Return TRUE of host name matches a wildcard pattern
func matchDomainWildcard(host, wildcard string) bool {
return len(wildcard) >= 2 &&
wildcard[0] == '*' && wildcard[1] == '.' &&
strings.HasSuffix(host, wildcard[1:])
}
</s> add </s> remove parameters, err := parseParametersFromBody(r.Body)
if err != nil {
httpError(r, w, http.StatusBadRequest, "failed to parse parameters from body: %s", err)
return
}
sensitivity, ok := parameters["sensitivity"]
if !ok {
http.Error(w, "Sensitivity parameter was not specified", 400)
return
}
switch sensitivity {
case "3":
break
case "EARLY_CHILDHOOD":
sensitivity = "3"
case "10":
break
case "YOUNG":
sensitivity = "10"
case "13":
break
case "TEEN":
sensitivity = "13"
case "17":
break
case "MATURE":
sensitivity = "17"
default:
http.Error(w, "Sensitivity must be set to valid value", 400)
return
}
i, err := strconv.Atoi(sensitivity)
if err != nil {
http.Error(w, "Sensitivity must be set to valid value", 400)
return
}
d.Config.ParentalSensitivity = i
</s> add </s> remove // . Find CNAME for a domain name
</s> add // . Find CNAME for a domain name (exact match or by wildcard) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/dnsfilter.go | |
d.confLock.Lock() | <mask>
<mask> // WriteDiskConfig - write configuration
<mask> func (d *Dnsfilter) WriteDiskConfig(c *Config) {
<mask> *c = d.Config
<mask> c.Rewrites = rewriteArrayDup(d.Config.Rewrites)
<mask> d.confLock.Unlock()
<mask> }
<mask>
<mask> // SetFilters - set new filters (synchronously or asynchronously)
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove parameters, err := parseParametersFromBody(r.Body)
if err != nil {
httpError(r, w, http.StatusBadRequest, "failed to parse parameters from body: %s", err)
return
}
sensitivity, ok := parameters["sensitivity"]
if !ok {
http.Error(w, "Sensitivity parameter was not specified", 400)
return
}
switch sensitivity {
case "3":
break
case "EARLY_CHILDHOOD":
sensitivity = "3"
case "10":
break
case "YOUNG":
sensitivity = "10"
case "13":
break
case "TEEN":
sensitivity = "13"
case "17":
break
case "MATURE":
sensitivity = "17"
default:
http.Error(w, "Sensitivity must be set to valid value", 400)
return
}
i, err := strconv.Atoi(sensitivity)
if err != nil {
http.Error(w, "Sensitivity must be set to valid value", 400)
return
}
d.Config.ParentalSensitivity = i
</s> add </s> remove // . Find A or AAAA record for a domain name
</s> add // . repeat for the new domain name (Note: we return only the last CNAME)
// . Find A or AAAA record for a domain name (exact match or by wildcard) </s> remove // . Find CNAME for a domain name
</s> add // . Find CNAME for a domain name (exact match or by wildcard) | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/dnsfilter.go |
c.Rewrites = rewriteArrayDup(d.Config.Rewrites)
d.confLock.Unlock() | <mask> func (d *Dnsfilter) WriteDiskConfig(c *Config) {
<mask> d.confLock.Lock()
<mask> *c = d.Config
<mask> }
<mask>
<mask> // SetFilters - set new filters (synchronously or asynchronously)
<mask> // When filters are set asynchronously, the old filters continue working until the new filters are ready.
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove // . Find A or AAAA record for a domain name
</s> add // . repeat for the new domain name (Note: we return only the last CNAME)
// . Find A or AAAA record for a domain name (exact match or by wildcard) </s> remove d.ParentalSensitivity = 3
</s> add </s> remove parameters, err := parseParametersFromBody(r.Body)
if err != nil {
httpError(r, w, http.StatusBadRequest, "failed to parse parameters from body: %s", err)
return
}
sensitivity, ok := parameters["sensitivity"]
if !ok {
http.Error(w, "Sensitivity parameter was not specified", 400)
return
}
switch sensitivity {
case "3":
break
case "EARLY_CHILDHOOD":
sensitivity = "3"
case "10":
break
case "YOUNG":
sensitivity = "10"
case "13":
break
case "TEEN":
sensitivity = "13"
case "17":
break
case "MATURE":
sensitivity = "17"
default:
http.Error(w, "Sensitivity must be set to valid value", 400)
return
}
i, err := strconv.Atoi(sensitivity)
if err != nil {
http.Error(w, "Sensitivity must be set to valid value", 400)
return
}
d.Config.ParentalSensitivity = i
</s> add | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/dnsfilter.go |
<mask>
<mask> return Result{}, nil
<mask> }
<mask>
<mask> // Return TRUE of host name matches a wildcard pattern
<mask> func matchDomainWildcard(host, wildcard string) bool {
<mask> return len(wildcard) >= 2 &&
<mask> wildcard[0] == '*' && wildcard[1] == '.' &&
<mask> strings.HasSuffix(host, wildcard[1:])
<mask> }
<mask>
<mask> // Process rewrites table
<mask> // . Find CNAME for a domain name
<mask> // . if found, set domain name to canonical name
<mask> // . Find A or AAAA record for a domain name
<mask> // . if found, return IP addresses
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove // . Find CNAME for a domain name
</s> add // . Find CNAME for a domain name (exact match or by wildcard) </s> remove // . Find A or AAAA record for a domain name
</s> add // . repeat for the new domain name (Note: we return only the last CNAME)
// . Find A or AAAA record for a domain name (exact match or by wildcard) </s> remove for _, r := range d.Rewrites {
if r.Domain != host {
if !matchDomainWildcard(host, r.Domain) {
continue
}
}
ip := net.ParseIP(r.Answer)
if ip == nil {
continue
}
ip4 := ip.To4()
if qtype == dns.TypeA && ip4 != nil {
res.IPList = append(res.IPList, ip4)
log.Debug("Rewrite: A for %s is %s", host, ip4)
} else if qtype == dns.TypeAAAA && ip4 == nil {
res.IPList = append(res.IPList, ip)
log.Debug("Rewrite: AAAA for %s is %s", host, ip)
</s> add cnames := map[string]bool{}
origHost := host
for len(rr) != 0 && rr[0].Type == dns.TypeCNAME {
log.Debug("Rewrite: CNAME for %s is %s", host, rr[0].Answer)
host = rr[0].Answer
_, ok := cnames[host]
if ok {
log.Info("Rewrite: breaking CNAME redirection loop: %s. Question: %s", host, origHost)
return res </s> remove // RewriteEntry is a rewrite array element
type RewriteEntry struct {
Domain string `yaml:"domain"`
Answer string `yaml:"answer"` // IP address or canonical name
}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/dnsfilter.go | |
// . Find CNAME for a domain name (exact match or by wildcard) | <mask> strings.HasSuffix(host, wildcard[1:])
<mask> }
<mask>
<mask> // Process rewrites table
<mask> // . Find CNAME for a domain name
<mask> // . if found, set domain name to canonical name
<mask> // . Find A or AAAA record for a domain name
<mask> // . if found, return IP addresses
<mask> func (d *Dnsfilter) processRewrites(host string, qtype uint16) Result {
<mask> var res Result
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove // . Find A or AAAA record for a domain name
</s> add // . repeat for the new domain name (Note: we return only the last CNAME)
// . Find A or AAAA record for a domain name (exact match or by wildcard) </s> remove // Return TRUE of host name matches a wildcard pattern
func matchDomainWildcard(host, wildcard string) bool {
return len(wildcard) >= 2 &&
wildcard[0] == '*' && wildcard[1] == '.' &&
strings.HasSuffix(host, wildcard[1:])
}
</s> add </s> remove // RewriteEntry is a rewrite array element
type RewriteEntry struct {
Domain string `yaml:"domain"`
Answer string `yaml:"answer"` // IP address or canonical name
}
</s> add </s> remove for _, r := range d.Rewrites {
if r.Domain != host {
if !matchDomainWildcard(host, r.Domain) {
continue
}
}
ip := net.ParseIP(r.Answer)
if ip == nil {
continue
}
ip4 := ip.To4()
if qtype == dns.TypeA && ip4 != nil {
res.IPList = append(res.IPList, ip4)
log.Debug("Rewrite: A for %s is %s", host, ip4)
} else if qtype == dns.TypeAAAA && ip4 == nil {
res.IPList = append(res.IPList, ip)
log.Debug("Rewrite: AAAA for %s is %s", host, ip)
</s> add cnames := map[string]bool{}
origHost := host
for len(rr) != 0 && rr[0].Type == dns.TypeCNAME {
log.Debug("Rewrite: CNAME for %s is %s", host, rr[0].Answer)
host = rr[0].Answer
_, ok := cnames[host]
if ok {
log.Info("Rewrite: breaking CNAME redirection loop: %s. Question: %s", host, origHost)
return res | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/dnsfilter.go |
// . repeat for the new domain name (Note: we return only the last CNAME)
// . Find A or AAAA record for a domain name (exact match or by wildcard) | <mask>
<mask> // Process rewrites table
<mask> // . Find CNAME for a domain name
<mask> // . if found, set domain name to canonical name
<mask> // . Find A or AAAA record for a domain name
<mask> // . if found, return IP addresses
<mask> func (d *Dnsfilter) processRewrites(host string, qtype uint16) Result {
<mask> var res Result
<mask>
<mask> d.confLock.RLock()
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove // . Find CNAME for a domain name
</s> add // . Find CNAME for a domain name (exact match or by wildcard) </s> remove // Return TRUE of host name matches a wildcard pattern
func matchDomainWildcard(host, wildcard string) bool {
return len(wildcard) >= 2 &&
wildcard[0] == '*' && wildcard[1] == '.' &&
strings.HasSuffix(host, wildcard[1:])
}
</s> add </s> remove // RewriteEntry is a rewrite array element
type RewriteEntry struct {
Domain string `yaml:"domain"`
Answer string `yaml:"answer"` // IP address or canonical name
}
</s> add </s> remove for _, r := range d.Rewrites {
if r.Domain != host {
if !matchDomainWildcard(host, r.Domain) {
continue
}
}
ip := net.ParseIP(r.Answer)
if ip == nil {
continue
}
ip4 := ip.To4()
if qtype == dns.TypeA && ip4 != nil {
res.IPList = append(res.IPList, ip4)
log.Debug("Rewrite: A for %s is %s", host, ip4)
} else if qtype == dns.TypeAAAA && ip4 == nil {
res.IPList = append(res.IPList, ip)
log.Debug("Rewrite: AAAA for %s is %s", host, ip)
</s> add cnames := map[string]bool{}
origHost := host
for len(rr) != 0 && rr[0].Type == dns.TypeCNAME {
log.Debug("Rewrite: CNAME for %s is %s", host, rr[0].Answer)
host = rr[0].Answer
_, ok := cnames[host]
if ok {
log.Info("Rewrite: breaking CNAME redirection loop: %s. Question: %s", host, origHost)
return res | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/dnsfilter.go |
rr := findRewrites(d.Rewrites, host)
if len(rr) != 0 {
res.Reason = ReasonRewrite | <mask>
<mask> d.confLock.RLock()
<mask> defer d.confLock.RUnlock()
<mask>
<mask> for _, r := range d.Rewrites {
<mask> if r.Domain != host {
<mask> if !matchDomainWildcard(host, r.Domain) {
<mask> continue
<mask> }
<mask> }
<mask>
<mask> ip := net.ParseIP(r.Answer)
<mask> if ip == nil {
<mask> log.Debug("Rewrite: CNAME for %s is %s", host, r.Answer)
<mask> host = r.Answer
<mask> res.CanonName = r.Answer
<mask> res.Reason = ReasonRewrite
<mask> break
<mask> }
<mask> }
<mask>
<mask> for _, r := range d.Rewrites {
<mask> if r.Domain != host {
<mask> if !matchDomainWildcard(host, r.Domain) {
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove for _, r := range d.Rewrites {
if r.Domain != host {
if !matchDomainWildcard(host, r.Domain) {
continue
}
}
ip := net.ParseIP(r.Answer)
if ip == nil {
continue
}
ip4 := ip.To4()
if qtype == dns.TypeA && ip4 != nil {
res.IPList = append(res.IPList, ip4)
log.Debug("Rewrite: A for %s is %s", host, ip4)
} else if qtype == dns.TypeAAAA && ip4 == nil {
res.IPList = append(res.IPList, ip)
log.Debug("Rewrite: AAAA for %s is %s", host, ip)
</s> add cnames := map[string]bool{}
origHost := host
for len(rr) != 0 && rr[0].Type == dns.TypeCNAME {
log.Debug("Rewrite: CNAME for %s is %s", host, rr[0].Answer)
host = rr[0].Answer
_, ok := cnames[host]
if ok {
log.Info("Rewrite: breaking CNAME redirection loop: %s. Question: %s", host, origHost)
return res </s> remove if len(res.IPList) != 0 {
res.Reason = ReasonRewrite
</s> add for _, r := range rr {
if r.Type != dns.TypeCNAME && r.Type == qtype {
res.IPList = append(res.IPList, r.IP)
log.Debug("Rewrite: A/AAAA for %s is %s", host, r.IP)
} </s> remove if ent == entDel {
</s> add if ent.equals(entDel) { </s> remove func parseParametersFromBody(r io.Reader) (map[string]string, error) {
parameters := map[string]string{}
scanner := bufio.NewScanner(r)
for scanner.Scan() {
line := scanner.Text()
if len(line) == 0 {
// skip empty lines
continue
}
parts := strings.SplitN(line, "=", 2)
if len(parts) != 2 {
return parameters, errors.New("Got invalid request body")
}
parameters[strings.TrimSpace(parts[0])] = strings.TrimSpace(parts[1])
}
return parameters, nil
}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/dnsfilter.go |
cnames := map[string]bool{}
origHost := host
for len(rr) != 0 && rr[0].Type == dns.TypeCNAME {
log.Debug("Rewrite: CNAME for %s is %s", host, rr[0].Answer)
host = rr[0].Answer
_, ok := cnames[host]
if ok {
log.Info("Rewrite: breaking CNAME redirection loop: %s. Question: %s", host, origHost)
return res | <mask> break
<mask> }
<mask> }
<mask>
<mask> for _, r := range d.Rewrites {
<mask> if r.Domain != host {
<mask> if !matchDomainWildcard(host, r.Domain) {
<mask> continue
<mask> }
<mask> }
<mask>
<mask> ip := net.ParseIP(r.Answer)
<mask> if ip == nil {
<mask> continue
<mask> }
<mask> ip4 := ip.To4()
<mask>
<mask> if qtype == dns.TypeA && ip4 != nil {
<mask> res.IPList = append(res.IPList, ip4)
<mask> log.Debug("Rewrite: A for %s is %s", host, ip4)
<mask>
<mask> } else if qtype == dns.TypeAAAA && ip4 == nil {
<mask> res.IPList = append(res.IPList, ip)
<mask> log.Debug("Rewrite: AAAA for %s is %s", host, ip)
<mask> }
<mask> }
<mask>
<mask> if len(res.IPList) != 0 {
<mask> res.Reason = ReasonRewrite
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove if len(res.IPList) != 0 {
res.Reason = ReasonRewrite
</s> add for _, r := range rr {
if r.Type != dns.TypeCNAME && r.Type == qtype {
res.IPList = append(res.IPList, r.IP)
log.Debug("Rewrite: A/AAAA for %s is %s", host, r.IP)
} </s> remove for _, r := range d.Rewrites {
if r.Domain != host {
if !matchDomainWildcard(host, r.Domain) {
continue
}
}
ip := net.ParseIP(r.Answer)
if ip == nil {
log.Debug("Rewrite: CNAME for %s is %s", host, r.Answer)
host = r.Answer
res.CanonName = r.Answer
res.Reason = ReasonRewrite
break
}
</s> add rr := findRewrites(d.Rewrites, host)
if len(rr) != 0 {
res.Reason = ReasonRewrite </s> remove if ent == entDel {
</s> add if ent.equals(entDel) { </s> remove func parseParametersFromBody(r io.Reader) (map[string]string, error) {
parameters := map[string]string{}
scanner := bufio.NewScanner(r)
for scanner.Scan() {
line := scanner.Text()
if len(line) == 0 {
// skip empty lines
continue
}
parts := strings.SplitN(line, "=", 2)
if len(parts) != 2 {
return parameters, errors.New("Got invalid request body")
}
parameters[strings.TrimSpace(parts[0])] = strings.TrimSpace(parts[1])
}
return parameters, nil
}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep"... | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/dnsfilter.go |
cnames[host] = false
res.CanonName = rr[0].Answer
rr = findRewrites(d.Rewrites, host) | <mask> return res
<mask> }
<mask> }
<mask>
<mask> for _, r := range rr {
<mask> if r.Type != dns.TypeCNAME && r.Type == qtype {
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove if len(res.IPList) != 0 {
res.Reason = ReasonRewrite
</s> add for _, r := range rr {
if r.Type != dns.TypeCNAME && r.Type == qtype {
res.IPList = append(res.IPList, r.IP)
log.Debug("Rewrite: A/AAAA for %s is %s", host, r.IP)
} </s> remove for _, r := range d.Rewrites {
if r.Domain != host {
if !matchDomainWildcard(host, r.Domain) {
continue
}
}
ip := net.ParseIP(r.Answer)
if ip == nil {
continue
}
ip4 := ip.To4()
if qtype == dns.TypeA && ip4 != nil {
res.IPList = append(res.IPList, ip4)
log.Debug("Rewrite: A for %s is %s", host, ip4)
} else if qtype == dns.TypeAAAA && ip4 == nil {
res.IPList = append(res.IPList, ip)
log.Debug("Rewrite: AAAA for %s is %s", host, ip)
</s> add cnames := map[string]bool{}
origHost := host
for len(rr) != 0 && rr[0].Type == dns.TypeCNAME {
log.Debug("Rewrite: CNAME for %s is %s", host, rr[0].Answer)
host = rr[0].Answer
_, ok := cnames[host]
if ok {
log.Info("Rewrite: breaking CNAME redirection loop: %s. Question: %s", host, origHost)
return res </s> remove for _, r := range d.Rewrites {
if r.Domain != host {
if !matchDomainWildcard(host, r.Domain) {
continue
}
}
ip := net.ParseIP(r.Answer)
if ip == nil {
log.Debug("Rewrite: CNAME for %s is %s", host, r.Answer)
host = r.Answer
res.CanonName = r.Answer
res.Reason = ReasonRewrite
break
}
</s> add rr := findRewrites(d.Rewrites, host)
if len(rr) != 0 {
res.Reason = ReasonRewrite </s> remove if ent == entDel {
</s> add if ent.equals(entDel) { </s> remove func parseParametersFromBody(r io.Reader) (map[string]string, error) {
parameters := map[string]string{}
scanner := bufio.NewScanner(r)
for scanner.Scan() {
line := scanner.Text()
if len(line) == 0 {
// skip empty lines
continue
}
parts := strings.SplitN(line, "=", 2)
if len(parts) != 2 {
return parameters, errors.New("Got invalid request body")
}
parameters[strings.TrimSpace(parts[0])] = strings.TrimSpace(parts[1])
}
return parameters, nil
}
</s> add | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/dnsfilter.go |
for _, r := range rr {
if r.Type != dns.TypeCNAME && r.Type == qtype {
res.IPList = append(res.IPList, r.IP)
log.Debug("Rewrite: A/AAAA for %s is %s", host, r.IP)
} | <mask> log.Debug("Rewrite: AAAA for %s is %s", host, ip)
<mask> }
<mask> }
<mask>
<mask> if len(res.IPList) != 0 {
<mask> res.Reason = ReasonRewrite
<mask> }
<mask>
<mask> return res
<mask> }
<mask>
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove for _, r := range d.Rewrites {
if r.Domain != host {
if !matchDomainWildcard(host, r.Domain) {
continue
}
}
ip := net.ParseIP(r.Answer)
if ip == nil {
continue
}
ip4 := ip.To4()
if qtype == dns.TypeA && ip4 != nil {
res.IPList = append(res.IPList, ip4)
log.Debug("Rewrite: A for %s is %s", host, ip4)
} else if qtype == dns.TypeAAAA && ip4 == nil {
res.IPList = append(res.IPList, ip)
log.Debug("Rewrite: AAAA for %s is %s", host, ip)
</s> add cnames := map[string]bool{}
origHost := host
for len(rr) != 0 && rr[0].Type == dns.TypeCNAME {
log.Debug("Rewrite: CNAME for %s is %s", host, rr[0].Answer)
host = rr[0].Answer
_, ok := cnames[host]
if ok {
log.Info("Rewrite: breaking CNAME redirection loop: %s. Question: %s", host, origHost)
return res </s> remove for _, r := range d.Rewrites {
if r.Domain != host {
if !matchDomainWildcard(host, r.Domain) {
continue
}
}
ip := net.ParseIP(r.Answer)
if ip == nil {
log.Debug("Rewrite: CNAME for %s is %s", host, r.Answer)
host = r.Answer
res.CanonName = r.Answer
res.Reason = ReasonRewrite
break
}
</s> add rr := findRewrites(d.Rewrites, host)
if len(rr) != 0 {
res.Reason = ReasonRewrite </s> remove func parseParametersFromBody(r io.Reader) (map[string]string, error) {
parameters := map[string]string{}
scanner := bufio.NewScanner(r)
for scanner.Scan() {
line := scanner.Text()
if len(line) == 0 {
// skip empty lines
continue
}
parts := strings.SplitN(line, "=", 2)
if len(parts) != 2 {
return parameters, errors.New("Got invalid request body")
}
parameters[strings.TrimSpace(parts[0])] = strings.TrimSpace(parts[1])
}
return parameters, nil
}
</s> add </s> remove if ent == entDel {
</s> add if ent.equals(entDel) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/dnsfilter.go |
d.prepareRewrites() | <mask>
<mask> if c != nil {
<mask> d.Config = *c
<mask> }
<mask>
<mask> if filters != nil {
<mask> err := d.initFiltering(filters)
<mask> if err != nil {
<mask> log.Error("Can't initialize filtering subsystem: %s", err)
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove if d.Config.ParentalEnabled {
data["sensitivity"] = d.Config.ParentalSensitivity
}
</s> add </s> remove func parseParametersFromBody(r io.Reader) (map[string]string, error) {
parameters := map[string]string{}
scanner := bufio.NewScanner(r)
for scanner.Scan() {
line := scanner.Text()
if len(line) == 0 {
// skip empty lines
continue
}
parts := strings.SplitN(line, "=", 2)
if len(parts) != 2 {
return parameters, errors.New("Got invalid request body")
}
parameters[strings.TrimSpace(parts[0])] = strings.TrimSpace(parts[1])
}
return parameters, nil
}
</s> add </s> remove parameters, err := parseParametersFromBody(r.Body)
if err != nil {
httpError(r, w, http.StatusBadRequest, "failed to parse parameters from body: %s", err)
return
}
sensitivity, ok := parameters["sensitivity"]
if !ok {
http.Error(w, "Sensitivity parameter was not specified", 400)
return
}
switch sensitivity {
case "3":
break
case "EARLY_CHILDHOOD":
sensitivity = "3"
case "10":
break
case "YOUNG":
sensitivity = "10"
case "13":
break
case "TEEN":
sensitivity = "13"
case "17":
break
case "MATURE":
sensitivity = "17"
default:
http.Error(w, "Sensitivity must be set to valid value", 400)
return
}
i, err := strconv.Atoi(sensitivity)
if err != nil {
http.Error(w, "Sensitivity must be set to valid value", 400)
return
}
d.Config.ParentalSensitivity = i
</s> add </s> remove for _, r := range d.Rewrites {
if r.Domain != host {
if !matchDomainWildcard(host, r.Domain) {
continue
}
}
ip := net.ParseIP(r.Answer)
if ip == nil {
continue
}
ip4 := ip.To4()
if qtype == dns.TypeA && ip4 != nil {
res.IPList = append(res.IPList, ip4)
log.Debug("Rewrite: A for %s is %s", host, ip4)
} else if qtype == dns.TypeAAAA && ip4 == nil {
res.IPList = append(res.IPList, ip)
log.Debug("Rewrite: AAAA for %s is %s", host, ip)
</s> add cnames := map[string]bool{}
origHost := host
for len(rr) != 0 && rr[0].Type == dns.TypeCNAME {
log.Debug("Rewrite: CNAME for %s is %s", host, rr[0].Answer)
host = rr[0].Answer
_, ok := cnames[host]
if ok {
log.Info("Rewrite: breaking CNAME redirection loop: %s. Question: %s", host, origHost)
return res </s> remove for _, r := range d.Rewrites {
if r.Domain != host {
if !matchDomainWildcard(host, r.Domain) {
continue
}
}
ip := net.ParseIP(r.Answer)
if ip == nil {
log.Debug("Rewrite: CNAME for %s is %s", host, r.Answer)
host = r.Answer
res.CanonName = r.Answer
res.Reason = ReasonRewrite
break
}
</s> add rr := findRewrites(d.Rewrites, host)
if len(rr) != 0 {
res.Reason = ReasonRewrite | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/dnsfilter.go |
<mask>
<mask> func TestParentalControl(t *testing.T) {
<mask> d := NewForTest(&Config{ParentalEnabled: true}, nil)
<mask> defer d.Close()
<mask> d.ParentalSensitivity = 3
<mask> d.checkMatch(t, "pornhub.com")
<mask> d.checkMatch(t, "www.pornhub.com")
<mask> d.checkMatchEmpty(t, "www.yandex.ru")
<mask> d.checkMatchEmpty(t, "yandex.ru")
<mask> d.checkMatchEmpty(t, "api.jquery.com")
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove d.ParentalSensitivity = 3
</s> add </s> remove RewriteEntry{"somecname", "somehost.com"},
RewriteEntry{"somehost.com", "0.0.0.0"},
</s> add RewriteEntry{"somecname", "somehost.com", 0, nil},
RewriteEntry{"somehost.com", "0.0.0.0", 0, nil}, </s> remove for _, r := range d.Rewrites {
if r.Domain != host {
if !matchDomainWildcard(host, r.Domain) {
continue
}
}
ip := net.ParseIP(r.Answer)
if ip == nil {
log.Debug("Rewrite: CNAME for %s is %s", host, r.Answer)
host = r.Answer
res.CanonName = r.Answer
res.Reason = ReasonRewrite
break
}
</s> add rr := findRewrites(d.Rewrites, host)
if len(rr) != 0 {
res.Reason = ReasonRewrite </s> remove parameters, err := parseParametersFromBody(r.Body)
if err != nil {
httpError(r, w, http.StatusBadRequest, "failed to parse parameters from body: %s", err)
return
}
sensitivity, ok := parameters["sensitivity"]
if !ok {
http.Error(w, "Sensitivity parameter was not specified", 400)
return
}
switch sensitivity {
case "3":
break
case "EARLY_CHILDHOOD":
sensitivity = "3"
case "10":
break
case "YOUNG":
sensitivity = "10"
case "13":
break
case "TEEN":
sensitivity = "13"
case "17":
break
case "MATURE":
sensitivity = "17"
default:
http.Error(w, "Sensitivity must be set to valid value", 400)
return
}
i, err := strconv.Atoi(sensitivity)
if err != nil {
http.Error(w, "Sensitivity must be set to valid value", 400)
return
}
d.Config.ParentalSensitivity = i
</s> add </s> remove if d.Config.ParentalEnabled {
data["sensitivity"] = d.Config.ParentalSensitivity
}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/dnsfilter_test.go | |
<mask> filters := make(map[int]string)
<mask> filters[0] = "||example.org^\n"
<mask> d := NewForTest(&Config{ParentalEnabled: true, SafeBrowsingEnabled: false}, filters)
<mask> defer d.Close()
<mask> d.ParentalSensitivity = 3
<mask>
<mask> // no client settings:
<mask>
<mask> // blocked by filters
<mask> r, _ = d.CheckHost("example.org", dns.TypeA, &setts)
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove d.ParentalSensitivity = 3
</s> add </s> remove RewriteEntry{"somecname", "somehost.com"},
RewriteEntry{"somehost.com", "0.0.0.0"},
</s> add RewriteEntry{"somecname", "somehost.com", 0, nil},
RewriteEntry{"somehost.com", "0.0.0.0", 0, nil}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/dnsfilter_test.go | |
RewriteEntry{"somecname", "somehost.com", 0, nil},
RewriteEntry{"somehost.com", "0.0.0.0", 0, nil}, | <mask> func TestRewrites(t *testing.T) {
<mask> d := Dnsfilter{}
<mask> // CNAME, A, AAAA
<mask> d.Rewrites = []RewriteEntry{
<mask> RewriteEntry{"somecname", "somehost.com"},
<mask> RewriteEntry{"somehost.com", "0.0.0.0"},
<mask>
<mask> RewriteEntry{"host.com", "1.2.3.4"},
<mask> RewriteEntry{"host.com", "1.2.3.5"},
<mask> RewriteEntry{"host.com", "1:2:3::4"},
<mask> RewriteEntry{"www.host.com", "host.com"},
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove RewriteEntry{"host.com", "1.2.3.4"},
RewriteEntry{"host.com", "1.2.3.5"},
RewriteEntry{"host.com", "1:2:3::4"},
RewriteEntry{"www.host.com", "host.com"},
</s> add RewriteEntry{"host.com", "1.2.3.4", 0, nil},
RewriteEntry{"host.com", "1.2.3.5", 0, nil},
RewriteEntry{"host.com", "1:2:3::4", 0, nil},
RewriteEntry{"www.host.com", "host.com", 0, nil}, </s> remove RewriteEntry{"*.host.com", "1.2.3.5"},
RewriteEntry{"host.com", "1.2.3.4"},
</s> add RewriteEntry{"host.com", "1.2.3.4", 0, nil},
RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, </s> remove RewriteEntry{"*.host.com", "host.com"},
RewriteEntry{"host.com", "1.2.3.4"},
</s> add RewriteEntry{"host.com", "1.2.3.4", 0, nil},
RewriteEntry{"*.host.com", "host.com", 0, nil}, </s> remove d.ParentalSensitivity = 3
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/dnsfilter_test.go |
RewriteEntry{"host.com", "1.2.3.4", 0, nil},
RewriteEntry{"host.com", "1.2.3.5", 0, nil},
RewriteEntry{"host.com", "1:2:3::4", 0, nil},
RewriteEntry{"www.host.com", "host.com", 0, nil}, | <mask> d.Rewrites = []RewriteEntry{
<mask> RewriteEntry{"somecname", "somehost.com"},
<mask> RewriteEntry{"somehost.com", "0.0.0.0"},
<mask>
<mask> RewriteEntry{"host.com", "1.2.3.4"},
<mask> RewriteEntry{"host.com", "1.2.3.5"},
<mask> RewriteEntry{"host.com", "1:2:3::4"},
<mask> RewriteEntry{"www.host.com", "host.com"},
<mask> }
<mask> r := d.processRewrites("host2.com", dns.TypeA)
<mask> assert.Equal(t, NotFilteredNotFound, r.Reason)
<mask>
<mask> r = d.processRewrites("www.host.com", dns.TypeA)
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove RewriteEntry{"somecname", "somehost.com"},
RewriteEntry{"somehost.com", "0.0.0.0"},
</s> add RewriteEntry{"somecname", "somehost.com", 0, nil},
RewriteEntry{"somehost.com", "0.0.0.0", 0, nil}, </s> remove RewriteEntry{"*.host.com", "host.com"},
RewriteEntry{"host.com", "1.2.3.4"},
</s> add RewriteEntry{"host.com", "1.2.3.4", 0, nil},
RewriteEntry{"*.host.com", "host.com", 0, nil}, </s> remove RewriteEntry{"*.host.com", "1.2.3.5"},
RewriteEntry{"host.com", "1.2.3.4"},
</s> add RewriteEntry{"host.com", "1.2.3.4", 0, nil},
RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/dnsfilter_test.go |
d.prepareRewrites() | <mask> RewriteEntry{"host.com", "1.2.3.5", 0, nil},
<mask> RewriteEntry{"host.com", "1:2:3::4", 0, nil},
<mask> RewriteEntry{"www.host.com", "host.com", 0, nil},
<mask> }
<mask> r := d.processRewrites("host2.com", dns.TypeA)
<mask> assert.Equal(t, NotFilteredNotFound, r.Reason)
<mask>
<mask> r = d.processRewrites("www.host.com", dns.TypeA)
<mask> assert.Equal(t, ReasonRewrite, r.Reason)
<mask> assert.Equal(t, "host.com", r.CanonName)
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove RewriteEntry{"host.com", "1.2.3.4"},
RewriteEntry{"host.com", "1.2.3.5"},
RewriteEntry{"host.com", "1:2:3::4"},
RewriteEntry{"www.host.com", "host.com"},
</s> add RewriteEntry{"host.com", "1.2.3.4", 0, nil},
RewriteEntry{"host.com", "1.2.3.5", 0, nil},
RewriteEntry{"host.com", "1:2:3::4", 0, nil},
RewriteEntry{"www.host.com", "host.com", 0, nil}, </s> remove RewriteEntry{"*.host.com", "host.com"},
RewriteEntry{"host.com", "1.2.3.4"},
</s> add RewriteEntry{"host.com", "1.2.3.4", 0, nil},
RewriteEntry{"*.host.com", "host.com", 0, nil}, | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/dnsfilter_test.go |
RewriteEntry{"host.com", "1.2.3.4", 0, nil},
RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, | <mask> assert.True(t, r.IPList[0].Equal(net.ParseIP("1:2:3::4")))
<mask>
<mask> // wildcard
<mask> d.Rewrites = []RewriteEntry{
<mask> RewriteEntry{"*.host.com", "1.2.3.5"},
<mask> RewriteEntry{"host.com", "1.2.3.4"},
<mask> }
<mask> r = d.processRewrites("host.com", dns.TypeA)
<mask> assert.Equal(t, ReasonRewrite, r.Reason)
<mask> assert.True(t, r.IPList[0].Equal(net.ParseIP("1.2.3.4")))
<mask>
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove RewriteEntry{"*.host.com", "host.com"},
RewriteEntry{"host.com", "1.2.3.4"},
</s> add RewriteEntry{"host.com", "1.2.3.4", 0, nil},
RewriteEntry{"*.host.com", "host.com", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4"},
RewriteEntry{"host.com", "1.2.3.5"},
RewriteEntry{"host.com", "1:2:3::4"},
RewriteEntry{"www.host.com", "host.com"},
</s> add RewriteEntry{"host.com", "1.2.3.4", 0, nil},
RewriteEntry{"host.com", "1.2.3.5", 0, nil},
RewriteEntry{"host.com", "1:2:3::4", 0, nil},
RewriteEntry{"www.host.com", "host.com", 0, nil}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/dnsfilter_test.go |
d.prepareRewrites() | <mask> RewriteEntry{"host.com", "1.2.3.4", 0, nil},
<mask> RewriteEntry{"*.host.com", "1.2.3.5", 0, nil},
<mask> }
<mask> r = d.processRewrites("host.com", dns.TypeA)
<mask> assert.Equal(t, ReasonRewrite, r.Reason)
<mask> assert.True(t, r.IPList[0].Equal(net.ParseIP("1.2.3.4")))
<mask>
<mask> r = d.processRewrites("www.host.com", dns.TypeA)
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove RewriteEntry{"*.host.com", "1.2.3.5"},
RewriteEntry{"host.com", "1.2.3.4"},
</s> add RewriteEntry{"host.com", "1.2.3.4", 0, nil},
RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, </s> remove RewriteEntry{"*.host.com", "host.com"},
RewriteEntry{"host.com", "1.2.3.4"},
</s> add RewriteEntry{"host.com", "1.2.3.4", 0, nil},
RewriteEntry{"*.host.com", "host.com", 0, nil}, | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/dnsfilter_test.go |
// override a wildcard
d.Rewrites = []RewriteEntry{
RewriteEntry{"a.host.com", "1.2.3.4", 0, nil},
RewriteEntry{"*.host.com", "1.2.3.5", 0, nil},
}
d.prepareRewrites()
r = d.processRewrites("a.host.com", dns.TypeA)
assert.Equal(t, ReasonRewrite, r.Reason)
assert.True(t, len(r.IPList) == 1)
assert.True(t, r.IPList[0].Equal(net.ParseIP("1.2.3.4")))
| <mask> assert.Equal(t, NotFilteredNotFound, r.Reason)
<mask>
<mask> // wildcard + CNAME
<mask> d.Rewrites = []RewriteEntry{
<mask> RewriteEntry{"host.com", "1.2.3.4", 0, nil},
<mask> RewriteEntry{"*.host.com", "host.com", 0, nil},
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove RewriteEntry{"*.host.com", "host.com"},
RewriteEntry{"host.com", "1.2.3.4"},
</s> add RewriteEntry{"host.com", "1.2.3.4", 0, nil},
RewriteEntry{"*.host.com", "host.com", 0, nil}, </s> remove RewriteEntry{"*.host.com", "1.2.3.5"},
RewriteEntry{"host.com", "1.2.3.4"},
</s> add RewriteEntry{"host.com", "1.2.3.4", 0, nil},
RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4"},
RewriteEntry{"host.com", "1.2.3.5"},
RewriteEntry{"host.com", "1:2:3::4"},
RewriteEntry{"www.host.com", "host.com"},
</s> add RewriteEntry{"host.com", "1.2.3.4", 0, nil},
RewriteEntry{"host.com", "1.2.3.5", 0, nil},
RewriteEntry{"host.com", "1:2:3::4", 0, nil},
RewriteEntry{"www.host.com", "host.com", 0, nil}, | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/dnsfilter_test.go |
RewriteEntry{"host.com", "1.2.3.4", 0, nil},
RewriteEntry{"*.host.com", "host.com", 0, nil}, | <mask> assert.Equal(t, NotFilteredNotFound, r.Reason)
<mask>
<mask> // wildcard + CNAME
<mask> d.Rewrites = []RewriteEntry{
<mask> RewriteEntry{"*.host.com", "host.com"},
<mask> RewriteEntry{"host.com", "1.2.3.4"},
<mask> }
<mask> r = d.processRewrites("www.host.com", dns.TypeA)
<mask> assert.Equal(t, ReasonRewrite, r.Reason)
<mask> assert.Equal(t, "host.com", r.CanonName)
<mask> assert.True(t, r.IPList[0].Equal(net.ParseIP("1.2.3.4")))
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove RewriteEntry{"*.host.com", "1.2.3.5"},
RewriteEntry{"host.com", "1.2.3.4"},
</s> add RewriteEntry{"host.com", "1.2.3.4", 0, nil},
RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/dnsfilter_test.go |
d.prepareRewrites() | <mask> d.Rewrites = []RewriteEntry{
<mask> RewriteEntry{"host.com", "1.2.3.4", 0, nil},
<mask> RewriteEntry{"*.host.com", "host.com", 0, nil},
<mask> }
<mask> r = d.processRewrites("www.host.com", dns.TypeA)
<mask> assert.Equal(t, ReasonRewrite, r.Reason)
<mask> assert.Equal(t, "host.com", r.CanonName)
<mask> assert.True(t, r.IPList[0].Equal(net.ParseIP("1.2.3.4")))
<mask>
<mask> // 2 CNAMEs
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove RewriteEntry{"*.host.com", "host.com"},
RewriteEntry{"host.com", "1.2.3.4"},
</s> add RewriteEntry{"host.com", "1.2.3.4", 0, nil},
RewriteEntry{"*.host.com", "host.com", 0, nil}, </s> remove RewriteEntry{"*.host.com", "1.2.3.5"},
RewriteEntry{"host.com", "1.2.3.4"},
</s> add RewriteEntry{"host.com", "1.2.3.4", 0, nil},
RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/dnsfilter_test.go |
"net" | <mask> package dnsfilter
<mask>
<mask> import (
<mask> "encoding/json"
<mask> "net/http"
<mask> "sort"
<mask> "strings"
<mask>
<mask> "github.com/AdguardTeam/golibs/log"
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove "bufio"
</s> add </s> remove "io"
</s> add </s> remove "errors"
</s> add | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/rewrites.go |
"sort"
"strings" | <mask> "net"
<mask> "net/http"
<mask>
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/miekg/dns"
<mask> )
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove "strconv"
</s> add </s> remove "io"
</s> add </s> remove "errors"
</s> add | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/rewrites.go |
"github.com/miekg/dns" | <mask> "sort"
<mask> "strings"
<mask>
<mask> "github.com/AdguardTeam/golibs/log"
<mask> )
<mask>
<mask> // RewriteEntry is a rewrite array element
<mask> type RewriteEntry struct {
<mask> Domain string `yaml:"domain"`
<mask> Answer string `yaml:"answer"` // IP address or canonical name
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove // RewriteEntry is a rewrite array element
type RewriteEntry struct {
Domain string `yaml:"domain"`
Answer string `yaml:"answer"` // IP address or canonical name
}
</s> add </s> remove ParentalSensitivity int `yaml:"parental_sensitivity"` // must be either 3, 10, 13 or 17
</s> add </s> remove // . Find CNAME for a domain name
</s> add // . Find CNAME for a domain name (exact match or by wildcard) </s> remove // . Find A or AAAA record for a domain name
</s> add // . repeat for the new domain name (Note: we return only the last CNAME)
// . Find A or AAAA record for a domain name (exact match or by wildcard) | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/rewrites.go |
ent.prepare() | <mask> ent := RewriteEntry{
<mask> Domain: jsent.Domain,
<mask> Answer: jsent.Answer,
<mask> }
<mask> d.confLock.Lock()
<mask> d.Config.Rewrites = append(d.Config.Rewrites, ent)
<mask> d.confLock.Unlock()
<mask> log.Debug("Rewrites: added element: %s -> %s [%d]",
<mask> ent.Domain, ent.Answer, len(d.Config.Rewrites))
<mask>
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove if ent == entDel {
</s> add if ent.equals(entDel) { </s> remove if len(res.IPList) != 0 {
res.Reason = ReasonRewrite
</s> add for _, r := range rr {
if r.Type != dns.TypeCNAME && r.Type == qtype {
res.IPList = append(res.IPList, r.IP)
log.Debug("Rewrite: A/AAAA for %s is %s", host, r.IP)
} </s> remove for _, r := range d.Rewrites {
if r.Domain != host {
if !matchDomainWildcard(host, r.Domain) {
continue
}
}
ip := net.ParseIP(r.Answer)
if ip == nil {
continue
}
ip4 := ip.To4()
if qtype == dns.TypeA && ip4 != nil {
res.IPList = append(res.IPList, ip4)
log.Debug("Rewrite: A for %s is %s", host, ip4)
} else if qtype == dns.TypeAAAA && ip4 == nil {
res.IPList = append(res.IPList, ip)
log.Debug("Rewrite: AAAA for %s is %s", host, ip)
</s> add cnames := map[string]bool{}
origHost := host
for len(rr) != 0 && rr[0].Type == dns.TypeCNAME {
log.Debug("Rewrite: CNAME for %s is %s", host, rr[0].Answer)
host = rr[0].Answer
_, ok := cnames[host]
if ok {
log.Info("Rewrite: breaking CNAME redirection loop: %s. Question: %s", host, origHost)
return res | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/rewrites.go |
if ent.equals(entDel) { | <mask> }
<mask> arr := []RewriteEntry{}
<mask> d.confLock.Lock()
<mask> for _, ent := range d.Config.Rewrites {
<mask> if ent == entDel {
<mask> log.Debug("Rewrites: removed element: %s -> %s", ent.Domain, ent.Answer)
<mask> continue
<mask> }
<mask> arr = append(arr, ent)
<mask> }
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove for _, r := range d.Rewrites {
if r.Domain != host {
if !matchDomainWildcard(host, r.Domain) {
continue
}
}
ip := net.ParseIP(r.Answer)
if ip == nil {
continue
}
ip4 := ip.To4()
if qtype == dns.TypeA && ip4 != nil {
res.IPList = append(res.IPList, ip4)
log.Debug("Rewrite: A for %s is %s", host, ip4)
} else if qtype == dns.TypeAAAA && ip4 == nil {
res.IPList = append(res.IPList, ip)
log.Debug("Rewrite: AAAA for %s is %s", host, ip)
</s> add cnames := map[string]bool{}
origHost := host
for len(rr) != 0 && rr[0].Type == dns.TypeCNAME {
log.Debug("Rewrite: CNAME for %s is %s", host, rr[0].Answer)
host = rr[0].Answer
_, ok := cnames[host]
if ok {
log.Info("Rewrite: breaking CNAME redirection loop: %s. Question: %s", host, origHost)
return res </s> remove for _, r := range d.Rewrites {
if r.Domain != host {
if !matchDomainWildcard(host, r.Domain) {
continue
}
}
ip := net.ParseIP(r.Answer)
if ip == nil {
log.Debug("Rewrite: CNAME for %s is %s", host, r.Answer)
host = r.Answer
res.CanonName = r.Answer
res.Reason = ReasonRewrite
break
}
</s> add rr := findRewrites(d.Rewrites, host)
if len(rr) != 0 {
res.Reason = ReasonRewrite </s> remove if len(res.IPList) != 0 {
res.Reason = ReasonRewrite
</s> add for _, r := range rr {
if r.Type != dns.TypeCNAME && r.Type == qtype {
res.IPList = append(res.IPList, r.IP)
log.Debug("Rewrite: A/AAAA for %s is %s", host, r.IP)
} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/rewrites.go |
<mask>
<mask> package dnsfilter
<mask>
<mask> import (
<mask> "bufio"
<mask> "bytes"
<mask> "crypto/sha256"
<mask> "encoding/binary"
<mask> "encoding/gob"
<mask> "encoding/hex"
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove "errors"
</s> add </s> remove "io"
</s> add </s> remove if d.Config.ParentalEnabled {
data["sensitivity"] = d.Config.ParentalSensitivity
}
</s> add </s> remove d.ParentalSensitivity = 3
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/security.go | |
<mask> "encoding/binary"
<mask> "encoding/gob"
<mask> "encoding/hex"
<mask> "encoding/json"
<mask> "errors"
<mask> "fmt"
<mask> "io"
<mask> "net"
<mask> "net/http"
<mask> "strconv"
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove "io"
</s> add </s> remove "strconv"
</s> add </s> remove "bufio"
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/security.go | |
<mask> "encoding/hex"
<mask> "encoding/json"
<mask> "errors"
<mask> "fmt"
<mask> "io"
<mask> "net"
<mask> "net/http"
<mask> "strconv"
<mask> "strings"
<mask> "time"
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove "errors"
</s> add </s> remove "strconv"
</s> add </s> remove "bufio"
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/security.go | |
<mask> "fmt"
<mask> "io"
<mask> "net"
<mask> "net/http"
<mask> "strconv"
<mask> "strings"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/dnsproxy/upstream"
<mask> "github.com/AdguardTeam/golibs/cache"
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove "io"
</s> add </s> remove "errors"
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/security.go | |
<mask> return
<mask> }
<mask> }
<mask>
<mask> func parseParametersFromBody(r io.Reader) (map[string]string, error) {
<mask> parameters := map[string]string{}
<mask>
<mask> scanner := bufio.NewScanner(r)
<mask> for scanner.Scan() {
<mask> line := scanner.Text()
<mask> if len(line) == 0 {
<mask> // skip empty lines
<mask> continue
<mask> }
<mask> parts := strings.SplitN(line, "=", 2)
<mask> if len(parts) != 2 {
<mask> return parameters, errors.New("Got invalid request body")
<mask> }
<mask> parameters[strings.TrimSpace(parts[0])] = strings.TrimSpace(parts[1])
<mask> }
<mask>
<mask> return parameters, nil
<mask> }
<mask>
<mask> func (d *Dnsfilter) handleParentalEnable(w http.ResponseWriter, r *http.Request) {
<mask> parameters, err := parseParametersFromBody(r.Body)
<mask> if err != nil {
<mask> httpError(r, w, http.StatusBadRequest, "failed to parse parameters from body: %s", err)
<mask> return
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove parameters, err := parseParametersFromBody(r.Body)
if err != nil {
httpError(r, w, http.StatusBadRequest, "failed to parse parameters from body: %s", err)
return
}
sensitivity, ok := parameters["sensitivity"]
if !ok {
http.Error(w, "Sensitivity parameter was not specified", 400)
return
}
switch sensitivity {
case "3":
break
case "EARLY_CHILDHOOD":
sensitivity = "3"
case "10":
break
case "YOUNG":
sensitivity = "10"
case "13":
break
case "TEEN":
sensitivity = "13"
case "17":
break
case "MATURE":
sensitivity = "17"
default:
http.Error(w, "Sensitivity must be set to valid value", 400)
return
}
i, err := strconv.Atoi(sensitivity)
if err != nil {
http.Error(w, "Sensitivity must be set to valid value", 400)
return
}
d.Config.ParentalSensitivity = i
</s> add </s> remove if d.Config.ParentalEnabled {
data["sensitivity"] = d.Config.ParentalSensitivity
}
</s> add </s> remove for _, r := range d.Rewrites {
if r.Domain != host {
if !matchDomainWildcard(host, r.Domain) {
continue
}
}
ip := net.ParseIP(r.Answer)
if ip == nil {
continue
}
ip4 := ip.To4()
if qtype == dns.TypeA && ip4 != nil {
res.IPList = append(res.IPList, ip4)
log.Debug("Rewrite: A for %s is %s", host, ip4)
} else if qtype == dns.TypeAAAA && ip4 == nil {
res.IPList = append(res.IPList, ip)
log.Debug("Rewrite: AAAA for %s is %s", host, ip)
</s> add cnames := map[string]bool{}
origHost := host
for len(rr) != 0 && rr[0].Type == dns.TypeCNAME {
log.Debug("Rewrite: CNAME for %s is %s", host, rr[0].Answer)
host = rr[0].Answer
_, ok := cnames[host]
if ok {
log.Info("Rewrite: breaking CNAME redirection loop: %s. Question: %s", host, origHost)
return res </s> remove if len(res.IPList) != 0 {
res.Reason = ReasonRewrite
</s> add for _, r := range rr {
if r.Type != dns.TypeCNAME && r.Type == qtype {
res.IPList = append(res.IPList, r.IP)
log.Debug("Rewrite: A/AAAA for %s is %s", host, r.IP)
} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep"... | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/security.go | |
<mask> return parameters, nil
<mask> }
<mask>
<mask> func (d *Dnsfilter) handleParentalEnable(w http.ResponseWriter, r *http.Request) {
<mask> parameters, err := parseParametersFromBody(r.Body)
<mask> if err != nil {
<mask> httpError(r, w, http.StatusBadRequest, "failed to parse parameters from body: %s", err)
<mask> return
<mask> }
<mask>
<mask> sensitivity, ok := parameters["sensitivity"]
<mask> if !ok {
<mask> http.Error(w, "Sensitivity parameter was not specified", 400)
<mask> return
<mask> }
<mask>
<mask> switch sensitivity {
<mask> case "3":
<mask> break
<mask> case "EARLY_CHILDHOOD":
<mask> sensitivity = "3"
<mask> case "10":
<mask> break
<mask> case "YOUNG":
<mask> sensitivity = "10"
<mask> case "13":
<mask> break
<mask> case "TEEN":
<mask> sensitivity = "13"
<mask> case "17":
<mask> break
<mask> case "MATURE":
<mask> sensitivity = "17"
<mask> default:
<mask> http.Error(w, "Sensitivity must be set to valid value", 400)
<mask> return
<mask> }
<mask> i, err := strconv.Atoi(sensitivity)
<mask> if err != nil {
<mask> http.Error(w, "Sensitivity must be set to valid value", 400)
<mask> return
<mask> }
<mask> d.Config.ParentalSensitivity = i
<mask> d.Config.ParentalEnabled = true
<mask> d.Config.ConfigModified()
<mask> }
<mask>
<mask> func (d *Dnsfilter) handleParentalDisable(w http.ResponseWriter, r *http.Request) {
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove func parseParametersFromBody(r io.Reader) (map[string]string, error) {
parameters := map[string]string{}
scanner := bufio.NewScanner(r)
for scanner.Scan() {
line := scanner.Text()
if len(line) == 0 {
// skip empty lines
continue
}
parts := strings.SplitN(line, "=", 2)
if len(parts) != 2 {
return parameters, errors.New("Got invalid request body")
}
parameters[strings.TrimSpace(parts[0])] = strings.TrimSpace(parts[1])
}
return parameters, nil
}
</s> add </s> remove if d.Config.ParentalEnabled {
data["sensitivity"] = d.Config.ParentalSensitivity
}
</s> add </s> remove for _, r := range d.Rewrites {
if r.Domain != host {
if !matchDomainWildcard(host, r.Domain) {
continue
}
}
ip := net.ParseIP(r.Answer)
if ip == nil {
continue
}
ip4 := ip.To4()
if qtype == dns.TypeA && ip4 != nil {
res.IPList = append(res.IPList, ip4)
log.Debug("Rewrite: A for %s is %s", host, ip4)
} else if qtype == dns.TypeAAAA && ip4 == nil {
res.IPList = append(res.IPList, ip)
log.Debug("Rewrite: AAAA for %s is %s", host, ip)
</s> add cnames := map[string]bool{}
origHost := host
for len(rr) != 0 && rr[0].Type == dns.TypeCNAME {
log.Debug("Rewrite: CNAME for %s is %s", host, rr[0].Answer)
host = rr[0].Answer
_, ok := cnames[host]
if ok {
log.Info("Rewrite: breaking CNAME redirection loop: %s. Question: %s", host, origHost)
return res </s> remove for _, r := range d.Rewrites {
if r.Domain != host {
if !matchDomainWildcard(host, r.Domain) {
continue
}
}
ip := net.ParseIP(r.Answer)
if ip == nil {
log.Debug("Rewrite: CNAME for %s is %s", host, r.Answer)
host = r.Answer
res.CanonName = r.Answer
res.Reason = ReasonRewrite
break
}
</s> add rr := findRewrites(d.Rewrites, host)
if len(rr) != 0 {
res.Reason = ReasonRewrite | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"re... | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/security.go | |
<mask> func (d *Dnsfilter) handleParentalStatus(w http.ResponseWriter, r *http.Request) {
<mask> data := map[string]interface{}{
<mask> "enabled": d.Config.ParentalEnabled,
<mask> }
<mask> if d.Config.ParentalEnabled {
<mask> data["sensitivity"] = d.Config.ParentalSensitivity
<mask> }
<mask> jsonVal, err := json.Marshal(data)
<mask> if err != nil {
<mask> httpError(r, w, http.StatusInternalServerError, "Unable to marshal status json: %s", err)
<mask> return
<mask> }
</s> Merge: + dns rewrites: support wildcard override
Close #922
Squashed commit of the following:
commit 8ab742d84916a02043989fcfa5fc258e84046205
Merge: 2abde92f e398117d
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:47:44 2020 +0300
Merge remote-tracking branch 'origin/master' into 922-rewrites
commit 2abde92fe2d1bdb153787b4ecac60f9744c7fd1a
Author: Simon Zolin <s.zolin@adguard.com>
Date: Thu Jan 16 12:34:41 2020 +0300
minor
commit 3c20579cde85967786830d2d1b87cd987fc2ae12
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Jan 10 19:06:53 2020 +0300
don't change the order of rewrite entry list (apply priority at runtime)
commit 4f658f98011a7e31852c0ce379f2a02738f5614f
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:21:50 2019 +0300
minor
commit 9e56b4f3abefe3ff1d19bc61375f31dc55242e52
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:14:14 2019 +0300
* remove unused code
commit 4178f025a388eb768914306efa91ffead87e5a0c
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Dec 31 15:13:57 2019 +0300
+ dns rewrites: support wildcard override </s> remove parameters, err := parseParametersFromBody(r.Body)
if err != nil {
httpError(r, w, http.StatusBadRequest, "failed to parse parameters from body: %s", err)
return
}
sensitivity, ok := parameters["sensitivity"]
if !ok {
http.Error(w, "Sensitivity parameter was not specified", 400)
return
}
switch sensitivity {
case "3":
break
case "EARLY_CHILDHOOD":
sensitivity = "3"
case "10":
break
case "YOUNG":
sensitivity = "10"
case "13":
break
case "TEEN":
sensitivity = "13"
case "17":
break
case "MATURE":
sensitivity = "17"
default:
http.Error(w, "Sensitivity must be set to valid value", 400)
return
}
i, err := strconv.Atoi(sensitivity)
if err != nil {
http.Error(w, "Sensitivity must be set to valid value", 400)
return
}
d.Config.ParentalSensitivity = i
</s> add </s> remove func parseParametersFromBody(r io.Reader) (map[string]string, error) {
parameters := map[string]string{}
scanner := bufio.NewScanner(r)
for scanner.Scan() {
line := scanner.Text()
if len(line) == 0 {
// skip empty lines
continue
}
parts := strings.SplitN(line, "=", 2)
if len(parts) != 2 {
return parameters, errors.New("Got invalid request body")
}
parameters[strings.TrimSpace(parts[0])] = strings.TrimSpace(parts[1])
}
return parameters, nil
}
</s> add </s> remove for _, r := range d.Rewrites {
if r.Domain != host {
if !matchDomainWildcard(host, r.Domain) {
continue
}
}
ip := net.ParseIP(r.Answer)
if ip == nil {
continue
}
ip4 := ip.To4()
if qtype == dns.TypeA && ip4 != nil {
res.IPList = append(res.IPList, ip4)
log.Debug("Rewrite: A for %s is %s", host, ip4)
} else if qtype == dns.TypeAAAA && ip4 == nil {
res.IPList = append(res.IPList, ip)
log.Debug("Rewrite: AAAA for %s is %s", host, ip)
</s> add cnames := map[string]bool{}
origHost := host
for len(rr) != 0 && rr[0].Type == dns.TypeCNAME {
log.Debug("Rewrite: CNAME for %s is %s", host, rr[0].Answer)
host = rr[0].Answer
_, ok := cnames[host]
if ok {
log.Info("Rewrite: breaking CNAME redirection loop: %s. Question: %s", host, origHost)
return res </s> remove for _, r := range d.Rewrites {
if r.Domain != host {
if !matchDomainWildcard(host, r.Domain) {
continue
}
}
ip := net.ParseIP(r.Answer)
if ip == nil {
log.Debug("Rewrite: CNAME for %s is %s", host, r.Answer)
host = r.Answer
res.CanonName = r.Answer
res.Reason = ReasonRewrite
break
}
</s> add rr := findRewrites(d.Rewrites, host)
if len(rr) != 0 {
res.Reason = ReasonRewrite | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6d75118061b35dc3293991e0b5fd2826eaf0d2f | dnsfilter/security.go | |
ifaceIPNet, err := ifaceIPAddrs(iface, ipVersion4) | <mask> if err != nil {
<mask> return false, fmt.Errorf("couldn't find interface by name %s: %w", ifaceName, err)
<mask> }
<mask>
<mask> ifaceIPNet, err := ifaceIPv4Addrs(iface)
<mask> if err != nil {
<mask> return false, fmt.Errorf("getting ipv4 addrs for iface %s: %w", ifaceName, err)
<mask> }
<mask> if len(ifaceIPNet) == 0 {
<mask> return false, fmt.Errorf("interface %s has no ipv4 addresses", ifaceName)
</s> Pull request: dhcpd: wait for interfaces' ip addresses to appear
Merge in DNS/adguard-home from 2304-dncp-backoff to master
Updates #2304.
Squashed commit of the following:
commit c9bff8b27c6b031d43a7dd98152adcde7f49fff1
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Nov 27 14:08:03 2020 +0300
dhcpd: try for 5s instead of 10s
commit 983cf471832de0e7762b8b6e0a4ba9bb76ecadfc
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Nov 25 19:58:41 2020 +0300
dhcpd: wait for interfaces' ip addresses to appear </s> remove ifaceIPNet, err := ifaceIPv6Addrs(iface)
</s> add ifaceIPNet, err := ifaceIPAddrs(iface, ipVersion6) </s> remove dnsIPAddrs, err := ifaceIPv4Addrs(iface)
</s> add dnsIPAddrs, err := ifaceDNSIPAddrs(iface, ipVersion4, defaultMaxAttempts, defaultBackoff) </s> remove log.Debug("dhcpv4: starting...")
</s> add log.Debug("dhcpv6: starting...") </s> remove return fmt.Errorf("dhcpv4: getting ipv4 addrs for iface %s: %w", ifaceName, err)
}
switch len(dnsIPAddrs) {
case 0:
log.Debug("dhcpv4: no ipv4 address for interface %s", iface.Name)
return nil
case 1:
// Some Android devices use 8.8.8.8 if there is no secondary DNS
// server. Fix that by setting the secondary DNS address to our
// address as well.
//
// See https://github.com/AdguardTeam/AdGuardHome/issues/1708.
log.Debug("dhcpv4: setting secondary dns ip to iself for interface %s", iface.Name)
dnsIPAddrs = append(dnsIPAddrs, dnsIPAddrs[0])
default:
// Go on.
</s> add return fmt.Errorf("dhcpv4: interface %s: %w", ifaceName, err) </s> remove // ifaceIPv4Addrs returns the interface's IPv4 addresses.
func ifaceIPv4Addrs(iface *net.Interface) (ips []net.IP, err error) {
addrs, err := iface.Addrs()
if err != nil {
return nil, err
}
for _, a := range addrs {
ipnet, ok := a.(*net.IPNet)
if !ok {
continue
}
if ip := ipnet.IP.To4(); ip != nil {
ips = append(ips, ip)
}
}
return ips, nil
}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6e18c47000425dc28a2375b2480a16c84d85438 | internal/dhcpd/check_other_dhcp.go |
ifaceIPNet, err := ifaceIPAddrs(iface, ipVersion6) | <mask> if err != nil {
<mask> return false, fmt.Errorf("dhcpv6: net.InterfaceByName: %s: %w", ifaceName, err)
<mask> }
<mask>
<mask> ifaceIPNet, err := ifaceIPv6Addrs(iface)
<mask> if err != nil {
<mask> return false, fmt.Errorf("getting ipv6 addrs for iface %s: %w", ifaceName, err)
<mask> }
<mask> if len(ifaceIPNet) == 0 {
<mask> return false, fmt.Errorf("interface %s has no ipv6 addresses", ifaceName)
</s> Pull request: dhcpd: wait for interfaces' ip addresses to appear
Merge in DNS/adguard-home from 2304-dncp-backoff to master
Updates #2304.
Squashed commit of the following:
commit c9bff8b27c6b031d43a7dd98152adcde7f49fff1
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Nov 27 14:08:03 2020 +0300
dhcpd: try for 5s instead of 10s
commit 983cf471832de0e7762b8b6e0a4ba9bb76ecadfc
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Nov 25 19:58:41 2020 +0300
dhcpd: wait for interfaces' ip addresses to appear </s> remove ifaceIPNet, err := ifaceIPv4Addrs(iface)
</s> add ifaceIPNet, err := ifaceIPAddrs(iface, ipVersion4) </s> remove log.Debug("dhcpv4: starting...")
</s> add log.Debug("dhcpv6: starting...") </s> remove dnsIPAddrs, err := ifaceIPv6Addrs(iface)
</s> add dnsIPAddrs, err := ifaceDNSIPAddrs(iface, ipVersion6, defaultMaxAttempts, defaultBackoff) </s> remove return fmt.Errorf("dhcpv6: getting ipv6 addrs for iface %s: %w", ifaceName, err)
}
switch len(dnsIPAddrs) {
case 0:
log.Debug("dhcpv6: no ipv6 address for interface %s", iface.Name)
return nil
case 1:
// See the comment in (*v4Server).Start.
log.Debug("dhcpv6: setting secondary dns ip to iself for interface %s", iface.Name)
dnsIPAddrs = append(dnsIPAddrs, dnsIPAddrs[0])
default:
// Go on.
</s> add return fmt.Errorf("dhcpv6: interface %s: %w", ifaceName, err) </s> remove // ifaceIPv4Addrs returns the interface's IPv4 addresses.
func ifaceIPv4Addrs(iface *net.Interface) (ips []net.IP, err error) {
addrs, err := iface.Addrs()
if err != nil {
return nil, err
}
for _, a := range addrs {
ipnet, ok := a.(*net.IPNet)
if !ok {
continue
}
if ip := ipnet.IP.To4(); ip != nil {
ips = append(ips, ip)
}
}
return ips, nil
}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6e18c47000425dc28a2375b2480a16c84d85438 | internal/dhcpd/check_other_dhcp.go |
// v4Server is a DHCPv4 server.
//
// TODO(a.garipov): Think about unifying this and v6Server. | <mask> "github.com/insomniacslk/dhcp/dhcpv4"
<mask> "github.com/insomniacslk/dhcp/dhcpv4/server4"
<mask> )
<mask>
<mask> // v4Server - DHCPv4 server
<mask> type v4Server struct {
<mask> srv *server4.Server
<mask> leasesLock sync.Mutex
<mask> leases []*Lease
<mask> ipAddrs [256]byte
</s> Pull request: dhcpd: wait for interfaces' ip addresses to appear
Merge in DNS/adguard-home from 2304-dncp-backoff to master
Updates #2304.
Squashed commit of the following:
commit c9bff8b27c6b031d43a7dd98152adcde7f49fff1
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Nov 27 14:08:03 2020 +0300
dhcpd: try for 5s instead of 10s
commit 983cf471832de0e7762b8b6e0a4ba9bb76ecadfc
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Nov 25 19:58:41 2020 +0300
dhcpd: wait for interfaces' ip addresses to appear </s> remove // v6Server - DHCPv6 server
</s> add // v6Server is a DHCPv6 server.
//
// TODO(a.garipov): Think about unifying this and v4Server. </s> remove type netIface interface {
Addrs() ([]net.Addr, error)
}
// ifaceIPv6Addrs returns the interface's IPv6 addresses.
func ifaceIPv6Addrs(iface netIface) (ips []net.IP, err error) {
addrs, err := iface.Addrs()
if err != nil {
return nil, err
}
for _, a := range addrs {
ipnet, ok := a.(*net.IPNet)
if !ok {
continue
}
if ip := ipnet.IP.To4(); ip == nil {
// Assume that net.(*Interface).Addrs can only return
// valid IPv4 and IPv6 addresses. Since this isn't an
// IPv4 address, it must be an IPv6 one.
ips = append(ips, ipnet.IP)
}
}
return ips, nil
}
</s> add </s> remove log.Debug("DHCPv6: starting...")
</s> add log.Debug("dhcpv6: listening...") </s> remove
type fakeIface struct {
addrs []net.Addr
err error
}
// Addrs implements the netIface interface for *fakeIface.
func (iface *fakeIface) Addrs() (addrs []net.Addr, err error) {
if iface.err != nil {
return nil, iface.err
}
return iface.addrs, nil
}
func TestIfaceIPv6Addrs(t *testing.T) {
ip := net.IP{1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6}
ip4 := net.IP{1, 2, 3, 4}
addr := &net.IPNet{IP: ip}
errTest := agherr.Error("test error")
testCases := []struct {
name string
iface netIface
want []net.IP
wantErr error
}{{
name: "success",
iface: &fakeIface{addrs: []net.Addr{addr}, err: nil},
want: []net.IP{ip},
wantErr: nil,
}, {
name: "success_with_ipv4",
iface: &fakeIface{
addrs: []net.Addr{addr, &net.IPNet{IP: ip4}},
err: nil,
},
want: []net.IP{ip},
wantErr: nil,
}, {
name: "error",
iface: &fakeIface{addrs: []net.Addr{addr}, err: errTest},
want: nil,
wantErr: errTest,
}}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
got, gotErr := ifaceIPv6Addrs(tc.iface)
assert.Equal(t, tc.want, got)
assert.Equal(t, tc.wantErr, gotErr)
})
}
}
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/agherr"
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6e18c47000425dc28a2375b2480a16c84d85438 | internal/dhcpd/v4.go |
<mask> return
<mask> }
<mask> }
<mask>
<mask> // ifaceIPv4Addrs returns the interface's IPv4 addresses.
<mask> func ifaceIPv4Addrs(iface *net.Interface) (ips []net.IP, err error) {
<mask> addrs, err := iface.Addrs()
<mask> if err != nil {
<mask> return nil, err
<mask> }
<mask>
<mask> for _, a := range addrs {
<mask> ipnet, ok := a.(*net.IPNet)
<mask> if !ok {
<mask> continue
<mask> }
<mask>
<mask> if ip := ipnet.IP.To4(); ip != nil {
<mask> ips = append(ips, ip)
<mask> }
<mask> }
<mask>
<mask> return ips, nil
<mask> }
<mask>
<mask> // Start starts the IPv4 DHCP server.
<mask> func (s *v4Server) Start() error {
<mask> if !s.conf.Enabled {
<mask> return nil
<mask> }
</s> Pull request: dhcpd: wait for interfaces' ip addresses to appear
Merge in DNS/adguard-home from 2304-dncp-backoff to master
Updates #2304.
Squashed commit of the following:
commit c9bff8b27c6b031d43a7dd98152adcde7f49fff1
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Nov 27 14:08:03 2020 +0300
dhcpd: try for 5s instead of 10s
commit 983cf471832de0e7762b8b6e0a4ba9bb76ecadfc
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Nov 25 19:58:41 2020 +0300
dhcpd: wait for interfaces' ip addresses to appear </s> remove type netIface interface {
Addrs() ([]net.Addr, error)
}
// ifaceIPv6Addrs returns the interface's IPv6 addresses.
func ifaceIPv6Addrs(iface netIface) (ips []net.IP, err error) {
addrs, err := iface.Addrs()
if err != nil {
return nil, err
}
for _, a := range addrs {
ipnet, ok := a.(*net.IPNet)
if !ok {
continue
}
if ip := ipnet.IP.To4(); ip == nil {
// Assume that net.(*Interface).Addrs can only return
// valid IPv4 and IPv6 addresses. Since this isn't an
// IPv4 address, it must be an IPv6 one.
ips = append(ips, ipnet.IP)
}
}
return ips, nil
}
</s> add </s> remove
type fakeIface struct {
addrs []net.Addr
err error
}
// Addrs implements the netIface interface for *fakeIface.
func (iface *fakeIface) Addrs() (addrs []net.Addr, err error) {
if iface.err != nil {
return nil, iface.err
}
return iface.addrs, nil
}
func TestIfaceIPv6Addrs(t *testing.T) {
ip := net.IP{1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6}
ip4 := net.IP{1, 2, 3, 4}
addr := &net.IPNet{IP: ip}
errTest := agherr.Error("test error")
testCases := []struct {
name string
iface netIface
want []net.IP
wantErr error
}{{
name: "success",
iface: &fakeIface{addrs: []net.Addr{addr}, err: nil},
want: []net.IP{ip},
wantErr: nil,
}, {
name: "success_with_ipv4",
iface: &fakeIface{
addrs: []net.Addr{addr, &net.IPNet{IP: ip4}},
err: nil,
},
want: []net.IP{ip},
wantErr: nil,
}, {
name: "error",
iface: &fakeIface{addrs: []net.Addr{addr}, err: errTest},
want: nil,
wantErr: errTest,
}}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
got, gotErr := ifaceIPv6Addrs(tc.iface)
assert.Equal(t, tc.want, got)
assert.Equal(t, tc.wantErr, gotErr)
})
}
}
</s> add </s> remove ifaceIPNet, err := ifaceIPv6Addrs(iface)
</s> add ifaceIPNet, err := ifaceIPAddrs(iface, ipVersion6) </s> remove ifaceIPNet, err := ifaceIPv4Addrs(iface)
</s> add ifaceIPNet, err := ifaceIPAddrs(iface, ipVersion4) </s> remove log.Debug("dhcpv4: starting...")
</s> add log.Debug("dhcpv6: starting...") | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"ke... | https://github.com/AdguardTeam/AdGuardHome/commit/a6e18c47000425dc28a2375b2480a16c84d85438 | internal/dhcpd/v4.go | |
dnsIPAddrs, err := ifaceDNSIPAddrs(iface, ipVersion4, defaultMaxAttempts, defaultBackoff) | <mask> }
<mask>
<mask> log.Debug("dhcpv4: starting...")
<mask>
<mask> dnsIPAddrs, err := ifaceIPv4Addrs(iface)
<mask> if err != nil {
<mask> return fmt.Errorf("dhcpv4: getting ipv4 addrs for iface %s: %w", ifaceName, err)
<mask> }
<mask>
<mask> switch len(dnsIPAddrs) {
</s> Pull request: dhcpd: wait for interfaces' ip addresses to appear
Merge in DNS/adguard-home from 2304-dncp-backoff to master
Updates #2304.
Squashed commit of the following:
commit c9bff8b27c6b031d43a7dd98152adcde7f49fff1
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Nov 27 14:08:03 2020 +0300
dhcpd: try for 5s instead of 10s
commit 983cf471832de0e7762b8b6e0a4ba9bb76ecadfc
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Nov 25 19:58:41 2020 +0300
dhcpd: wait for interfaces' ip addresses to appear </s> remove return fmt.Errorf("dhcpv4: getting ipv4 addrs for iface %s: %w", ifaceName, err)
}
switch len(dnsIPAddrs) {
case 0:
log.Debug("dhcpv4: no ipv4 address for interface %s", iface.Name)
return nil
case 1:
// Some Android devices use 8.8.8.8 if there is no secondary DNS
// server. Fix that by setting the secondary DNS address to our
// address as well.
//
// See https://github.com/AdguardTeam/AdGuardHome/issues/1708.
log.Debug("dhcpv4: setting secondary dns ip to iself for interface %s", iface.Name)
dnsIPAddrs = append(dnsIPAddrs, dnsIPAddrs[0])
default:
// Go on.
</s> add return fmt.Errorf("dhcpv4: interface %s: %w", ifaceName, err) </s> remove dnsIPAddrs, err := ifaceIPv6Addrs(iface)
</s> add dnsIPAddrs, err := ifaceDNSIPAddrs(iface, ipVersion6, defaultMaxAttempts, defaultBackoff) </s> remove ifaceIPNet, err := ifaceIPv4Addrs(iface)
</s> add ifaceIPNet, err := ifaceIPAddrs(iface, ipVersion4) </s> remove log.Debug("dhcpv4: starting...")
</s> add log.Debug("dhcpv6: starting...") </s> remove return fmt.Errorf("dhcpv6: getting ipv6 addrs for iface %s: %w", ifaceName, err)
}
switch len(dnsIPAddrs) {
case 0:
log.Debug("dhcpv6: no ipv6 address for interface %s", iface.Name)
return nil
case 1:
// See the comment in (*v4Server).Start.
log.Debug("dhcpv6: setting secondary dns ip to iself for interface %s", iface.Name)
dnsIPAddrs = append(dnsIPAddrs, dnsIPAddrs[0])
default:
// Go on.
</s> add return fmt.Errorf("dhcpv6: interface %s: %w", ifaceName, err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6e18c47000425dc28a2375b2480a16c84d85438 | internal/dhcpd/v4.go |
return fmt.Errorf("dhcpv4: interface %s: %w", ifaceName, err) | <mask> log.Debug("dhcpv4: starting...")
<mask>
<mask> dnsIPAddrs, err := ifaceIPv4Addrs(iface)
<mask> if err != nil {
<mask> return fmt.Errorf("dhcpv4: getting ipv4 addrs for iface %s: %w", ifaceName, err)
<mask> }
<mask>
<mask> switch len(dnsIPAddrs) {
<mask> case 0:
<mask> log.Debug("dhcpv4: no ipv4 address for interface %s", iface.Name)
<mask>
<mask> return nil
<mask> case 1:
<mask> // Some Android devices use 8.8.8.8 if there is no secondary DNS
<mask> // server. Fix that by setting the secondary DNS address to our
<mask> // address as well.
<mask> //
<mask> // See https://github.com/AdguardTeam/AdGuardHome/issues/1708.
<mask> log.Debug("dhcpv4: setting secondary dns ip to iself for interface %s", iface.Name)
<mask> dnsIPAddrs = append(dnsIPAddrs, dnsIPAddrs[0])
<mask> default:
<mask> // Go on.
<mask> }
<mask>
<mask> s.conf.dnsIPAddrs = dnsIPAddrs
<mask>
<mask> laddr := &net.UDPAddr{
</s> Pull request: dhcpd: wait for interfaces' ip addresses to appear
Merge in DNS/adguard-home from 2304-dncp-backoff to master
Updates #2304.
Squashed commit of the following:
commit c9bff8b27c6b031d43a7dd98152adcde7f49fff1
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Nov 27 14:08:03 2020 +0300
dhcpd: try for 5s instead of 10s
commit 983cf471832de0e7762b8b6e0a4ba9bb76ecadfc
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Nov 25 19:58:41 2020 +0300
dhcpd: wait for interfaces' ip addresses to appear </s> remove return fmt.Errorf("dhcpv6: getting ipv6 addrs for iface %s: %w", ifaceName, err)
}
switch len(dnsIPAddrs) {
case 0:
log.Debug("dhcpv6: no ipv6 address for interface %s", iface.Name)
return nil
case 1:
// See the comment in (*v4Server).Start.
log.Debug("dhcpv6: setting secondary dns ip to iself for interface %s", iface.Name)
dnsIPAddrs = append(dnsIPAddrs, dnsIPAddrs[0])
default:
// Go on.
</s> add return fmt.Errorf("dhcpv6: interface %s: %w", ifaceName, err) </s> remove dnsIPAddrs, err := ifaceIPv4Addrs(iface)
</s> add dnsIPAddrs, err := ifaceDNSIPAddrs(iface, ipVersion4, defaultMaxAttempts, defaultBackoff) </s> remove ifaceIPNet, err := ifaceIPv4Addrs(iface)
</s> add ifaceIPNet, err := ifaceIPAddrs(iface, ipVersion4) </s> remove dnsIPAddrs, err := ifaceIPv6Addrs(iface)
</s> add dnsIPAddrs, err := ifaceDNSIPAddrs(iface, ipVersion6, defaultMaxAttempts, defaultBackoff) </s> remove log.Debug("dhcpv4: starting...")
</s> add log.Debug("dhcpv6: starting...") | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"k... | https://github.com/AdguardTeam/AdGuardHome/commit/a6e18c47000425dc28a2375b2480a16c84d85438 | internal/dhcpd/v4.go |
// v6Server is a DHCPv6 server.
//
// TODO(a.garipov): Think about unifying this and v4Server. | <mask> )
<mask>
<mask> const valueIAID = "ADGH" // value for IANA.ID
<mask>
<mask> // v6Server - DHCPv6 server
<mask> type v6Server struct {
<mask> srv *server6.Server
<mask> leasesLock sync.Mutex
<mask> leases []*Lease
<mask> ipAddrs [256]byte
</s> Pull request: dhcpd: wait for interfaces' ip addresses to appear
Merge in DNS/adguard-home from 2304-dncp-backoff to master
Updates #2304.
Squashed commit of the following:
commit c9bff8b27c6b031d43a7dd98152adcde7f49fff1
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Nov 27 14:08:03 2020 +0300
dhcpd: try for 5s instead of 10s
commit 983cf471832de0e7762b8b6e0a4ba9bb76ecadfc
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Nov 25 19:58:41 2020 +0300
dhcpd: wait for interfaces' ip addresses to appear </s> remove // v4Server - DHCPv4 server
</s> add // v4Server is a DHCPv4 server.
//
// TODO(a.garipov): Think about unifying this and v6Server. </s> remove log.Debug("DHCPv6: starting...")
</s> add log.Debug("dhcpv6: listening...") </s> remove type netIface interface {
Addrs() ([]net.Addr, error)
}
// ifaceIPv6Addrs returns the interface's IPv6 addresses.
func ifaceIPv6Addrs(iface netIface) (ips []net.IP, err error) {
addrs, err := iface.Addrs()
if err != nil {
return nil, err
}
for _, a := range addrs {
ipnet, ok := a.(*net.IPNet)
if !ok {
continue
}
if ip := ipnet.IP.To4(); ip == nil {
// Assume that net.(*Interface).Addrs can only return
// valid IPv4 and IPv6 addresses. Since this isn't an
// IPv4 address, it must be an IPv6 one.
ips = append(ips, ipnet.IP)
}
}
return ips, nil
}
</s> add </s> remove
type fakeIface struct {
addrs []net.Addr
err error
}
// Addrs implements the netIface interface for *fakeIface.
func (iface *fakeIface) Addrs() (addrs []net.Addr, err error) {
if iface.err != nil {
return nil, iface.err
}
return iface.addrs, nil
}
func TestIfaceIPv6Addrs(t *testing.T) {
ip := net.IP{1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6}
ip4 := net.IP{1, 2, 3, 4}
addr := &net.IPNet{IP: ip}
errTest := agherr.Error("test error")
testCases := []struct {
name string
iface netIface
want []net.IP
wantErr error
}{{
name: "success",
iface: &fakeIface{addrs: []net.Addr{addr}, err: nil},
want: []net.IP{ip},
wantErr: nil,
}, {
name: "success_with_ipv4",
iface: &fakeIface{
addrs: []net.Addr{addr, &net.IPNet{IP: ip4}},
err: nil,
},
want: []net.IP{ip},
wantErr: nil,
}, {
name: "error",
iface: &fakeIface{addrs: []net.Addr{addr}, err: errTest},
want: nil,
wantErr: errTest,
}}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
got, gotErr := ifaceIPv6Addrs(tc.iface)
assert.Equal(t, tc.want, got)
assert.Equal(t, tc.wantErr, gotErr)
})
}
}
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/agherr"
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6e18c47000425dc28a2375b2480a16c84d85438 | internal/dhcpd/v6.go |
<mask> return
<mask> }
<mask> }
<mask>
<mask> type netIface interface {
<mask> Addrs() ([]net.Addr, error)
<mask> }
<mask>
<mask> // ifaceIPv6Addrs returns the interface's IPv6 addresses.
<mask> func ifaceIPv6Addrs(iface netIface) (ips []net.IP, err error) {
<mask> addrs, err := iface.Addrs()
<mask> if err != nil {
<mask> return nil, err
<mask> }
<mask>
<mask> for _, a := range addrs {
<mask> ipnet, ok := a.(*net.IPNet)
<mask> if !ok {
<mask> continue
<mask> }
<mask>
<mask> if ip := ipnet.IP.To4(); ip == nil {
<mask> // Assume that net.(*Interface).Addrs can only return
<mask> // valid IPv4 and IPv6 addresses. Since this isn't an
<mask> // IPv4 address, it must be an IPv6 one.
<mask> ips = append(ips, ipnet.IP)
<mask> }
<mask> }
<mask>
<mask> return ips, nil
<mask> }
<mask>
<mask> // initialize RA module
<mask> func (s *v6Server) initRA(iface *net.Interface) error {
<mask> // choose the source IP address - should be link-local-unicast
<mask> s.ra.ipAddr = s.conf.dnsIPAddrs[0]
<mask> for _, ip := range s.conf.dnsIPAddrs {
</s> Pull request: dhcpd: wait for interfaces' ip addresses to appear
Merge in DNS/adguard-home from 2304-dncp-backoff to master
Updates #2304.
Squashed commit of the following:
commit c9bff8b27c6b031d43a7dd98152adcde7f49fff1
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Nov 27 14:08:03 2020 +0300
dhcpd: try for 5s instead of 10s
commit 983cf471832de0e7762b8b6e0a4ba9bb76ecadfc
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Nov 25 19:58:41 2020 +0300
dhcpd: wait for interfaces' ip addresses to appear </s> remove // ifaceIPv4Addrs returns the interface's IPv4 addresses.
func ifaceIPv4Addrs(iface *net.Interface) (ips []net.IP, err error) {
addrs, err := iface.Addrs()
if err != nil {
return nil, err
}
for _, a := range addrs {
ipnet, ok := a.(*net.IPNet)
if !ok {
continue
}
if ip := ipnet.IP.To4(); ip != nil {
ips = append(ips, ip)
}
}
return ips, nil
}
</s> add </s> remove
type fakeIface struct {
addrs []net.Addr
err error
}
// Addrs implements the netIface interface for *fakeIface.
func (iface *fakeIface) Addrs() (addrs []net.Addr, err error) {
if iface.err != nil {
return nil, iface.err
}
return iface.addrs, nil
}
func TestIfaceIPv6Addrs(t *testing.T) {
ip := net.IP{1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6}
ip4 := net.IP{1, 2, 3, 4}
addr := &net.IPNet{IP: ip}
errTest := agherr.Error("test error")
testCases := []struct {
name string
iface netIface
want []net.IP
wantErr error
}{{
name: "success",
iface: &fakeIface{addrs: []net.Addr{addr}, err: nil},
want: []net.IP{ip},
wantErr: nil,
}, {
name: "success_with_ipv4",
iface: &fakeIface{
addrs: []net.Addr{addr, &net.IPNet{IP: ip4}},
err: nil,
},
want: []net.IP{ip},
wantErr: nil,
}, {
name: "error",
iface: &fakeIface{addrs: []net.Addr{addr}, err: errTest},
want: nil,
wantErr: errTest,
}}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
got, gotErr := ifaceIPv6Addrs(tc.iface)
assert.Equal(t, tc.want, got)
assert.Equal(t, tc.wantErr, gotErr)
})
}
}
</s> add </s> remove ifaceIPNet, err := ifaceIPv6Addrs(iface)
</s> add ifaceIPNet, err := ifaceIPAddrs(iface, ipVersion6) </s> remove ifaceIPNet, err := ifaceIPv4Addrs(iface)
</s> add ifaceIPNet, err := ifaceIPAddrs(iface, ipVersion4) </s> remove return fmt.Errorf("dhcpv6: getting ipv6 addrs for iface %s: %w", ifaceName, err)
}
switch len(dnsIPAddrs) {
case 0:
log.Debug("dhcpv6: no ipv6 address for interface %s", iface.Name)
return nil
case 1:
// See the comment in (*v4Server).Start.
log.Debug("dhcpv6: setting secondary dns ip to iself for interface %s", iface.Name)
dnsIPAddrs = append(dnsIPAddrs, dnsIPAddrs[0])
default:
// Go on.
</s> add return fmt.Errorf("dhcpv6: interface %s: %w", ifaceName, err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"re... | https://github.com/AdguardTeam/AdGuardHome/commit/a6e18c47000425dc28a2375b2480a16c84d85438 | internal/dhcpd/v6.go | |
log.Debug("dhcpv6: starting...") | <mask> if err != nil {
<mask> return fmt.Errorf("dhcpv6: finding interface %s by name: %w", ifaceName, err)
<mask> }
<mask>
<mask> log.Debug("dhcpv4: starting...")
<mask>
<mask> dnsIPAddrs, err := ifaceIPv6Addrs(iface)
<mask> if err != nil {
<mask> return fmt.Errorf("dhcpv6: getting ipv6 addrs for iface %s: %w", ifaceName, err)
<mask> }
</s> Pull request: dhcpd: wait for interfaces' ip addresses to appear
Merge in DNS/adguard-home from 2304-dncp-backoff to master
Updates #2304.
Squashed commit of the following:
commit c9bff8b27c6b031d43a7dd98152adcde7f49fff1
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Nov 27 14:08:03 2020 +0300
dhcpd: try for 5s instead of 10s
commit 983cf471832de0e7762b8b6e0a4ba9bb76ecadfc
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Nov 25 19:58:41 2020 +0300
dhcpd: wait for interfaces' ip addresses to appear </s> remove dnsIPAddrs, err := ifaceIPv6Addrs(iface)
</s> add dnsIPAddrs, err := ifaceDNSIPAddrs(iface, ipVersion6, defaultMaxAttempts, defaultBackoff) </s> remove ifaceIPNet, err := ifaceIPv6Addrs(iface)
</s> add ifaceIPNet, err := ifaceIPAddrs(iface, ipVersion6) </s> remove return fmt.Errorf("dhcpv6: getting ipv6 addrs for iface %s: %w", ifaceName, err)
}
switch len(dnsIPAddrs) {
case 0:
log.Debug("dhcpv6: no ipv6 address for interface %s", iface.Name)
return nil
case 1:
// See the comment in (*v4Server).Start.
log.Debug("dhcpv6: setting secondary dns ip to iself for interface %s", iface.Name)
dnsIPAddrs = append(dnsIPAddrs, dnsIPAddrs[0])
default:
// Go on.
</s> add return fmt.Errorf("dhcpv6: interface %s: %w", ifaceName, err) </s> remove ifaceIPNet, err := ifaceIPv4Addrs(iface)
</s> add ifaceIPNet, err := ifaceIPAddrs(iface, ipVersion4) </s> remove dnsIPAddrs, err := ifaceIPv4Addrs(iface)
</s> add dnsIPAddrs, err := ifaceDNSIPAddrs(iface, ipVersion4, defaultMaxAttempts, defaultBackoff) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6e18c47000425dc28a2375b2480a16c84d85438 | internal/dhcpd/v6.go |
dnsIPAddrs, err := ifaceDNSIPAddrs(iface, ipVersion6, defaultMaxAttempts, defaultBackoff) | <mask> }
<mask>
<mask> log.Debug("dhcpv4: starting...")
<mask>
<mask> dnsIPAddrs, err := ifaceIPv6Addrs(iface)
<mask> if err != nil {
<mask> return fmt.Errorf("dhcpv6: getting ipv6 addrs for iface %s: %w", ifaceName, err)
<mask> }
<mask>
<mask> switch len(dnsIPAddrs) {
</s> Pull request: dhcpd: wait for interfaces' ip addresses to appear
Merge in DNS/adguard-home from 2304-dncp-backoff to master
Updates #2304.
Squashed commit of the following:
commit c9bff8b27c6b031d43a7dd98152adcde7f49fff1
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Nov 27 14:08:03 2020 +0300
dhcpd: try for 5s instead of 10s
commit 983cf471832de0e7762b8b6e0a4ba9bb76ecadfc
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Nov 25 19:58:41 2020 +0300
dhcpd: wait for interfaces' ip addresses to appear </s> remove log.Debug("dhcpv4: starting...")
</s> add log.Debug("dhcpv6: starting...") </s> remove dnsIPAddrs, err := ifaceIPv4Addrs(iface)
</s> add dnsIPAddrs, err := ifaceDNSIPAddrs(iface, ipVersion4, defaultMaxAttempts, defaultBackoff) </s> remove return fmt.Errorf("dhcpv6: getting ipv6 addrs for iface %s: %w", ifaceName, err)
}
switch len(dnsIPAddrs) {
case 0:
log.Debug("dhcpv6: no ipv6 address for interface %s", iface.Name)
return nil
case 1:
// See the comment in (*v4Server).Start.
log.Debug("dhcpv6: setting secondary dns ip to iself for interface %s", iface.Name)
dnsIPAddrs = append(dnsIPAddrs, dnsIPAddrs[0])
default:
// Go on.
</s> add return fmt.Errorf("dhcpv6: interface %s: %w", ifaceName, err) </s> remove ifaceIPNet, err := ifaceIPv6Addrs(iface)
</s> add ifaceIPNet, err := ifaceIPAddrs(iface, ipVersion6) </s> remove return fmt.Errorf("dhcpv4: getting ipv4 addrs for iface %s: %w", ifaceName, err)
}
switch len(dnsIPAddrs) {
case 0:
log.Debug("dhcpv4: no ipv4 address for interface %s", iface.Name)
return nil
case 1:
// Some Android devices use 8.8.8.8 if there is no secondary DNS
// server. Fix that by setting the secondary DNS address to our
// address as well.
//
// See https://github.com/AdguardTeam/AdGuardHome/issues/1708.
log.Debug("dhcpv4: setting secondary dns ip to iself for interface %s", iface.Name)
dnsIPAddrs = append(dnsIPAddrs, dnsIPAddrs[0])
default:
// Go on.
</s> add return fmt.Errorf("dhcpv4: interface %s: %w", ifaceName, err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6e18c47000425dc28a2375b2480a16c84d85438 | internal/dhcpd/v6.go |
return fmt.Errorf("dhcpv6: interface %s: %w", ifaceName, err) | <mask> log.Debug("dhcpv4: starting...")
<mask>
<mask> dnsIPAddrs, err := ifaceIPv6Addrs(iface)
<mask> if err != nil {
<mask> return fmt.Errorf("dhcpv6: getting ipv6 addrs for iface %s: %w", ifaceName, err)
<mask> }
<mask>
<mask> switch len(dnsIPAddrs) {
<mask> case 0:
<mask> log.Debug("dhcpv6: no ipv6 address for interface %s", iface.Name)
<mask>
<mask> return nil
<mask> case 1:
<mask> // See the comment in (*v4Server).Start.
<mask> log.Debug("dhcpv6: setting secondary dns ip to iself for interface %s", iface.Name)
<mask> dnsIPAddrs = append(dnsIPAddrs, dnsIPAddrs[0])
<mask> default:
<mask> // Go on.
<mask> }
<mask>
<mask> s.conf.dnsIPAddrs = dnsIPAddrs
<mask>
<mask> err = s.initRA(iface)
</s> Pull request: dhcpd: wait for interfaces' ip addresses to appear
Merge in DNS/adguard-home from 2304-dncp-backoff to master
Updates #2304.
Squashed commit of the following:
commit c9bff8b27c6b031d43a7dd98152adcde7f49fff1
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Nov 27 14:08:03 2020 +0300
dhcpd: try for 5s instead of 10s
commit 983cf471832de0e7762b8b6e0a4ba9bb76ecadfc
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Nov 25 19:58:41 2020 +0300
dhcpd: wait for interfaces' ip addresses to appear </s> remove return fmt.Errorf("dhcpv4: getting ipv4 addrs for iface %s: %w", ifaceName, err)
}
switch len(dnsIPAddrs) {
case 0:
log.Debug("dhcpv4: no ipv4 address for interface %s", iface.Name)
return nil
case 1:
// Some Android devices use 8.8.8.8 if there is no secondary DNS
// server. Fix that by setting the secondary DNS address to our
// address as well.
//
// See https://github.com/AdguardTeam/AdGuardHome/issues/1708.
log.Debug("dhcpv4: setting secondary dns ip to iself for interface %s", iface.Name)
dnsIPAddrs = append(dnsIPAddrs, dnsIPAddrs[0])
default:
// Go on.
</s> add return fmt.Errorf("dhcpv4: interface %s: %w", ifaceName, err) </s> remove log.Debug("dhcpv4: starting...")
</s> add log.Debug("dhcpv6: starting...") </s> remove dnsIPAddrs, err := ifaceIPv6Addrs(iface)
</s> add dnsIPAddrs, err := ifaceDNSIPAddrs(iface, ipVersion6, defaultMaxAttempts, defaultBackoff) </s> remove ifaceIPNet, err := ifaceIPv6Addrs(iface)
</s> add ifaceIPNet, err := ifaceIPAddrs(iface, ipVersion6) </s> remove dnsIPAddrs, err := ifaceIPv4Addrs(iface)
</s> add dnsIPAddrs, err := ifaceDNSIPAddrs(iface, ipVersion4, defaultMaxAttempts, defaultBackoff) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6e18c47000425dc28a2375b2480a16c84d85438 | internal/dhcpd/v6.go |
log.Debug("dhcpv6: listening...") | <mask> log.Debug("DHCPv6: not starting DHCPv6 server due to ra_slaac_only=true")
<mask> return nil
<mask> }
<mask>
<mask> log.Debug("DHCPv6: starting...")
<mask>
<mask> if len(iface.HardwareAddr) != 6 {
<mask> return fmt.Errorf("dhcpv6: invalid MAC %s", iface.HardwareAddr)
<mask> }
<mask> s.sid = dhcpv6.Duid{
</s> Pull request: dhcpd: wait for interfaces' ip addresses to appear
Merge in DNS/adguard-home from 2304-dncp-backoff to master
Updates #2304.
Squashed commit of the following:
commit c9bff8b27c6b031d43a7dd98152adcde7f49fff1
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Nov 27 14:08:03 2020 +0300
dhcpd: try for 5s instead of 10s
commit 983cf471832de0e7762b8b6e0a4ba9bb76ecadfc
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Nov 25 19:58:41 2020 +0300
dhcpd: wait for interfaces' ip addresses to appear </s> remove return fmt.Errorf("dhcpv6: getting ipv6 addrs for iface %s: %w", ifaceName, err)
}
switch len(dnsIPAddrs) {
case 0:
log.Debug("dhcpv6: no ipv6 address for interface %s", iface.Name)
return nil
case 1:
// See the comment in (*v4Server).Start.
log.Debug("dhcpv6: setting secondary dns ip to iself for interface %s", iface.Name)
dnsIPAddrs = append(dnsIPAddrs, dnsIPAddrs[0])
default:
// Go on.
</s> add return fmt.Errorf("dhcpv6: interface %s: %w", ifaceName, err) </s> remove return fmt.Errorf("dhcpv4: getting ipv4 addrs for iface %s: %w", ifaceName, err)
}
switch len(dnsIPAddrs) {
case 0:
log.Debug("dhcpv4: no ipv4 address for interface %s", iface.Name)
return nil
case 1:
// Some Android devices use 8.8.8.8 if there is no secondary DNS
// server. Fix that by setting the secondary DNS address to our
// address as well.
//
// See https://github.com/AdguardTeam/AdGuardHome/issues/1708.
log.Debug("dhcpv4: setting secondary dns ip to iself for interface %s", iface.Name)
dnsIPAddrs = append(dnsIPAddrs, dnsIPAddrs[0])
default:
// Go on.
</s> add return fmt.Errorf("dhcpv4: interface %s: %w", ifaceName, err) </s> remove log.Debug("dhcpv4: starting...")
</s> add log.Debug("dhcpv6: starting...") </s> remove // ifaceIPv4Addrs returns the interface's IPv4 addresses.
func ifaceIPv4Addrs(iface *net.Interface) (ips []net.IP, err error) {
addrs, err := iface.Addrs()
if err != nil {
return nil, err
}
for _, a := range addrs {
ipnet, ok := a.(*net.IPNet)
if !ok {
continue
}
if ip := ipnet.IP.To4(); ip != nil {
ips = append(ips, ip)
}
}
return ips, nil
}
</s> add </s> remove ifaceIPNet, err := ifaceIPv6Addrs(iface)
</s> add ifaceIPNet, err := ifaceIPAddrs(iface, ipVersion6) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6e18c47000425dc28a2375b2480a16c84d85438 | internal/dhcpd/v6.go |
<mask> import (
<mask> "net"
<mask> "testing"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/agherr"
<mask> "github.com/insomniacslk/dhcp/dhcpv6"
<mask> "github.com/insomniacslk/dhcp/iana"
<mask> "github.com/stretchr/testify/assert"
<mask> )
<mask>
</s> Pull request: dhcpd: wait for interfaces' ip addresses to appear
Merge in DNS/adguard-home from 2304-dncp-backoff to master
Updates #2304.
Squashed commit of the following:
commit c9bff8b27c6b031d43a7dd98152adcde7f49fff1
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Nov 27 14:08:03 2020 +0300
dhcpd: try for 5s instead of 10s
commit 983cf471832de0e7762b8b6e0a4ba9bb76ecadfc
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Nov 25 19:58:41 2020 +0300
dhcpd: wait for interfaces' ip addresses to appear </s> remove // v4Server - DHCPv4 server
</s> add // v4Server is a DHCPv4 server.
//
// TODO(a.garipov): Think about unifying this and v6Server. </s> remove // v6Server - DHCPv6 server
</s> add // v6Server is a DHCPv6 server.
//
// TODO(a.garipov): Think about unifying this and v4Server. </s> remove
type fakeIface struct {
addrs []net.Addr
err error
}
// Addrs implements the netIface interface for *fakeIface.
func (iface *fakeIface) Addrs() (addrs []net.Addr, err error) {
if iface.err != nil {
return nil, iface.err
}
return iface.addrs, nil
}
func TestIfaceIPv6Addrs(t *testing.T) {
ip := net.IP{1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6}
ip4 := net.IP{1, 2, 3, 4}
addr := &net.IPNet{IP: ip}
errTest := agherr.Error("test error")
testCases := []struct {
name string
iface netIface
want []net.IP
wantErr error
}{{
name: "success",
iface: &fakeIface{addrs: []net.Addr{addr}, err: nil},
want: []net.IP{ip},
wantErr: nil,
}, {
name: "success_with_ipv4",
iface: &fakeIface{
addrs: []net.Addr{addr, &net.IPNet{IP: ip4}},
err: nil,
},
want: []net.IP{ip},
wantErr: nil,
}, {
name: "error",
iface: &fakeIface{addrs: []net.Addr{addr}, err: errTest},
want: nil,
wantErr: errTest,
}}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
got, gotErr := ifaceIPv6Addrs(tc.iface)
assert.Equal(t, tc.want, got)
assert.Equal(t, tc.wantErr, gotErr)
})
}
}
</s> add </s> remove log.Debug("DHCPv6: starting...")
</s> add log.Debug("dhcpv6: listening...") </s> remove return fmt.Errorf("dhcpv6: getting ipv6 addrs for iface %s: %w", ifaceName, err)
}
switch len(dnsIPAddrs) {
case 0:
log.Debug("dhcpv6: no ipv6 address for interface %s", iface.Name)
return nil
case 1:
// See the comment in (*v4Server).Start.
log.Debug("dhcpv6: setting secondary dns ip to iself for interface %s", iface.Name)
dnsIPAddrs = append(dnsIPAddrs, dnsIPAddrs[0])
default:
// Go on.
</s> add return fmt.Errorf("dhcpv6: interface %s: %w", ifaceName, err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a6e18c47000425dc28a2375b2480a16c84d85438 | internal/dhcpd/v6_test.go | |
<mask> assert.True(t, !ip6InRange(net.ParseIP("2001::2"), net.ParseIP("2002::2")))
<mask> assert.True(t, ip6InRange(net.ParseIP("2001::2"), net.ParseIP("2001::2")))
<mask> assert.True(t, ip6InRange(net.ParseIP("2001::2"), net.ParseIP("2001::3")))
<mask> }
<mask>
<mask> type fakeIface struct {
<mask> addrs []net.Addr
<mask> err error
<mask> }
<mask>
<mask> // Addrs implements the netIface interface for *fakeIface.
<mask> func (iface *fakeIface) Addrs() (addrs []net.Addr, err error) {
<mask> if iface.err != nil {
<mask> return nil, iface.err
<mask> }
<mask>
<mask> return iface.addrs, nil
<mask> }
<mask>
<mask> func TestIfaceIPv6Addrs(t *testing.T) {
<mask> ip := net.IP{1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6}
<mask> ip4 := net.IP{1, 2, 3, 4}
<mask> addr := &net.IPNet{IP: ip}
<mask> errTest := agherr.Error("test error")
<mask>
<mask> testCases := []struct {
<mask> name string
<mask> iface netIface
<mask> want []net.IP
<mask> wantErr error
<mask> }{{
<mask> name: "success",
<mask> iface: &fakeIface{addrs: []net.Addr{addr}, err: nil},
<mask> want: []net.IP{ip},
<mask> wantErr: nil,
<mask> }, {
<mask> name: "success_with_ipv4",
<mask> iface: &fakeIface{
<mask> addrs: []net.Addr{addr, &net.IPNet{IP: ip4}},
<mask> err: nil,
<mask> },
<mask> want: []net.IP{ip},
<mask> wantErr: nil,
<mask> }, {
<mask> name: "error",
<mask> iface: &fakeIface{addrs: []net.Addr{addr}, err: errTest},
<mask> want: nil,
<mask> wantErr: errTest,
<mask> }}
<mask>
<mask> for _, tc := range testCases {
<mask> t.Run(tc.name, func(t *testing.T) {
<mask> got, gotErr := ifaceIPv6Addrs(tc.iface)
<mask> assert.Equal(t, tc.want, got)
<mask> assert.Equal(t, tc.wantErr, gotErr)
<mask> })
<mask> }
<mask> }
</s> Pull request: dhcpd: wait for interfaces' ip addresses to appear
Merge in DNS/adguard-home from 2304-dncp-backoff to master
Updates #2304.
Squashed commit of the following:
commit c9bff8b27c6b031d43a7dd98152adcde7f49fff1
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Nov 27 14:08:03 2020 +0300
dhcpd: try for 5s instead of 10s
commit 983cf471832de0e7762b8b6e0a4ba9bb76ecadfc
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Nov 25 19:58:41 2020 +0300
dhcpd: wait for interfaces' ip addresses to appear </s> remove type netIface interface {
Addrs() ([]net.Addr, error)
}
// ifaceIPv6Addrs returns the interface's IPv6 addresses.
func ifaceIPv6Addrs(iface netIface) (ips []net.IP, err error) {
addrs, err := iface.Addrs()
if err != nil {
return nil, err
}
for _, a := range addrs {
ipnet, ok := a.(*net.IPNet)
if !ok {
continue
}
if ip := ipnet.IP.To4(); ip == nil {
// Assume that net.(*Interface).Addrs can only return
// valid IPv4 and IPv6 addresses. Since this isn't an
// IPv4 address, it must be an IPv6 one.
ips = append(ips, ipnet.IP)
}
}
return ips, nil
}
</s> add </s> remove // ifaceIPv4Addrs returns the interface's IPv4 addresses.
func ifaceIPv4Addrs(iface *net.Interface) (ips []net.IP, err error) {
addrs, err := iface.Addrs()
if err != nil {
return nil, err
}
for _, a := range addrs {
ipnet, ok := a.(*net.IPNet)
if !ok {
continue
}
if ip := ipnet.IP.To4(); ip != nil {
ips = append(ips, ip)
}
}
return ips, nil
}
</s> add </s> remove log.Debug("dhcpv4: starting...")
</s> add log.Debug("dhcpv6: starting...") </s> remove ifaceIPNet, err := ifaceIPv4Addrs(iface)
</s> add ifaceIPNet, err := ifaceIPAddrs(iface, ipVersion4) </s> remove dnsIPAddrs, err := ifaceIPv6Addrs(iface)
</s> add dnsIPAddrs, err := ifaceDNSIPAddrs(iface, ipVersion6, defaultMaxAttempts, defaultBackoff) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"re... | https://github.com/AdguardTeam/AdGuardHome/commit/a6e18c47000425dc28a2375b2480a16c84d85438 | internal/dhcpd/v6_test.go | |
"example_upstream_reserved": "You can specify a DNS upstream <0>for the specific domain(s)</0>",
"example_upstream_comment": "You can specify a comment",
"upstream_parallel": "Use parallel queries to speed up resolving by querying all upstream servers simultaneously.", | <mask> {
<mask> "client_settings": "Client settings",
<mask> "example_upstream_reserved": "You can specify DNS upstream <0>for the specific domain(s)</0>",
<mask> "example_upstream_comment": "You can specify the comment",
<mask> "upstream_parallel": "Use parallel requests to speed up resolving by simultaneously querying all upstream servers",
<mask> "parallel_requests": "Parallel requests",
<mask> "load_balancing": "Load-balancing",
<mask> "load_balancing_desc": "Query one server at a time. AdGuard Home will use the weighted random algorithm to pick the server so that the fastest server will be used more often.",
<mask> "bootstrap_dns": "Bootstrap DNS servers",
<mask> "bootstrap_dns_desc": "Bootstrap DNS servers are used to resolve IP addresses of the DoH/DoT resolvers you specify as upstreams.",
</s> Pull request: client: imp en locale, grammar
Merge in DNS/adguard-home from imp-i18n to master
Squashed commit of the following:
commit 49f565db4e7167ed404413b6eaa75b0ab38c79d4
Merge: f60989f0 1d07afb3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:18 2021 +0300
Merge branch 'master' into imp-i18n
commit f60989f069fd7c52d00e41e4aaad2e824d2d2e2e
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:03 2021 +0300
client: imp wording
commit 6909bb89f7af74c8245ecd81dc255b2890202cca
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 18:33:42 2021 +0300
client: imp en locale, grammar </s> remove "load_balancing_desc": "Query one server at a time. AdGuard Home will use the weighted random algorithm to pick the server so that the fastest server will be used more often.",
</s> add "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.", </s> remove "save_config": "Save config",
</s> add "save_config": "Save configuration", </s> remove "fastest_addr_desc": "Query all DNS servers and return the fastest IP address among all responses. This will slow down the DNS queries as we have to wait for responses from all DNS servers, but improve the overall connectivity.",
</s> add "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.", </s> remove "install_devices_router_list_4": "You can't set a custom DNS server on some types of routers. In this case it may help if you set up AdGuard Home as a <0>DHCP server</0>. Otherwise, you should search for the manual on how to customize DNS servers for your particular router model.",
</s> add "install_devices_router_list_4": "On some router types, a custom DNS server cannot be set up. In that case, setting up AdGuard Home as a <0>DHCP server</0> may help. Otherwise, you should check the router manual on how to customize DNS servers on your specific router model.", </s> remove "access_blocked_desc": "Don't confuse this with filters. AdGuard Home will drop DNS queries with these domains in query's question. Here you can specify the exact domain names, wildcards and urlfilter-rules, e.g. 'example.org', '*.example.org' or '||example.org^'.",
</s> add "access_blocked_desc": "Don't confuse this with filters. AdGuard Home will drop DNS queries with these domains in queries' questions. Here you can specify the exact domain names, wildcards and URL filter rules, e.g. \"example.org\", \"*.example.org\" or \"||example.org^\".", | [
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a72ce1cfae8b726ffdc329ef004c02e64a5b4be1 | client/src/__locales/en.json |
"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.", | <mask> "example_upstream_comment": "You can specify the comment",
<mask> "upstream_parallel": "Use parallel requests to speed up resolving by simultaneously querying all upstream servers",
<mask> "parallel_requests": "Parallel requests",
<mask> "load_balancing": "Load-balancing",
<mask> "load_balancing_desc": "Query one server at a time. AdGuard Home will use the weighted random algorithm to pick the server so that the fastest server will be used more often.",
<mask> "bootstrap_dns": "Bootstrap DNS servers",
<mask> "bootstrap_dns_desc": "Bootstrap DNS servers are used to resolve IP addresses of the DoH/DoT resolvers you specify as upstreams.",
<mask> "check_dhcp_servers": "Check for DHCP servers",
<mask> "save_config": "Save config",
<mask> "enabled_dhcp": "DHCP server enabled",
</s> Pull request: client: imp en locale, grammar
Merge in DNS/adguard-home from imp-i18n to master
Squashed commit of the following:
commit 49f565db4e7167ed404413b6eaa75b0ab38c79d4
Merge: f60989f0 1d07afb3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:18 2021 +0300
Merge branch 'master' into imp-i18n
commit f60989f069fd7c52d00e41e4aaad2e824d2d2e2e
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:03 2021 +0300
client: imp wording
commit 6909bb89f7af74c8245ecd81dc255b2890202cca
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 18:33:42 2021 +0300
client: imp en locale, grammar </s> remove "example_upstream_reserved": "You can specify DNS upstream <0>for the specific domain(s)</0>",
"example_upstream_comment": "You can specify the comment",
"upstream_parallel": "Use parallel requests to speed up resolving by simultaneously querying all upstream servers",
</s> add "example_upstream_reserved": "You can specify a DNS upstream <0>for the specific domain(s)</0>",
"example_upstream_comment": "You can specify a comment",
"upstream_parallel": "Use parallel queries to speed up resolving by querying all upstream servers simultaneously.", </s> remove "save_config": "Save config",
</s> add "save_config": "Save configuration", </s> remove "fastest_addr_desc": "Query all DNS servers and return the fastest IP address among all responses. This will slow down the DNS queries as we have to wait for responses from all DNS servers, but improve the overall connectivity.",
</s> add "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.", </s> remove "install_devices_router_list_4": "You can't set a custom DNS server on some types of routers. In this case it may help if you set up AdGuard Home as a <0>DHCP server</0>. Otherwise, you should search for the manual on how to customize DNS servers for your particular router model.",
</s> add "install_devices_router_list_4": "On some router types, a custom DNS server cannot be set up. In that case, setting up AdGuard Home as a <0>DHCP server</0> may help. Otherwise, you should check the router manual on how to customize DNS servers on your specific router model.", </s> remove "access_blocked_desc": "Don't confuse this with filters. AdGuard Home will drop DNS queries with these domains in query's question. Here you can specify the exact domain names, wildcards and urlfilter-rules, e.g. 'example.org', '*.example.org' or '||example.org^'.",
</s> add "access_blocked_desc": "Don't confuse this with filters. AdGuard Home will drop DNS queries with these domains in queries' questions. Here you can specify the exact domain names, wildcards and URL filter rules, e.g. \"example.org\", \"*.example.org\" or \"||example.org^\".", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a72ce1cfae8b726ffdc329ef004c02e64a5b4be1 | client/src/__locales/en.json |
"save_config": "Save configuration", | <mask> "load_balancing_desc": "Query one server at a time. AdGuard Home will use the weighted random algorithm to pick the server so that the fastest server will be used more often.",
<mask> "bootstrap_dns": "Bootstrap DNS servers",
<mask> "bootstrap_dns_desc": "Bootstrap DNS servers are used to resolve IP addresses of the DoH/DoT resolvers you specify as upstreams.",
<mask> "check_dhcp_servers": "Check for DHCP servers",
<mask> "save_config": "Save config",
<mask> "enabled_dhcp": "DHCP server enabled",
<mask> "disabled_dhcp": "DHCP server disabled",
<mask> "unavailable_dhcp": "DHCP is unavailable",
<mask> "unavailable_dhcp_desc": "AdGuard Home cannot run a DHCP server on your OS",
<mask> "dhcp_title": "DHCP server (experimental!)",
</s> Pull request: client: imp en locale, grammar
Merge in DNS/adguard-home from imp-i18n to master
Squashed commit of the following:
commit 49f565db4e7167ed404413b6eaa75b0ab38c79d4
Merge: f60989f0 1d07afb3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:18 2021 +0300
Merge branch 'master' into imp-i18n
commit f60989f069fd7c52d00e41e4aaad2e824d2d2e2e
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:03 2021 +0300
client: imp wording
commit 6909bb89f7af74c8245ecd81dc255b2890202cca
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 18:33:42 2021 +0300
client: imp en locale, grammar </s> remove "load_balancing_desc": "Query one server at a time. AdGuard Home will use the weighted random algorithm to pick the server so that the fastest server will be used more often.",
</s> add "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.", </s> remove "example_upstream_reserved": "You can specify DNS upstream <0>for the specific domain(s)</0>",
"example_upstream_comment": "You can specify the comment",
"upstream_parallel": "Use parallel requests to speed up resolving by simultaneously querying all upstream servers",
</s> add "example_upstream_reserved": "You can specify a DNS upstream <0>for the specific domain(s)</0>",
"example_upstream_comment": "You can specify a comment",
"upstream_parallel": "Use parallel queries to speed up resolving by querying all upstream servers simultaneously.", </s> remove "dhcp_not_found": "It is safe to enable the built-in DHCP server - we didn't find any active DHCP servers on the network. However, we encourage you to re-check it manually as our automatic test currently doesn't give 100% guarantee.",
</s> add "dhcp_not_found": "It is safe to enable the built-in DHCP server because AdGuard Home didn't find any active DHCP servers on the network. However, you should re-check that manually as the automatic probing doesn't currently provide a 100% guarantee.", </s> remove "fastest_addr_desc": "Query all DNS servers and return the fastest IP address among all responses. This will slow down the DNS queries as we have to wait for responses from all DNS servers, but improve the overall connectivity.",
</s> add "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.", </s> remove "dhcp_config_saved": "DHCP config successfully saved",
</s> add "dhcp_config_saved": "DHCP configuration successfully saved", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a72ce1cfae8b726ffdc329ef004c02e64a5b4be1 | client/src/__locales/en.json |
"dhcp_not_found": "It is safe to enable the built-in DHCP server because AdGuard Home didn't find any active DHCP servers on the network. However, you should re-check that manually as the automatic probing doesn't currently provide a 100% guarantee.", | <mask> "dhcp_title": "DHCP server (experimental!)",
<mask> "dhcp_description": "If your router does not provide DHCP settings, you can use AdGuard's own built-in DHCP server.",
<mask> "dhcp_enable": "Enable DHCP server",
<mask> "dhcp_disable": "Disable DHCP server",
<mask> "dhcp_not_found": "It is safe to enable the built-in DHCP server - we didn't find any active DHCP servers on the network. However, we encourage you to re-check it manually as our automatic test currently doesn't give 100% guarantee.",
<mask> "dhcp_found": "An active DHCP server is found on the network. It is not safe to enable the built-in DHCP server.",
<mask> "dhcp_leases": "DHCP leases",
<mask> "dhcp_static_leases": "DHCP static leases",
<mask> "dhcp_leases_not_found": "No DHCP leases found",
<mask> "dhcp_config_saved": "DHCP config successfully saved",
</s> Pull request: client: imp en locale, grammar
Merge in DNS/adguard-home from imp-i18n to master
Squashed commit of the following:
commit 49f565db4e7167ed404413b6eaa75b0ab38c79d4
Merge: f60989f0 1d07afb3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:18 2021 +0300
Merge branch 'master' into imp-i18n
commit f60989f069fd7c52d00e41e4aaad2e824d2d2e2e
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:03 2021 +0300
client: imp wording
commit 6909bb89f7af74c8245ecd81dc255b2890202cca
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 18:33:42 2021 +0300
client: imp en locale, grammar </s> remove "dhcp_config_saved": "DHCP config successfully saved",
</s> add "dhcp_config_saved": "DHCP configuration successfully saved", </s> remove "dhcp_warning": "If you want to enable DHCP server anyway, make sure that there is no other active DHCP server in your network. Otherwise, it can break the Internet for connected devices!",
"dhcp_error": "We could not determine whether there is another DHCP server in the network.",
"dhcp_static_ip_error": "In order to use DHCP server a static IP address must be set. We failed to determine if this network interface is configured using static IP address. Please set a static IP address manually.",
"dhcp_dynamic_ip_found": "Your system uses dynamic IP address configuration for interface <0>{{interfaceName}}</0>. In order to use DHCP server a static IP address must be set. Your current IP address is <0>{{ipAddress}}</0>. We will automatically set this IP address as static if you press Enable DHCP button.",
</s> add "dhcp_warning": "If you want to enable DHCP server anyway, make sure that there is no other active DHCP server in your network, as this may break the Internet connectivity for devices on the network!",
"dhcp_error": "AdGuard Home could not determine if there is another active DHCP server on the network.",
"dhcp_static_ip_error": "In order to use DHCP server a static IP address must be set. AdGuard Home failed to determine if this network interface is configured using a static IP address. Please set a static IP address manually.",
"dhcp_dynamic_ip_found": "Your system uses dynamic IP address configuration for interface <0>{{interfaceName}}</0>. In order to use DHCP server, a static IP address must be set. Your current IP address is <0>{{ipAddress}}</0>. AdGuard Home will automatically set this IP address as static if you press the \"Enable DHCP\" button.", </s> remove "save_config": "Save config",
</s> add "save_config": "Save configuration", </s> remove "setup_config_to_enable_dhcp_server": "Setup config to enable DHCP server",
</s> add "setup_config_to_enable_dhcp_server": "Setup configuration to enable DHCP server", </s> remove "dhcp_reset": "Are you sure you want to reset DHCP config?",
</s> add "dhcp_reset": "Are you sure you want to reset the DHCP configuration?", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a72ce1cfae8b726ffdc329ef004c02e64a5b4be1 | client/src/__locales/en.json |
"dhcp_config_saved": "DHCP configuration successfully saved", | <mask> "dhcp_found": "An active DHCP server is found on the network. It is not safe to enable the built-in DHCP server.",
<mask> "dhcp_leases": "DHCP leases",
<mask> "dhcp_static_leases": "DHCP static leases",
<mask> "dhcp_leases_not_found": "No DHCP leases found",
<mask> "dhcp_config_saved": "DHCP config successfully saved",
<mask> "dhcp_ipv4_settings": "DHCP IPv4 Settings",
<mask> "dhcp_ipv6_settings": "DHCP IPv6 Settings",
<mask> "form_error_required": "Required field",
<mask> "form_error_ip4_format": "Invalid IPv4 format",
<mask> "form_error_ip6_format": "Invalid IPv6 format",
</s> Pull request: client: imp en locale, grammar
Merge in DNS/adguard-home from imp-i18n to master
Squashed commit of the following:
commit 49f565db4e7167ed404413b6eaa75b0ab38c79d4
Merge: f60989f0 1d07afb3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:18 2021 +0300
Merge branch 'master' into imp-i18n
commit f60989f069fd7c52d00e41e4aaad2e824d2d2e2e
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:03 2021 +0300
client: imp wording
commit 6909bb89f7af74c8245ecd81dc255b2890202cca
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 18:33:42 2021 +0300
client: imp en locale, grammar </s> remove "dhcp_not_found": "It is safe to enable the built-in DHCP server - we didn't find any active DHCP servers on the network. However, we encourage you to re-check it manually as our automatic test currently doesn't give 100% guarantee.",
</s> add "dhcp_not_found": "It is safe to enable the built-in DHCP server because AdGuard Home didn't find any active DHCP servers on the network. However, you should re-check that manually as the automatic probing doesn't currently provide a 100% guarantee.", </s> remove "save_config": "Save config",
</s> add "save_config": "Save configuration", </s> remove "dhcp_warning": "If you want to enable DHCP server anyway, make sure that there is no other active DHCP server in your network. Otherwise, it can break the Internet for connected devices!",
"dhcp_error": "We could not determine whether there is another DHCP server in the network.",
"dhcp_static_ip_error": "In order to use DHCP server a static IP address must be set. We failed to determine if this network interface is configured using static IP address. Please set a static IP address manually.",
"dhcp_dynamic_ip_found": "Your system uses dynamic IP address configuration for interface <0>{{interfaceName}}</0>. In order to use DHCP server a static IP address must be set. Your current IP address is <0>{{ipAddress}}</0>. We will automatically set this IP address as static if you press Enable DHCP button.",
</s> add "dhcp_warning": "If you want to enable DHCP server anyway, make sure that there is no other active DHCP server in your network, as this may break the Internet connectivity for devices on the network!",
"dhcp_error": "AdGuard Home could not determine if there is another active DHCP server on the network.",
"dhcp_static_ip_error": "In order to use DHCP server a static IP address must be set. AdGuard Home failed to determine if this network interface is configured using a static IP address. Please set a static IP address manually.",
"dhcp_dynamic_ip_found": "Your system uses dynamic IP address configuration for interface <0>{{interfaceName}}</0>. In order to use DHCP server, a static IP address must be set. Your current IP address is <0>{{ipAddress}}</0>. AdGuard Home will automatically set this IP address as static if you press the \"Enable DHCP\" button.", </s> remove "dhcp_reset": "Are you sure you want to reset DHCP config?",
</s> add "dhcp_reset": "Are you sure you want to reset the DHCP configuration?", </s> remove "load_balancing_desc": "Query one server at a time. AdGuard Home will use the weighted random algorithm to pick the server so that the fastest server will be used more often.",
</s> add "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.", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a72ce1cfae8b726ffdc329ef004c02e64a5b4be1 | client/src/__locales/en.json |
"dhcp_warning": "If you want to enable DHCP server anyway, make sure that there is no other active DHCP server in your network, as this may break the Internet connectivity for devices on the network!",
"dhcp_error": "AdGuard Home could not determine if there is another active DHCP server on the network.",
"dhcp_static_ip_error": "In order to use DHCP server a static IP address must be set. AdGuard Home failed to determine if this network interface is configured using a static IP address. Please set a static IP address manually.",
"dhcp_dynamic_ip_found": "Your system uses dynamic IP address configuration for interface <0>{{interfaceName}}</0>. In order to use DHCP server, a static IP address must be set. Your current IP address is <0>{{ipAddress}}</0>. AdGuard Home will automatically set this IP address as static if you press the \"Enable DHCP\" button.", | <mask> "dhcp_ip_addresses": "IP addresses",
<mask> "ip": "IP",
<mask> "dhcp_table_hostname": "Hostname",
<mask> "dhcp_table_expires": "Expires",
<mask> "dhcp_warning": "If you want to enable DHCP server anyway, make sure that there is no other active DHCP server in your network. Otherwise, it can break the Internet for connected devices!",
<mask> "dhcp_error": "We could not determine whether there is another DHCP server in the network.",
<mask> "dhcp_static_ip_error": "In order to use DHCP server a static IP address must be set. We failed to determine if this network interface is configured using static IP address. Please set a static IP address manually.",
<mask> "dhcp_dynamic_ip_found": "Your system uses dynamic IP address configuration for interface <0>{{interfaceName}}</0>. In order to use DHCP server a static IP address must be set. Your current IP address is <0>{{ipAddress}}</0>. We will automatically set this IP address as static if you press Enable DHCP button.",
<mask> "dhcp_lease_added": "Static lease \"{{key}}\" successfully added",
<mask> "dhcp_lease_deleted": "Static lease \"{{key}}\" successfully deleted",
<mask> "dhcp_new_static_lease": "New static lease",
<mask> "dhcp_static_leases_not_found": "No DHCP static leases found",
<mask> "dhcp_add_static_lease": "Add static lease",
</s> Pull request: client: imp en locale, grammar
Merge in DNS/adguard-home from imp-i18n to master
Squashed commit of the following:
commit 49f565db4e7167ed404413b6eaa75b0ab38c79d4
Merge: f60989f0 1d07afb3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:18 2021 +0300
Merge branch 'master' into imp-i18n
commit f60989f069fd7c52d00e41e4aaad2e824d2d2e2e
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:03 2021 +0300
client: imp wording
commit 6909bb89f7af74c8245ecd81dc255b2890202cca
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 18:33:42 2021 +0300
client: imp en locale, grammar </s> remove "dhcp_reset": "Are you sure you want to reset DHCP config?",
</s> add "dhcp_reset": "Are you sure you want to reset the DHCP configuration?", </s> remove "dhcp_not_found": "It is safe to enable the built-in DHCP server - we didn't find any active DHCP servers on the network. However, we encourage you to re-check it manually as our automatic test currently doesn't give 100% guarantee.",
</s> add "dhcp_not_found": "It is safe to enable the built-in DHCP server because AdGuard Home didn't find any active DHCP servers on the network. However, you should re-check that manually as the automatic probing doesn't currently provide a 100% guarantee.", </s> remove "dhcp_config_saved": "DHCP config successfully saved",
</s> add "dhcp_config_saved": "DHCP configuration successfully saved", </s> remove "rate_limit_desc": "The number of requests per second that a single client is allowed to make (setting it to 0 means unlimited)",
</s> add "rate_limit_desc": "The number of requests per second allowed per client. Setting it to 0 means no limit.", </s> remove "fastest_addr_desc": "Query all DNS servers and return the fastest IP address among all responses. This will slow down the DNS queries as we have to wait for responses from all DNS servers, but improve the overall connectivity.",
</s> add "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.", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a72ce1cfae8b726ffdc329ef004c02e64a5b4be1 | client/src/__locales/en.json |
"dhcp_reset": "Are you sure you want to reset the DHCP configuration?", | <mask> "dhcp_lease_deleted": "Static lease \"{{key}}\" successfully deleted",
<mask> "dhcp_new_static_lease": "New static lease",
<mask> "dhcp_static_leases_not_found": "No DHCP static leases found",
<mask> "dhcp_add_static_lease": "Add static lease",
<mask> "dhcp_reset": "Are you sure you want to reset DHCP config?",
<mask> "country": "Country",
<mask> "city": "City",
<mask> "delete_confirm": "Are you sure you want to delete \"{{key}}\"?",
<mask> "form_enter_hostname": "Enter hostname",
<mask> "error_details": "Error details",
</s> Pull request: client: imp en locale, grammar
Merge in DNS/adguard-home from imp-i18n to master
Squashed commit of the following:
commit 49f565db4e7167ed404413b6eaa75b0ab38c79d4
Merge: f60989f0 1d07afb3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:18 2021 +0300
Merge branch 'master' into imp-i18n
commit f60989f069fd7c52d00e41e4aaad2e824d2d2e2e
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:03 2021 +0300
client: imp wording
commit 6909bb89f7af74c8245ecd81dc255b2890202cca
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 18:33:42 2021 +0300
client: imp en locale, grammar </s> remove "dhcp_warning": "If you want to enable DHCP server anyway, make sure that there is no other active DHCP server in your network. Otherwise, it can break the Internet for connected devices!",
"dhcp_error": "We could not determine whether there is another DHCP server in the network.",
"dhcp_static_ip_error": "In order to use DHCP server a static IP address must be set. We failed to determine if this network interface is configured using static IP address. Please set a static IP address manually.",
"dhcp_dynamic_ip_found": "Your system uses dynamic IP address configuration for interface <0>{{interfaceName}}</0>. In order to use DHCP server a static IP address must be set. Your current IP address is <0>{{ipAddress}}</0>. We will automatically set this IP address as static if you press Enable DHCP button.",
</s> add "dhcp_warning": "If you want to enable DHCP server anyway, make sure that there is no other active DHCP server in your network, as this may break the Internet connectivity for devices on the network!",
"dhcp_error": "AdGuard Home could not determine if there is another active DHCP server on the network.",
"dhcp_static_ip_error": "In order to use DHCP server a static IP address must be set. AdGuard Home failed to determine if this network interface is configured using a static IP address. Please set a static IP address manually.",
"dhcp_dynamic_ip_found": "Your system uses dynamic IP address configuration for interface <0>{{interfaceName}}</0>. In order to use DHCP server, a static IP address must be set. Your current IP address is <0>{{ipAddress}}</0>. AdGuard Home will automatically set this IP address as static if you press the \"Enable DHCP\" button.", </s> remove "form_error_port_range": "Enter port value in the range of 80-65535",
</s> add "form_error_port_range": "Enter port number in the range of 80-65535", </s> remove "dhcp_not_found": "It is safe to enable the built-in DHCP server - we didn't find any active DHCP servers on the network. However, we encourage you to re-check it manually as our automatic test currently doesn't give 100% guarantee.",
</s> add "dhcp_not_found": "It is safe to enable the built-in DHCP server because AdGuard Home didn't find any active DHCP servers on the network. However, you should re-check that manually as the automatic probing doesn't currently provide a 100% guarantee.", </s> remove "dhcp_config_saved": "DHCP config successfully saved",
</s> add "dhcp_config_saved": "DHCP configuration successfully saved", </s> remove "install_devices_router_list_4": "You can't set a custom DNS server on some types of routers. In this case it may help if you set up AdGuard Home as a <0>DHCP server</0>. Otherwise, you should search for the manual on how to customize DNS servers for your particular router model.",
</s> add "install_devices_router_list_4": "On some router types, a custom DNS server cannot be set up. In that case, setting up AdGuard Home as a <0>DHCP server</0> may help. Otherwise, you should check the router manual on how to customize DNS servers on your specific router model.", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a72ce1cfae8b726ffdc329ef004c02e64a5b4be1 | client/src/__locales/en.json |
"number_of_dns_query_days": "The number of DNS queries processed for the last {{count}} day",
"number_of_dns_query_days_plural": "The number of DNS queries processed for the last {{count}} days",
"number_of_dns_query_24_hours": "The number of DNS queries processed for the last 24 hours",
"number_of_dns_query_blocked_24_hours": "The number of DNS requests blocked by adblock filters and hosts blocklists",
"number_of_dns_query_blocked_24_hours_by_sec": "The number of DNS requests blocked by the AdGuard browsing security module",
"number_of_dns_query_blocked_24_hours_adult": "The number of adult websites blocked", | <mask> "top_blocked_domains": "Top blocked domains",
<mask> "top_clients": "Top clients",
<mask> "no_clients_found": "No clients found",
<mask> "general_statistics": "General statistics",
<mask> "number_of_dns_query_days": "A number of DNS queries processed for the last {{count}} day",
<mask> "number_of_dns_query_days_plural": "A number of DNS queries processed for the last {{count}} days",
<mask> "number_of_dns_query_24_hours": "A number of DNS queries processed for the last 24 hours",
<mask> "number_of_dns_query_blocked_24_hours": "A number of DNS requests blocked by adblock filters and hosts blocklists",
<mask> "number_of_dns_query_blocked_24_hours_by_sec": "A number of DNS requests blocked by the AdGuard browsing security module",
<mask> "number_of_dns_query_blocked_24_hours_adult": "A number of adult websites blocked",
<mask> "enforced_save_search": "Enforced safe search",
<mask> "number_of_dns_query_to_safe_search": "A number of DNS requests to search engines for which Safe Search was enforced",
<mask> "average_processing_time": "Average processing time",
<mask> "average_processing_time_hint": "Average time in milliseconds on processing a DNS request",
<mask> "block_domain_use_filters_and_hosts": "Block domains using filters and hosts files",
</s> Pull request: client: imp en locale, grammar
Merge in DNS/adguard-home from imp-i18n to master
Squashed commit of the following:
commit 49f565db4e7167ed404413b6eaa75b0ab38c79d4
Merge: f60989f0 1d07afb3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:18 2021 +0300
Merge branch 'master' into imp-i18n
commit f60989f069fd7c52d00e41e4aaad2e824d2d2e2e
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:03 2021 +0300
client: imp wording
commit 6909bb89f7af74c8245ecd81dc255b2890202cca
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 18:33:42 2021 +0300
client: imp en locale, grammar </s> remove "number_of_dns_query_to_safe_search": "A number of DNS requests to search engines for which Safe Search was enforced",
</s> add "number_of_dns_query_to_safe_search": "The number of DNS requests to search engines for which Safe Search was enforced", </s> remove "rate_limit_desc": "The number of requests per second that a single client is allowed to make (setting it to 0 means unlimited)",
</s> add "rate_limit_desc": "The number of requests per second allowed per client. Setting it to 0 means no limit.", </s> remove "access_blocked_desc": "Don't confuse this with filters. AdGuard Home will drop DNS queries with these domains in query's question. Here you can specify the exact domain names, wildcards and urlfilter-rules, e.g. 'example.org', '*.example.org' or '||example.org^'.",
</s> add "access_blocked_desc": "Don't confuse this with filters. AdGuard Home will drop DNS queries with these domains in queries' questions. Here you can specify the exact domain names, wildcards and URL filter rules, e.g. \"example.org\", \"*.example.org\" or \"||example.org^\".", </s> remove "fastest_addr_desc": "Query all DNS servers and return the fastest IP address among all responses. This will slow down the DNS queries as we have to wait for responses from all DNS servers, but improve the overall connectivity.",
</s> add "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.", </s> remove "install_devices_router_list_4": "You can't set a custom DNS server on some types of routers. In this case it may help if you set up AdGuard Home as a <0>DHCP server</0>. Otherwise, you should search for the manual on how to customize DNS servers for your particular router model.",
</s> add "install_devices_router_list_4": "On some router types, a custom DNS server cannot be set up. In that case, setting up AdGuard Home as a <0>DHCP server</0> may help. Otherwise, you should check the router manual on how to customize DNS servers on your specific router model.", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a72ce1cfae8b726ffdc329ef004c02e64a5b4be1 | client/src/__locales/en.json |
"number_of_dns_query_to_safe_search": "The number of DNS requests to search engines for which Safe Search was enforced", | <mask> "number_of_dns_query_blocked_24_hours": "A number of DNS requests blocked by adblock filters and hosts blocklists",
<mask> "number_of_dns_query_blocked_24_hours_by_sec": "A number of DNS requests blocked by the AdGuard browsing security module",
<mask> "number_of_dns_query_blocked_24_hours_adult": "A number of adult websites blocked",
<mask> "enforced_save_search": "Enforced safe search",
<mask> "number_of_dns_query_to_safe_search": "A number of DNS requests to search engines for which Safe Search was enforced",
<mask> "average_processing_time": "Average processing time",
<mask> "average_processing_time_hint": "Average time in milliseconds on processing a DNS request",
<mask> "block_domain_use_filters_and_hosts": "Block domains using filters and hosts files",
<mask> "filters_block_toggle_hint": "You can setup blocking rules in the <a>Filters</a> settings.",
<mask> "use_adguard_browsing_sec": "Use AdGuard browsing security web service",
</s> Pull request: client: imp en locale, grammar
Merge in DNS/adguard-home from imp-i18n to master
Squashed commit of the following:
commit 49f565db4e7167ed404413b6eaa75b0ab38c79d4
Merge: f60989f0 1d07afb3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:18 2021 +0300
Merge branch 'master' into imp-i18n
commit f60989f069fd7c52d00e41e4aaad2e824d2d2e2e
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:03 2021 +0300
client: imp wording
commit 6909bb89f7af74c8245ecd81dc255b2890202cca
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 18:33:42 2021 +0300
client: imp en locale, grammar </s> remove "number_of_dns_query_days": "A number of DNS queries processed for the last {{count}} day",
"number_of_dns_query_days_plural": "A number of DNS queries processed for the last {{count}} days",
"number_of_dns_query_24_hours": "A number of DNS queries processed for the last 24 hours",
"number_of_dns_query_blocked_24_hours": "A number of DNS requests blocked by adblock filters and hosts blocklists",
"number_of_dns_query_blocked_24_hours_by_sec": "A number of DNS requests blocked by the AdGuard browsing security module",
"number_of_dns_query_blocked_24_hours_adult": "A number of adult websites blocked",
</s> add "number_of_dns_query_days": "The number of DNS queries processed for the last {{count}} day",
"number_of_dns_query_days_plural": "The number of DNS queries processed for the last {{count}} days",
"number_of_dns_query_24_hours": "The number of DNS queries processed for the last 24 hours",
"number_of_dns_query_blocked_24_hours": "The number of DNS requests blocked by adblock filters and hosts blocklists",
"number_of_dns_query_blocked_24_hours_by_sec": "The number of DNS requests blocked by the AdGuard browsing security module",
"number_of_dns_query_blocked_24_hours_adult": "The number of adult websites blocked", </s> remove "rate_limit_desc": "The number of requests per second that a single client is allowed to make (setting it to 0 means unlimited)",
</s> add "rate_limit_desc": "The number of requests per second allowed per client. Setting it to 0 means no limit.", </s> remove "access_blocked_desc": "Don't confuse this with filters. AdGuard Home will drop DNS queries with these domains in query's question. Here you can specify the exact domain names, wildcards and urlfilter-rules, e.g. 'example.org', '*.example.org' or '||example.org^'.",
</s> add "access_blocked_desc": "Don't confuse this with filters. AdGuard Home will drop DNS queries with these domains in queries' questions. Here you can specify the exact domain names, wildcards and URL filter rules, e.g. \"example.org\", \"*.example.org\" or \"||example.org^\".", </s> remove "install_devices_router_list_4": "You can't set a custom DNS server on some types of routers. In this case it may help if you set up AdGuard Home as a <0>DHCP server</0>. Otherwise, you should search for the manual on how to customize DNS servers for your particular router model.",
</s> add "install_devices_router_list_4": "On some router types, a custom DNS server cannot be set up. In that case, setting up AdGuard Home as a <0>DHCP server</0> may help. Otherwise, you should check the router manual on how to customize DNS servers on your specific router model.", </s> remove "fastest_addr_desc": "Query all DNS servers and return the fastest IP address among all responses. This will slow down the DNS queries as we have to wait for responses from all DNS servers, but improve the overall connectivity.",
</s> add "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.", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a72ce1cfae8b726ffdc329ef004c02e64a5b4be1 | client/src/__locales/en.json |
"rate_limit_desc": "The number of requests per second allowed per client. Setting it to 0 means no limit.", | <mask> "form_enter_rate_limit": "Enter rate limit",
<mask> "rate_limit": "Rate limit",
<mask> "edns_enable": "Enable EDNS Client Subnet",
<mask> "edns_cs_desc": "If enabled, AdGuard Home will be sending clients' subnets to the DNS servers.",
<mask> "rate_limit_desc": "The number of requests per second that a single client is allowed to make (setting it to 0 means unlimited)",
<mask> "blocking_ipv4_desc": "IP address to be returned for a blocked A request",
<mask> "blocking_ipv6_desc": "IP address to be returned for a blocked AAAA request",
<mask> "blocking_mode_default": "Default: Respond with zero IP address (0.0.0.0 for A; :: for AAAA) when blocked by Adblock-style rule; respond with the IP address specified in the rule when blocked by /etc/hosts-style rule",
<mask> "blocking_mode_refused": "REFUSED: Respond with REFUSED code",
<mask> "blocking_mode_nxdomain": "NXDOMAIN: Respond with NXDOMAIN code",
</s> Pull request: client: imp en locale, grammar
Merge in DNS/adguard-home from imp-i18n to master
Squashed commit of the following:
commit 49f565db4e7167ed404413b6eaa75b0ab38c79d4
Merge: f60989f0 1d07afb3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:18 2021 +0300
Merge branch 'master' into imp-i18n
commit f60989f069fd7c52d00e41e4aaad2e824d2d2e2e
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:03 2021 +0300
client: imp wording
commit 6909bb89f7af74c8245ecd81dc255b2890202cca
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 18:33:42 2021 +0300
client: imp en locale, grammar </s> remove "fastest_addr_desc": "Query all DNS servers and return the fastest IP address among all responses. This will slow down the DNS queries as we have to wait for responses from all DNS servers, but improve the overall connectivity.",
</s> add "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.", </s> remove "dhcp_warning": "If you want to enable DHCP server anyway, make sure that there is no other active DHCP server in your network. Otherwise, it can break the Internet for connected devices!",
"dhcp_error": "We could not determine whether there is another DHCP server in the network.",
"dhcp_static_ip_error": "In order to use DHCP server a static IP address must be set. We failed to determine if this network interface is configured using static IP address. Please set a static IP address manually.",
"dhcp_dynamic_ip_found": "Your system uses dynamic IP address configuration for interface <0>{{interfaceName}}</0>. In order to use DHCP server a static IP address must be set. Your current IP address is <0>{{ipAddress}}</0>. We will automatically set this IP address as static if you press Enable DHCP button.",
</s> add "dhcp_warning": "If you want to enable DHCP server anyway, make sure that there is no other active DHCP server in your network, as this may break the Internet connectivity for devices on the network!",
"dhcp_error": "AdGuard Home could not determine if there is another active DHCP server on the network.",
"dhcp_static_ip_error": "In order to use DHCP server a static IP address must be set. AdGuard Home failed to determine if this network interface is configured using a static IP address. Please set a static IP address manually.",
"dhcp_dynamic_ip_found": "Your system uses dynamic IP address configuration for interface <0>{{interfaceName}}</0>. In order to use DHCP server, a static IP address must be set. Your current IP address is <0>{{ipAddress}}</0>. AdGuard Home will automatically set this IP address as static if you press the \"Enable DHCP\" button.", </s> remove "number_of_dns_query_days": "A number of DNS queries processed for the last {{count}} day",
"number_of_dns_query_days_plural": "A number of DNS queries processed for the last {{count}} days",
"number_of_dns_query_24_hours": "A number of DNS queries processed for the last 24 hours",
"number_of_dns_query_blocked_24_hours": "A number of DNS requests blocked by adblock filters and hosts blocklists",
"number_of_dns_query_blocked_24_hours_by_sec": "A number of DNS requests blocked by the AdGuard browsing security module",
"number_of_dns_query_blocked_24_hours_adult": "A number of adult websites blocked",
</s> add "number_of_dns_query_days": "The number of DNS queries processed for the last {{count}} day",
"number_of_dns_query_days_plural": "The number of DNS queries processed for the last {{count}} days",
"number_of_dns_query_24_hours": "The number of DNS queries processed for the last 24 hours",
"number_of_dns_query_blocked_24_hours": "The number of DNS requests blocked by adblock filters and hosts blocklists",
"number_of_dns_query_blocked_24_hours_by_sec": "The number of DNS requests blocked by the AdGuard browsing security module",
"number_of_dns_query_blocked_24_hours_adult": "The number of adult websites blocked", </s> remove "number_of_dns_query_to_safe_search": "A number of DNS requests to search engines for which Safe Search was enforced",
</s> add "number_of_dns_query_to_safe_search": "The number of DNS requests to search engines for which Safe Search was enforced", </s> remove "access_blocked_desc": "Don't confuse this with filters. AdGuard Home will drop DNS queries with these domains in query's question. Here you can specify the exact domain names, wildcards and urlfilter-rules, e.g. 'example.org', '*.example.org' or '||example.org^'.",
</s> add "access_blocked_desc": "Don't confuse this with filters. AdGuard Home will drop DNS queries with these domains in queries' questions. Here you can specify the exact domain names, wildcards and URL filter rules, e.g. \"example.org\", \"*.example.org\" or \"||example.org^\".", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a72ce1cfae8b726ffdc329ef004c02e64a5b4be1 | client/src/__locales/en.json |
"form_error_port": "Enter valid port number", | <mask> "install_settings_title": "Admin Web Interface",
<mask> "install_settings_listen": "Listen interface",
<mask> "install_settings_port": "Port",
<mask> "install_settings_interface_link": "Your AdGuard Home admin web interface will be available on the following addresses:",
<mask> "form_error_port": "Enter valid port value",
<mask> "install_settings_dns": "DNS server",
<mask> "install_settings_dns_desc": "You will need to configure your devices or router to use the DNS server on the following addresses:",
<mask> "install_settings_all_interfaces": "All interfaces",
<mask> "install_auth_title": "Authentication",
<mask> "install_auth_desc": "It is highly recommended to configure password authentication to your AdGuard Home admin web interface. Even if it is accessible only in your local network, it is still important to protect it from unrestricted access.",
</s> Pull request: client: imp en locale, grammar
Merge in DNS/adguard-home from imp-i18n to master
Squashed commit of the following:
commit 49f565db4e7167ed404413b6eaa75b0ab38c79d4
Merge: f60989f0 1d07afb3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:18 2021 +0300
Merge branch 'master' into imp-i18n
commit f60989f069fd7c52d00e41e4aaad2e824d2d2e2e
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:03 2021 +0300
client: imp wording
commit 6909bb89f7af74c8245ecd81dc255b2890202cca
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 18:33:42 2021 +0300
client: imp en locale, grammar </s> remove "encryption_config_saved": "Encryption config saved",
</s> add "encryption_config_saved": "Encryption configuration saved", </s> remove "install_devices_router_list_4": "You can't set a custom DNS server on some types of routers. In this case it may help if you set up AdGuard Home as a <0>DHCP server</0>. Otherwise, you should search for the manual on how to customize DNS servers for your particular router model.",
</s> add "install_devices_router_list_4": "On some router types, a custom DNS server cannot be set up. In that case, setting up AdGuard Home as a <0>DHCP server</0> may help. Otherwise, you should check the router manual on how to customize DNS servers on your specific router model.", </s> remove "dhcp_warning": "If you want to enable DHCP server anyway, make sure that there is no other active DHCP server in your network. Otherwise, it can break the Internet for connected devices!",
"dhcp_error": "We could not determine whether there is another DHCP server in the network.",
"dhcp_static_ip_error": "In order to use DHCP server a static IP address must be set. We failed to determine if this network interface is configured using static IP address. Please set a static IP address manually.",
"dhcp_dynamic_ip_found": "Your system uses dynamic IP address configuration for interface <0>{{interfaceName}}</0>. In order to use DHCP server a static IP address must be set. Your current IP address is <0>{{ipAddress}}</0>. We will automatically set this IP address as static if you press Enable DHCP button.",
</s> add "dhcp_warning": "If you want to enable DHCP server anyway, make sure that there is no other active DHCP server in your network, as this may break the Internet connectivity for devices on the network!",
"dhcp_error": "AdGuard Home could not determine if there is another active DHCP server on the network.",
"dhcp_static_ip_error": "In order to use DHCP server a static IP address must be set. AdGuard Home failed to determine if this network interface is configured using a static IP address. Please set a static IP address manually.",
"dhcp_dynamic_ip_found": "Your system uses dynamic IP address configuration for interface <0>{{interfaceName}}</0>. In order to use DHCP server, a static IP address must be set. Your current IP address is <0>{{ipAddress}}</0>. AdGuard Home will automatically set this IP address as static if you press the \"Enable DHCP\" button.", </s> remove "fastest_addr_desc": "Query all DNS servers and return the fastest IP address among all responses. This will slow down the DNS queries as we have to wait for responses from all DNS servers, but improve the overall connectivity.",
</s> add "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.", </s> remove "dhcp_not_found": "It is safe to enable the built-in DHCP server - we didn't find any active DHCP servers on the network. However, we encourage you to re-check it manually as our automatic test currently doesn't give 100% guarantee.",
</s> add "dhcp_not_found": "It is safe to enable the built-in DHCP server because AdGuard Home didn't find any active DHCP servers on the network. However, you should re-check that manually as the automatic probing doesn't currently provide a 100% guarantee.", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a72ce1cfae8b726ffdc329ef004c02e64a5b4be1 | client/src/__locales/en.json |
"install_devices_router_list_4": "On some router types, a custom DNS server cannot be set up. In that case, setting up AdGuard Home as a <0>DHCP server</0> may help. Otherwise, you should check the router manual on how to customize DNS servers on your specific router model.", | <mask> "install_devices_address": "AdGuard Home DNS server is listening on the following addresses",
<mask> "install_devices_router_list_1": "Open the preferences for your router. Usually, you can access it from your browser via a URL (like http://192.168.0.1/ or http://192.168.1.1/). You may be asked to enter the password. If you don't remember it, you can often reset the password by pressing a button on the router itself. Some routers require a specific application, which in that case should be already installed on your computer/phone.",
<mask> "install_devices_router_list_2": "Find the DHCP/DNS settings. Look for the DNS letters next to a field which allows two or three sets of numbers, each broken into four groups of one to three digits.",
<mask> "install_devices_router_list_3": "Enter your AdGuard Home server addresses there.",
<mask> "install_devices_router_list_4": "You can't set a custom DNS server on some types of routers. In this case it may help if you set up AdGuard Home as a <0>DHCP server</0>. Otherwise, you should search for the manual on how to customize DNS servers for your particular router model.",
<mask> "install_devices_windows_list_1": "Open Control Panel through Start menu or Windows search.",
<mask> "install_devices_windows_list_2": "Go to Network and Internet category and then to Network and Sharing Center.",
<mask> "install_devices_windows_list_3": "On the left side of the screen find Change adapter settings and click on it.",
<mask> "install_devices_windows_list_4": "Select your active connection, right-click on it and choose Properties.",
<mask> "install_devices_windows_list_5": "Find Internet Protocol Version 4 (TCP/IP) in the list, select it and then click on Properties again.",
</s> Pull request: client: imp en locale, grammar
Merge in DNS/adguard-home from imp-i18n to master
Squashed commit of the following:
commit 49f565db4e7167ed404413b6eaa75b0ab38c79d4
Merge: f60989f0 1d07afb3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:18 2021 +0300
Merge branch 'master' into imp-i18n
commit f60989f069fd7c52d00e41e4aaad2e824d2d2e2e
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:03 2021 +0300
client: imp wording
commit 6909bb89f7af74c8245ecd81dc255b2890202cca
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 18:33:42 2021 +0300
client: imp en locale, grammar </s> remove "fastest_addr_desc": "Query all DNS servers and return the fastest IP address among all responses. This will slow down the DNS queries as we have to wait for responses from all DNS servers, but improve the overall connectivity.",
</s> add "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.", </s> remove "dhcp_warning": "If you want to enable DHCP server anyway, make sure that there is no other active DHCP server in your network. Otherwise, it can break the Internet for connected devices!",
"dhcp_error": "We could not determine whether there is another DHCP server in the network.",
"dhcp_static_ip_error": "In order to use DHCP server a static IP address must be set. We failed to determine if this network interface is configured using static IP address. Please set a static IP address manually.",
"dhcp_dynamic_ip_found": "Your system uses dynamic IP address configuration for interface <0>{{interfaceName}}</0>. In order to use DHCP server a static IP address must be set. Your current IP address is <0>{{ipAddress}}</0>. We will automatically set this IP address as static if you press Enable DHCP button.",
</s> add "dhcp_warning": "If you want to enable DHCP server anyway, make sure that there is no other active DHCP server in your network, as this may break the Internet connectivity for devices on the network!",
"dhcp_error": "AdGuard Home could not determine if there is another active DHCP server on the network.",
"dhcp_static_ip_error": "In order to use DHCP server a static IP address must be set. AdGuard Home failed to determine if this network interface is configured using a static IP address. Please set a static IP address manually.",
"dhcp_dynamic_ip_found": "Your system uses dynamic IP address configuration for interface <0>{{interfaceName}}</0>. In order to use DHCP server, a static IP address must be set. Your current IP address is <0>{{ipAddress}}</0>. AdGuard Home will automatically set this IP address as static if you press the \"Enable DHCP\" button.", </s> remove "encryption_config_saved": "Encryption config saved",
</s> add "encryption_config_saved": "Encryption configuration saved", </s> remove "form_error_port": "Enter valid port value",
</s> add "form_error_port": "Enter valid port number", </s> remove "access_blocked_desc": "Don't confuse this with filters. AdGuard Home will drop DNS queries with these domains in query's question. Here you can specify the exact domain names, wildcards and urlfilter-rules, e.g. 'example.org', '*.example.org' or '||example.org^'.",
</s> add "access_blocked_desc": "Don't confuse this with filters. AdGuard Home will drop DNS queries with these domains in queries' questions. Here you can specify the exact domain names, wildcards and URL filter rules, e.g. \"example.org\", \"*.example.org\" or \"||example.org^\".", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a72ce1cfae8b726ffdc329ef004c02e64a5b4be1 | client/src/__locales/en.json |
"encryption_config_saved": "Encryption configuration saved", | <mask> "open_dashboard": "Open Dashboard",
<mask> "install_saved": "Saved successfully",
<mask> "encryption_title": "Encryption",
<mask> "encryption_desc": "Encryption (HTTPS/TLS) support for both DNS and admin web interface",
<mask> "encryption_config_saved": "Encryption config saved",
<mask> "encryption_server": "Server name",
<mask> "encryption_server_enter": "Enter your domain name",
<mask> "encryption_server_desc": "In order to use HTTPS, you need to enter the server name that matches your SSL certificate or wildcard certificate. If the field is not set, it will accept TLS connections for any domain.",
<mask> "encryption_redirect": "Redirect to HTTPS automatically",
<mask> "encryption_redirect_desc": "If checked, AdGuard Home will automatically redirect you from HTTP to HTTPS addresses.",
</s> Pull request: client: imp en locale, grammar
Merge in DNS/adguard-home from imp-i18n to master
Squashed commit of the following:
commit 49f565db4e7167ed404413b6eaa75b0ab38c79d4
Merge: f60989f0 1d07afb3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:18 2021 +0300
Merge branch 'master' into imp-i18n
commit f60989f069fd7c52d00e41e4aaad2e824d2d2e2e
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:03 2021 +0300
client: imp wording
commit 6909bb89f7af74c8245ecd81dc255b2890202cca
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 18:33:42 2021 +0300
client: imp en locale, grammar </s> remove "form_error_port": "Enter valid port value",
</s> add "form_error_port": "Enter valid port number", </s> remove "install_devices_router_list_4": "You can't set a custom DNS server on some types of routers. In this case it may help if you set up AdGuard Home as a <0>DHCP server</0>. Otherwise, you should search for the manual on how to customize DNS servers for your particular router model.",
</s> add "install_devices_router_list_4": "On some router types, a custom DNS server cannot be set up. In that case, setting up AdGuard Home as a <0>DHCP server</0> may help. Otherwise, you should check the router manual on how to customize DNS servers on your specific router model.", </s> remove "dhcp_warning": "If you want to enable DHCP server anyway, make sure that there is no other active DHCP server in your network. Otherwise, it can break the Internet for connected devices!",
"dhcp_error": "We could not determine whether there is another DHCP server in the network.",
"dhcp_static_ip_error": "In order to use DHCP server a static IP address must be set. We failed to determine if this network interface is configured using static IP address. Please set a static IP address manually.",
"dhcp_dynamic_ip_found": "Your system uses dynamic IP address configuration for interface <0>{{interfaceName}}</0>. In order to use DHCP server a static IP address must be set. Your current IP address is <0>{{ipAddress}}</0>. We will automatically set this IP address as static if you press Enable DHCP button.",
</s> add "dhcp_warning": "If you want to enable DHCP server anyway, make sure that there is no other active DHCP server in your network, as this may break the Internet connectivity for devices on the network!",
"dhcp_error": "AdGuard Home could not determine if there is another active DHCP server on the network.",
"dhcp_static_ip_error": "In order to use DHCP server a static IP address must be set. AdGuard Home failed to determine if this network interface is configured using a static IP address. Please set a static IP address manually.",
"dhcp_dynamic_ip_found": "Your system uses dynamic IP address configuration for interface <0>{{interfaceName}}</0>. In order to use DHCP server, a static IP address must be set. Your current IP address is <0>{{ipAddress}}</0>. AdGuard Home will automatically set this IP address as static if you press the \"Enable DHCP\" button.", </s> remove "access_blocked_desc": "Don't confuse this with filters. AdGuard Home will drop DNS queries with these domains in query's question. Here you can specify the exact domain names, wildcards and urlfilter-rules, e.g. 'example.org', '*.example.org' or '||example.org^'.",
</s> add "access_blocked_desc": "Don't confuse this with filters. AdGuard Home will drop DNS queries with these domains in queries' questions. Here you can specify the exact domain names, wildcards and URL filter rules, e.g. \"example.org\", \"*.example.org\" or \"||example.org^\".", </s> remove "fastest_addr_desc": "Query all DNS servers and return the fastest IP address among all responses. This will slow down the DNS queries as we have to wait for responses from all DNS servers, but improve the overall connectivity.",
</s> add "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.", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a72ce1cfae8b726ffdc329ef004c02e64a5b4be1 | client/src/__locales/en.json |
"form_error_port_range": "Enter port number in the range of 80-65535", | <mask> "encryption_hostnames": "Hostnames",
<mask> "encryption_reset": "Are you sure you want to reset encryption settings?",
<mask> "topline_expiring_certificate": "Your SSL certificate is about to expire. Update <0>Encryption settings</0>.",
<mask> "topline_expired_certificate": "Your SSL certificate is expired. Update <0>Encryption settings</0>.",
<mask> "form_error_port_range": "Enter port value in the range of 80-65535",
<mask> "form_error_port_unsafe": "This is an unsafe port",
<mask> "form_error_equal": "Shouldn't be equal",
<mask> "form_error_password": "Password mismatched",
<mask> "reset_settings": "Reset settings",
<mask> "update_announcement": "AdGuard Home {{version}} is now available! <0>Click here</0> for more info.",
</s> Pull request: client: imp en locale, grammar
Merge in DNS/adguard-home from imp-i18n to master
Squashed commit of the following:
commit 49f565db4e7167ed404413b6eaa75b0ab38c79d4
Merge: f60989f0 1d07afb3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:18 2021 +0300
Merge branch 'master' into imp-i18n
commit f60989f069fd7c52d00e41e4aaad2e824d2d2e2e
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:03 2021 +0300
client: imp wording
commit 6909bb89f7af74c8245ecd81dc255b2890202cca
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 18:33:42 2021 +0300
client: imp en locale, grammar </s> remove "form_error_equal": "Shouldn't be equal",
</s> add "form_error_equal": "Must not be equal", </s> remove "dhcp_reset": "Are you sure you want to reset DHCP config?",
</s> add "dhcp_reset": "Are you sure you want to reset the DHCP configuration?", </s> remove "dhcp_warning": "If you want to enable DHCP server anyway, make sure that there is no other active DHCP server in your network. Otherwise, it can break the Internet for connected devices!",
"dhcp_error": "We could not determine whether there is another DHCP server in the network.",
"dhcp_static_ip_error": "In order to use DHCP server a static IP address must be set. We failed to determine if this network interface is configured using static IP address. Please set a static IP address manually.",
"dhcp_dynamic_ip_found": "Your system uses dynamic IP address configuration for interface <0>{{interfaceName}}</0>. In order to use DHCP server a static IP address must be set. Your current IP address is <0>{{ipAddress}}</0>. We will automatically set this IP address as static if you press Enable DHCP button.",
</s> add "dhcp_warning": "If you want to enable DHCP server anyway, make sure that there is no other active DHCP server in your network, as this may break the Internet connectivity for devices on the network!",
"dhcp_error": "AdGuard Home could not determine if there is another active DHCP server on the network.",
"dhcp_static_ip_error": "In order to use DHCP server a static IP address must be set. AdGuard Home failed to determine if this network interface is configured using a static IP address. Please set a static IP address manually.",
"dhcp_dynamic_ip_found": "Your system uses dynamic IP address configuration for interface <0>{{interfaceName}}</0>. In order to use DHCP server, a static IP address must be set. Your current IP address is <0>{{ipAddress}}</0>. AdGuard Home will automatically set this IP address as static if you press the \"Enable DHCP\" button.", </s> remove "encryption_config_saved": "Encryption config saved",
</s> add "encryption_config_saved": "Encryption configuration saved", </s> remove "form_error_port": "Enter valid port value",
</s> add "form_error_port": "Enter valid port number", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a72ce1cfae8b726ffdc329ef004c02e64a5b4be1 | client/src/__locales/en.json |
"form_error_equal": "Must not be equal", | <mask> "topline_expiring_certificate": "Your SSL certificate is about to expire. Update <0>Encryption settings</0>.",
<mask> "topline_expired_certificate": "Your SSL certificate is expired. Update <0>Encryption settings</0>.",
<mask> "form_error_port_range": "Enter port value in the range of 80-65535",
<mask> "form_error_port_unsafe": "This is an unsafe port",
<mask> "form_error_equal": "Shouldn't be equal",
<mask> "form_error_password": "Password mismatched",
<mask> "reset_settings": "Reset settings",
<mask> "update_announcement": "AdGuard Home {{version}} is now available! <0>Click here</0> for more info.",
<mask> "setup_guide": "Setup guide",
<mask> "dns_addresses": "DNS addresses",
</s> Pull request: client: imp en locale, grammar
Merge in DNS/adguard-home from imp-i18n to master
Squashed commit of the following:
commit 49f565db4e7167ed404413b6eaa75b0ab38c79d4
Merge: f60989f0 1d07afb3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:18 2021 +0300
Merge branch 'master' into imp-i18n
commit f60989f069fd7c52d00e41e4aaad2e824d2d2e2e
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:03 2021 +0300
client: imp wording
commit 6909bb89f7af74c8245ecd81dc255b2890202cca
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 18:33:42 2021 +0300
client: imp en locale, grammar </s> remove "form_error_port_range": "Enter port value in the range of 80-65535",
</s> add "form_error_port_range": "Enter port number in the range of 80-65535", </s> remove "form_error_port": "Enter valid port value",
</s> add "form_error_port": "Enter valid port number", </s> remove "encryption_config_saved": "Encryption config saved",
</s> add "encryption_config_saved": "Encryption configuration saved", </s> remove "dhcp_warning": "If you want to enable DHCP server anyway, make sure that there is no other active DHCP server in your network. Otherwise, it can break the Internet for connected devices!",
"dhcp_error": "We could not determine whether there is another DHCP server in the network.",
"dhcp_static_ip_error": "In order to use DHCP server a static IP address must be set. We failed to determine if this network interface is configured using static IP address. Please set a static IP address manually.",
"dhcp_dynamic_ip_found": "Your system uses dynamic IP address configuration for interface <0>{{interfaceName}}</0>. In order to use DHCP server a static IP address must be set. Your current IP address is <0>{{ipAddress}}</0>. We will automatically set this IP address as static if you press Enable DHCP button.",
</s> add "dhcp_warning": "If you want to enable DHCP server anyway, make sure that there is no other active DHCP server in your network, as this may break the Internet connectivity for devices on the network!",
"dhcp_error": "AdGuard Home could not determine if there is another active DHCP server on the network.",
"dhcp_static_ip_error": "In order to use DHCP server a static IP address must be set. AdGuard Home failed to determine if this network interface is configured using a static IP address. Please set a static IP address manually.",
"dhcp_dynamic_ip_found": "Your system uses dynamic IP address configuration for interface <0>{{interfaceName}}</0>. In order to use DHCP server, a static IP address must be set. Your current IP address is <0>{{ipAddress}}</0>. AdGuard Home will automatically set this IP address as static if you press the \"Enable DHCP\" button.", </s> remove "setup_config_to_enable_dhcp_server": "Setup config to enable DHCP server",
</s> add "setup_config_to_enable_dhcp_server": "Setup configuration to enable DHCP server", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a72ce1cfae8b726ffdc329ef004c02e64a5b4be1 | client/src/__locales/en.json |
"access_blocked_desc": "Don't confuse this with filters. AdGuard Home will drop DNS queries with these domains in queries' questions. Here you can specify the exact domain names, wildcards and URL filter rules, e.g. \"example.org\", \"*.example.org\" or \"||example.org^\".", | <mask> "access_allowed_desc": "A list of CIDR or IP addresses. If configured, AdGuard Home will accept requests from these IP addresses only.",
<mask> "access_disallowed_title": "Disallowed clients",
<mask> "access_disallowed_desc": "A list of CIDR or IP addresses. If configured, AdGuard Home will drop requests from these IP addresses.",
<mask> "access_blocked_title": "Disallowed domains",
<mask> "access_blocked_desc": "Don't confuse this with filters. AdGuard Home will drop DNS queries with these domains in query's question. Here you can specify the exact domain names, wildcards and urlfilter-rules, e.g. 'example.org', '*.example.org' or '||example.org^'.",
<mask> "access_settings_saved": "Access settings successfully saved",
<mask> "updates_checked": "Updates successfully checked",
<mask> "updates_version_equal": "AdGuard Home is up-to-date",
<mask> "check_updates_now": "Check for updates now",
<mask> "dns_privacy": "DNS Privacy",
</s> Pull request: client: imp en locale, grammar
Merge in DNS/adguard-home from imp-i18n to master
Squashed commit of the following:
commit 49f565db4e7167ed404413b6eaa75b0ab38c79d4
Merge: f60989f0 1d07afb3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:18 2021 +0300
Merge branch 'master' into imp-i18n
commit f60989f069fd7c52d00e41e4aaad2e824d2d2e2e
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:03 2021 +0300
client: imp wording
commit 6909bb89f7af74c8245ecd81dc255b2890202cca
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 18:33:42 2021 +0300
client: imp en locale, grammar </s> remove "fastest_addr_desc": "Query all DNS servers and return the fastest IP address among all responses. This will slow down the DNS queries as we have to wait for responses from all DNS servers, but improve the overall connectivity.",
</s> add "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.", </s> remove "encryption_config_saved": "Encryption config saved",
</s> add "encryption_config_saved": "Encryption configuration saved", </s> remove "number_of_dns_query_days": "A number of DNS queries processed for the last {{count}} day",
"number_of_dns_query_days_plural": "A number of DNS queries processed for the last {{count}} days",
"number_of_dns_query_24_hours": "A number of DNS queries processed for the last 24 hours",
"number_of_dns_query_blocked_24_hours": "A number of DNS requests blocked by adblock filters and hosts blocklists",
"number_of_dns_query_blocked_24_hours_by_sec": "A number of DNS requests blocked by the AdGuard browsing security module",
"number_of_dns_query_blocked_24_hours_adult": "A number of adult websites blocked",
</s> add "number_of_dns_query_days": "The number of DNS queries processed for the last {{count}} day",
"number_of_dns_query_days_plural": "The number of DNS queries processed for the last {{count}} days",
"number_of_dns_query_24_hours": "The number of DNS queries processed for the last 24 hours",
"number_of_dns_query_blocked_24_hours": "The number of DNS requests blocked by adblock filters and hosts blocklists",
"number_of_dns_query_blocked_24_hours_by_sec": "The number of DNS requests blocked by the AdGuard browsing security module",
"number_of_dns_query_blocked_24_hours_adult": "The number of adult websites blocked", </s> remove "load_balancing_desc": "Query one server at a time. AdGuard Home will use the weighted random algorithm to pick the server so that the fastest server will be used more often.",
</s> add "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.", </s> remove "rate_limit_desc": "The number of requests per second that a single client is allowed to make (setting it to 0 means unlimited)",
</s> add "rate_limit_desc": "The number of requests per second allowed per client. Setting it to 0 means no limit.", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a72ce1cfae8b726ffdc329ef004c02e64a5b4be1 | client/src/__locales/en.json |
"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.", | <mask> "rewrite_AAAA": "<0>AAAA</0>: special value, keep <0>AAAA</0> records from the upstream",
<mask> "disable_ipv6": "Disable IPv6",
<mask> "disable_ipv6_desc": "If this feature is enabled, all DNS queries for IPv6 addresses (type AAAA) will be dropped.",
<mask> "fastest_addr": "Fastest IP address",
<mask> "fastest_addr_desc": "Query all DNS servers and return the fastest IP address among all responses. This will slow down the DNS queries as we have to wait for responses from all DNS servers, but improve the overall connectivity.",
<mask> "autofix_warning_text": "If you click \"Fix\", AdGuard Home will configure your system to use AdGuard Home DNS server.",
<mask> "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>",
<mask> "autofix_warning_result": "As a result all DNS requests from your system will be processed by AdGuard Home by default.",
<mask> "tags_title": "Tags",
<mask> "tags_desc": "You can select the tags that correspond to the client. Tags can be included in the filtering rules and allow you to apply them more accurately. <0>Learn more</0>",
</s> Pull request: client: imp en locale, grammar
Merge in DNS/adguard-home from imp-i18n to master
Squashed commit of the following:
commit 49f565db4e7167ed404413b6eaa75b0ab38c79d4
Merge: f60989f0 1d07afb3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:18 2021 +0300
Merge branch 'master' into imp-i18n
commit f60989f069fd7c52d00e41e4aaad2e824d2d2e2e
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:03 2021 +0300
client: imp wording
commit 6909bb89f7af74c8245ecd81dc255b2890202cca
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 18:33:42 2021 +0300
client: imp en locale, grammar </s> remove "example_upstream_reserved": "You can specify DNS upstream <0>for the specific domain(s)</0>",
"example_upstream_comment": "You can specify the comment",
"upstream_parallel": "Use parallel requests to speed up resolving by simultaneously querying all upstream servers",
</s> add "example_upstream_reserved": "You can specify a DNS upstream <0>for the specific domain(s)</0>",
"example_upstream_comment": "You can specify a comment",
"upstream_parallel": "Use parallel queries to speed up resolving by querying all upstream servers simultaneously.", </s> remove "load_balancing_desc": "Query one server at a time. AdGuard Home will use the weighted random algorithm to pick the server so that the fastest server will be used more often.",
</s> add "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.", </s> remove "rate_limit_desc": "The number of requests per second that a single client is allowed to make (setting it to 0 means unlimited)",
</s> add "rate_limit_desc": "The number of requests per second allowed per client. Setting it to 0 means no limit.", </s> remove "dhcp_warning": "If you want to enable DHCP server anyway, make sure that there is no other active DHCP server in your network. Otherwise, it can break the Internet for connected devices!",
"dhcp_error": "We could not determine whether there is another DHCP server in the network.",
"dhcp_static_ip_error": "In order to use DHCP server a static IP address must be set. We failed to determine if this network interface is configured using static IP address. Please set a static IP address manually.",
"dhcp_dynamic_ip_found": "Your system uses dynamic IP address configuration for interface <0>{{interfaceName}}</0>. In order to use DHCP server a static IP address must be set. Your current IP address is <0>{{ipAddress}}</0>. We will automatically set this IP address as static if you press Enable DHCP button.",
</s> add "dhcp_warning": "If you want to enable DHCP server anyway, make sure that there is no other active DHCP server in your network, as this may break the Internet connectivity for devices on the network!",
"dhcp_error": "AdGuard Home could not determine if there is another active DHCP server on the network.",
"dhcp_static_ip_error": "In order to use DHCP server a static IP address must be set. AdGuard Home failed to determine if this network interface is configured using a static IP address. Please set a static IP address manually.",
"dhcp_dynamic_ip_found": "Your system uses dynamic IP address configuration for interface <0>{{interfaceName}}</0>. In order to use DHCP server, a static IP address must be set. Your current IP address is <0>{{ipAddress}}</0>. AdGuard Home will automatically set this IP address as static if you press the \"Enable DHCP\" button.", </s> remove "access_blocked_desc": "Don't confuse this with filters. AdGuard Home will drop DNS queries with these domains in query's question. Here you can specify the exact domain names, wildcards and urlfilter-rules, e.g. 'example.org', '*.example.org' or '||example.org^'.",
</s> add "access_blocked_desc": "Don't confuse this with filters. AdGuard Home will drop DNS queries with these domains in queries' questions. Here you can specify the exact domain names, wildcards and URL filter rules, e.g. \"example.org\", \"*.example.org\" or \"||example.org^\".", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a72ce1cfae8b726ffdc329ef004c02e64a5b4be1 | client/src/__locales/en.json |
"setup_config_to_enable_dhcp_server": "Setup configuration to enable DHCP server", | <mask> "filter_category_general_desc": "Lists that block tracking and advertising on most of the devices",
<mask> "filter_category_security_desc": "Lists that specialize on blocking malware, phishing or scam domains",
<mask> "filter_category_regional_desc": "Lists that focus on regional ads and tracking servers",
<mask> "filter_category_other_desc": "Other blocklists",
<mask> "setup_config_to_enable_dhcp_server": "Setup config to enable DHCP server",
<mask> "original_response": "Original response",
<mask> "click_to_view_queries": "Click to view queries",
<mask> "port_53_faq_link": "Port 53 is often occupied by \"DNSStubListener\" or \"systemd-resolved\" services. Please read <0>this instruction</0> on how to resolve this.",
<mask> "adg_will_drop_dns_queries": "AdGuard Home will be dropping all DNS queries from this client.",
<mask> "client_not_in_allowed_clients": "The client is not allowed because it is not in the \"Allowed clients\" list.",
</s> Pull request: client: imp en locale, grammar
Merge in DNS/adguard-home from imp-i18n to master
Squashed commit of the following:
commit 49f565db4e7167ed404413b6eaa75b0ab38c79d4
Merge: f60989f0 1d07afb3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:18 2021 +0300
Merge branch 'master' into imp-i18n
commit f60989f069fd7c52d00e41e4aaad2e824d2d2e2e
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:03 2021 +0300
client: imp wording
commit 6909bb89f7af74c8245ecd81dc255b2890202cca
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 18:33:42 2021 +0300
client: imp en locale, grammar </s> remove } </s> add </s> remove "install_devices_router_list_4": "You can't set a custom DNS server on some types of routers. In this case it may help if you set up AdGuard Home as a <0>DHCP server</0>. Otherwise, you should search for the manual on how to customize DNS servers for your particular router model.",
</s> add "install_devices_router_list_4": "On some router types, a custom DNS server cannot be set up. In that case, setting up AdGuard Home as a <0>DHCP server</0> may help. Otherwise, you should check the router manual on how to customize DNS servers on your specific router model.", </s> remove "dhcp_not_found": "It is safe to enable the built-in DHCP server - we didn't find any active DHCP servers on the network. However, we encourage you to re-check it manually as our automatic test currently doesn't give 100% guarantee.",
</s> add "dhcp_not_found": "It is safe to enable the built-in DHCP server because AdGuard Home didn't find any active DHCP servers on the network. However, you should re-check that manually as the automatic probing doesn't currently provide a 100% guarantee.", </s> remove "fastest_addr_desc": "Query all DNS servers and return the fastest IP address among all responses. This will slow down the DNS queries as we have to wait for responses from all DNS servers, but improve the overall connectivity.",
</s> add "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.", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a72ce1cfae8b726ffdc329ef004c02e64a5b4be1 | client/src/__locales/en.json |
<mask> "port_53_faq_link": "Port 53 is often occupied by \"DNSStubListener\" or \"systemd-resolved\" services. Please read <0>this instruction</0> on how to resolve this.",
<mask> "adg_will_drop_dns_queries": "AdGuard Home will be dropping all DNS queries from this client.",
<mask> "client_not_in_allowed_clients": "The client is not allowed because it is not in the \"Allowed clients\" list.",
<mask> "experimental": "Experimental"
<mask> } </s> Pull request: client: imp en locale, grammar
Merge in DNS/adguard-home from imp-i18n to master
Squashed commit of the following:
commit 49f565db4e7167ed404413b6eaa75b0ab38c79d4
Merge: f60989f0 1d07afb3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:18 2021 +0300
Merge branch 'master' into imp-i18n
commit f60989f069fd7c52d00e41e4aaad2e824d2d2e2e
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:03 2021 +0300
client: imp wording
commit 6909bb89f7af74c8245ecd81dc255b2890202cca
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 18:33:42 2021 +0300
client: imp en locale, grammar </s> remove "setup_config_to_enable_dhcp_server": "Setup config to enable DHCP server",
</s> add "setup_config_to_enable_dhcp_server": "Setup configuration to enable DHCP server", </s> remove "rate_limit_desc": "The number of requests per second that a single client is allowed to make (setting it to 0 means unlimited)",
</s> add "rate_limit_desc": "The number of requests per second allowed per client. Setting it to 0 means no limit.", </s> remove "fastest_addr_desc": "Query all DNS servers and return the fastest IP address among all responses. This will slow down the DNS queries as we have to wait for responses from all DNS servers, but improve the overall connectivity.",
</s> add "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.", </s> remove "dhcp_warning": "If you want to enable DHCP server anyway, make sure that there is no other active DHCP server in your network. Otherwise, it can break the Internet for connected devices!",
"dhcp_error": "We could not determine whether there is another DHCP server in the network.",
"dhcp_static_ip_error": "In order to use DHCP server a static IP address must be set. We failed to determine if this network interface is configured using static IP address. Please set a static IP address manually.",
"dhcp_dynamic_ip_found": "Your system uses dynamic IP address configuration for interface <0>{{interfaceName}}</0>. In order to use DHCP server a static IP address must be set. Your current IP address is <0>{{ipAddress}}</0>. We will automatically set this IP address as static if you press Enable DHCP button.",
</s> add "dhcp_warning": "If you want to enable DHCP server anyway, make sure that there is no other active DHCP server in your network, as this may break the Internet connectivity for devices on the network!",
"dhcp_error": "AdGuard Home could not determine if there is another active DHCP server on the network.",
"dhcp_static_ip_error": "In order to use DHCP server a static IP address must be set. AdGuard Home failed to determine if this network interface is configured using a static IP address. Please set a static IP address manually.",
"dhcp_dynamic_ip_found": "Your system uses dynamic IP address configuration for interface <0>{{interfaceName}}</0>. In order to use DHCP server, a static IP address must be set. Your current IP address is <0>{{ipAddress}}</0>. AdGuard Home will automatically set this IP address as static if you press the \"Enable DHCP\" button.", | [
"keep",
"keep",
"keep",
"keep",
"replace"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a72ce1cfae8b726ffdc329ef004c02e64a5b4be1 | client/src/__locales/en.json | |
} | <mask> "adg_will_drop_dns_queries": "AdGuard Home will be dropping all DNS queries from this client.",
<mask> "client_not_in_allowed_clients": "The client is not allowed because it is not in the \"Allowed clients\" list.",
<mask> "experimental": "Experimental"
<mask> }
</s> Pull request: client: imp en locale, grammar
Merge in DNS/adguard-home from imp-i18n to master
Squashed commit of the following:
commit 49f565db4e7167ed404413b6eaa75b0ab38c79d4
Merge: f60989f0 1d07afb3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:18 2021 +0300
Merge branch 'master' into imp-i18n
commit f60989f069fd7c52d00e41e4aaad2e824d2d2e2e
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 31 13:04:03 2021 +0300
client: imp wording
commit 6909bb89f7af74c8245ecd81dc255b2890202cca
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 18:33:42 2021 +0300
client: imp en locale, grammar </s> remove } </s> add </s> remove "setup_config_to_enable_dhcp_server": "Setup config to enable DHCP server",
</s> add "setup_config_to_enable_dhcp_server": "Setup configuration to enable DHCP server", </s> remove "fastest_addr_desc": "Query all DNS servers and return the fastest IP address among all responses. This will slow down the DNS queries as we have to wait for responses from all DNS servers, but improve the overall connectivity.",
</s> add "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.", </s> remove "rate_limit_desc": "The number of requests per second that a single client is allowed to make (setting it to 0 means unlimited)",
</s> add "rate_limit_desc": "The number of requests per second allowed per client. Setting it to 0 means no limit.", </s> remove "access_blocked_desc": "Don't confuse this with filters. AdGuard Home will drop DNS queries with these domains in query's question. Here you can specify the exact domain names, wildcards and urlfilter-rules, e.g. 'example.org', '*.example.org' or '||example.org^'.",
</s> add "access_blocked_desc": "Don't confuse this with filters. AdGuard Home will drop DNS queries with these domains in queries' questions. Here you can specify the exact domain names, wildcards and URL filter rules, e.g. \"example.org\", \"*.example.org\" or \"||example.org^\".", | [
"keep",
"keep",
"keep",
"add"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a72ce1cfae8b726ffdc329ef004c02e64a5b4be1 | client/src/__locales/en.json |
"install_devices_router": "Router",
"install_devices_router_desc": "This setup will automatically cover all the devices connected to your home router and you will not need to configure each of them manually.",
"install_devices_router_list_1": "Open the preferences for your router. Usually, you can access it from your browser via a URL (like http://192.168.0.1/ or http://192.168.1.1/). You may be asked to enter the password. If you don't remember it, you can often reset the password by pressing a button on the router itself. Some routers require a specific application, which in that case should be already installed on your computer/phone.",
"install_devices_router_list_2": "Find the DHCP/DNS settings. Look for the DNS letters next to a field which allows two or three sets of numbers, each broken into four groups of one to three digits.",
"install_devices_router_list_3": "Enter your AdGuard Home server addresses there.", | <mask> "install_devices_title": "Configure your devices",
<mask> "install_devices_desc": "In order for AdGuard Home to start working, you need to configure your devices to use it.",
<mask> "install_submit_title": "Congratulations!",
<mask> "install_submit_desc": "The setup procedure is finished and you are ready to start using AdGuard Home.",
<mask> "install_decices_router": "Router",
<mask> "install_decices_router_desc": "This setup will automatically cover all the devices connected to your home router and you will not need to configure each of them manually.",
<mask> "install_decices_router_list_1": "Open the preferences for your router. Usually, you can access it from your browser via a URL (like http://192.168.0.1/ or http://192.168.1.1/). You may be asked to enter the password. If you don't remember it, you can often reset the password by pressing a button on the router itself. Some routers require a specific application, which in that case should be already installed on your computer/phone.",
<mask> "install_decices_router_list_2": "Find the DHCP/DNS settings. Look for the DNS letters next to a field which allows two or three sets of numbers, each broken into four groups of one to three digits.",
<mask> "install_decices_router_list_3": "Enter your AdGuard Home server addresses there.",
<mask> "get_started": "Get Started",
<mask> "next": "Next",
<mask> "open_dashboard": "Open Dashboard",
<mask> "install_saved": "All settings saved"
<mask> } </s> Fixed validation and added toasts </s> remove "install_saved": "All settings saved"
</s> add "install_saved": "All settings saved",
"form_error_password": "Password mismatched" </s> remove import validate from './validate';
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a7416f9c34c3fc1df3b3ececb2e9c77923059685 | client/src/__locales/en.json |
"install_saved": "All settings saved",
"form_error_password": "Password mismatched" | <mask> "install_decices_router_list_3": "Enter your AdGuard Home server addresses there.",
<mask> "get_started": "Get Started",
<mask> "next": "Next",
<mask> "open_dashboard": "Open Dashboard",
<mask> "install_saved": "All settings saved"
<mask> } </s> Fixed validation and added toasts </s> remove "install_decices_router": "Router",
"install_decices_router_desc": "This setup will automatically cover all the devices connected to your home router and you will not need to configure each of them manually.",
"install_decices_router_list_1": "Open the preferences for your router. Usually, you can access it from your browser via a URL (like http://192.168.0.1/ or http://192.168.1.1/). You may be asked to enter the password. If you don't remember it, you can often reset the password by pressing a button on the router itself. Some routers require a specific application, which in that case should be already installed on your computer/phone.",
"install_decices_router_list_2": "Find the DHCP/DNS settings. Look for the DNS letters next to a field which allows two or three sets of numbers, each broken into four groups of one to three digits.",
"install_decices_router_list_3": "Enter your AdGuard Home server addresses there.",
</s> add "install_devices_router": "Router",
"install_devices_router_desc": "This setup will automatically cover all the devices connected to your home router and you will not need to configure each of them manually.",
"install_devices_router_list_1": "Open the preferences for your router. Usually, you can access it from your browser via a URL (like http://192.168.0.1/ or http://192.168.1.1/). You may be asked to enter the password. If you don't remember it, you can often reset the password by pressing a button on the router itself. Some routers require a specific application, which in that case should be already installed on your computer/phone.",
"install_devices_router_list_2": "Find the DHCP/DNS settings. Look for the DNS letters next to a field which allows two or three sets of numbers, each broken into four groups of one to three digits.",
"install_devices_router_list_3": "Enter your AdGuard Home server addresses there.", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a7416f9c34c3fc1df3b3ececb2e9c77923059685 | client/src/__locales/en.json |
export const removeToast = createAction('REMOVE_TOAST'); | <mask>
<mask> export const addErrorToast = createAction('ADD_ERROR_TOAST');
<mask> export const addSuccessToast = createAction('ADD_SUCCESS_TOAST');
<mask> export const nextStep = createAction('NEXT_STEP');
<mask> export const prevStep = createAction('PREV_STEP');
<mask>
<mask> export const getDefaultAddressesRequest = createAction('GET_DEFAULT_ADDRESSES_REQUEST');
<mask> export const getDefaultAddressesFailure = createAction('GET_DEFAULT_ADDRESSES_FAILURE');
<mask> export const getDefaultAddressesSuccess = createAction('GET_DEFAULT_ADDRESSES_SUCCESS');
</s> Fixed validation and added toasts </s> remove const { install } = state;
const props = { install };
</s> add const { install, toasts } = state;
const props = { install, toasts }; </s> remove submitting: PropTypes.bool.isRequired,
</s> add invalid: PropTypes.bool.isRequired, </s> remove submitting,
</s> add | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a7416f9c34c3fc1df3b3ececb2e9c77923059685 | client/src/actions/install.js |
import i18n from '../../i18n'; | <mask> import flow from 'lodash/flow';
<mask>
<mask> import Controls from './Controls';
<mask> import renderField from './renderField';
<mask>
<mask> const required = (value) => {
</s> Fixed validation and added toasts </s> remove import validate from './validate';
</s> add | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a7416f9c34c3fc1df3b3ececb2e9c77923059685 | client/src/install/Setup/Auth.js |
<mask> import { withNamespaces, Trans } from 'react-i18next';
<mask> import flow from 'lodash/flow';
<mask>
<mask> import Controls from './Controls';
<mask> import validate from './validate';
<mask> import renderField from './renderField';
<mask>
<mask> const required = (value) => {
<mask> if (value || value === 0) {
<mask> return false;
</s> Fixed validation and added toasts | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a7416f9c34c3fc1df3b3ececb2e9c77923059685 | client/src/install/Setup/Auth.js | |
const validate = (values) => {
const errors = {};
if (values.confirm_password !== values.password) {
errors.confirm_password = i18n.t('form_error_password');
}
return errors;
};
| <mask> return <Trans>form_error_required</Trans>;
<mask> };
<mask>
<mask> const Auth = (props) => {
<mask> const {
<mask> handleSubmit,
<mask> pristine,
</s> Fixed validation and added toasts </s> remove submitting,
</s> add </s> remove const { install } = state;
const props = { install };
</s> add const { install, toasts } = state;
const props = { install, toasts }; </s> remove import validate from './validate';
</s> add | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a7416f9c34c3fc1df3b3ececb2e9c77923059685 | client/src/install/Setup/Auth.js |
<mask>
<mask> const Auth = (props) => {
<mask> const {
<mask> handleSubmit,
<mask> submitting,
<mask> pristine,
<mask> t,
<mask> } = props;
<mask>
<mask> return (
</s> Fixed validation and added toasts </s> remove const { install } = state;
const props = { install };
</s> add const { install, toasts } = state;
const props = { install, toasts }; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a7416f9c34c3fc1df3b3ececb2e9c77923059685 | client/src/install/Setup/Auth.js | |
invalid, | <mask> const {
<mask> handleSubmit,
<mask> pristine,
<mask> t,
<mask> } = props;
<mask>
<mask> return (
<mask> <form className="setup__step" onSubmit={handleSubmit}>
</s> Fixed validation and added toasts </s> remove submitting,
</s> add </s> remove const { install } = state;
const props = { install };
</s> add const { install, toasts } = state;
const props = { install, toasts }; | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a7416f9c34c3fc1df3b3ececb2e9c77923059685 | client/src/install/Setup/Auth.js |
<Controls pristine={pristine} invalid={invalid} /> | <mask> autoComplete="new-password"
<mask> />
<mask> </div>
<mask> </div>
<mask> <Controls submitting={submitting} pristine={pristine} />
<mask> </form>
<mask> );
<mask> };
<mask>
<mask> Auth.propTypes = {
</s> Fixed validation and added toasts </s> remove <Controls />
</s> add <Controls invalid={invalid} /> </s> remove <Trans>install_decices_router</Trans>
</s> add <Trans>install_devices_router</Trans> </s> remove submitting: PropTypes.bool.isRequired,
</s> add invalid: PropTypes.bool.isRequired, </s> remove disabled={this.props.submitting || this.props.pristine}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a7416f9c34c3fc1df3b3ececb2e9c77923059685 | client/src/install/Setup/Auth.js |
invalid: PropTypes.bool.isRequired, | <mask>
<mask> Auth.propTypes = {
<mask> handleSubmit: PropTypes.func.isRequired,
<mask> pristine: PropTypes.bool.isRequired,
<mask> submitting: PropTypes.bool.isRequired,
<mask> t: PropTypes.func.isRequired,
<mask> };
<mask>
<mask> export default flow([
<mask> withNamespaces(),
</s> Fixed validation and added toasts </s> remove pristine: PropTypes.bool.isRequired,
submitting: PropTypes.bool.isRequired,
</s> add invalid: PropTypes.bool.isRequired, </s> remove const { install } = state;
const props = { install };
</s> add const { install, toasts } = state;
const props = { install, toasts }; </s> remove <Controls submitting={submitting} pristine={pristine} />
</s> add <Controls pristine={pristine} invalid={invalid} /> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a7416f9c34c3fc1df3b3ececb2e9c77923059685 | client/src/install/Setup/Auth.js |
disabled={this.props.invalid || this.props.pristine} | <mask> </button>
<mask> <button
<mask> type="submit"
<mask> className="btn btn-success btn-standard btn-lg"
<mask> disabled={this.props.submitting || this.props.pristine}
<mask> >
<mask> <Trans>next</Trans>
<mask> </button>
<mask> </div>
<mask> );
</s> Fixed validation and added toasts </s> remove disabled={this.props.submitting || this.props.pristine}
</s> add </s> remove <Controls submitting={submitting} pristine={pristine} />
</s> add <Controls pristine={pristine} invalid={invalid} /> </s> remove <Controls />
</s> add <Controls invalid={invalid} /> </s> remove import validate from './validate';
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a7416f9c34c3fc1df3b3ececb2e9c77923059685 | client/src/install/Setup/Controls.js |
<mask> <button
<mask> type="button"
<mask> className="btn btn-success btn-standard btn-lg"
<mask> onClick={this.props.nextStep}
<mask> disabled={this.props.submitting || this.props.pristine}
<mask> >
<mask> <Trans>next</Trans>
<mask> </button>
<mask> </div>
<mask> );
</s> Fixed validation and added toasts </s> remove disabled={this.props.submitting || this.props.pristine}
</s> add disabled={this.props.invalid || this.props.pristine} </s> remove <Controls submitting={submitting} pristine={pristine} />
</s> add <Controls pristine={pristine} invalid={invalid} /> </s> remove <Controls />
</s> add <Controls invalid={invalid} /> </s> remove import validate from './validate';
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a7416f9c34c3fc1df3b3ececb2e9c77923059685 | client/src/install/Setup/Controls.js | |
invalid: PropTypes.bool, | <mask> pristine: PropTypes.bool,
<mask> submitting: PropTypes.bool,
<mask> };
<mask>
<mask> const mapStateToProps = (state) => {
<mask> const { step } = state.install;
<mask> const props = { step };
<mask> return props;
</s> Fixed validation and added toasts </s> remove const { install } = state;
const props = { install };
</s> add const { install, toasts } = state;
const props = { install, toasts }; </s> remove submitting,
</s> add </s> remove pristine: PropTypes.bool.isRequired,
submitting: PropTypes.bool.isRequired,
</s> add invalid: PropTypes.bool.isRequired, </s> remove submitting: PropTypes.bool.isRequired,
</s> add invalid: PropTypes.bool.isRequired, | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a7416f9c34c3fc1df3b3ececb2e9c77923059685 | client/src/install/Setup/Controls.js |
<Trans>install_devices_router</Trans> | <mask> <Icons />
<mask> <Tabs>
<mask> <div label="Router">
<mask> <div className="tab__title">
<mask> <Trans>install_decices_router</Trans>
<mask> </div>
<mask> <div className="tab__text">
<mask> <Trans>install_decices_router_desc</Trans>
<mask> <ol>
<mask> <li>
</s> Fixed validation and added toasts </s> remove <Trans>install_decices_router_desc</Trans>
</s> add <Trans>install_devices_router_desc</Trans> </s> remove <Trans>install_decices_router_list_1</Trans>
</s> add <Trans>install_devices_router_list_1</Trans> </s> remove <Trans>install_decices_router_list_3</Trans>
</s> add <Trans>install_devices_router_list_3</Trans> </s> remove <Controls submitting={submitting} pristine={pristine} />
</s> add <Controls pristine={pristine} invalid={invalid} /> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a7416f9c34c3fc1df3b3ececb2e9c77923059685 | client/src/install/Setup/Devices.js |
<Trans>install_devices_router_desc</Trans> | <mask> <div className="tab__title">
<mask> <Trans>install_decices_router</Trans>
<mask> </div>
<mask> <div className="tab__text">
<mask> <Trans>install_decices_router_desc</Trans>
<mask> <ol>
<mask> <li>
<mask> <Trans>install_decices_router_list_1</Trans>
<mask> </li>
<mask> <li>
</s> Fixed validation and added toasts </s> remove <Trans>install_decices_router</Trans>
</s> add <Trans>install_devices_router</Trans> </s> remove <Trans>install_decices_router_list_1</Trans>
</s> add <Trans>install_devices_router_list_1</Trans> </s> remove <Trans>install_decices_router_list_3</Trans>
</s> add <Trans>install_devices_router_list_3</Trans> </s> remove <Trans>install_decices_router_list_2</Trans>
</s> add <Trans>install_devices_router_list_2</Trans> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a7416f9c34c3fc1df3b3ececb2e9c77923059685 | client/src/install/Setup/Devices.js |
<Trans>install_devices_router_list_1</Trans> | <mask> <div className="tab__text">
<mask> <Trans>install_decices_router_desc</Trans>
<mask> <ol>
<mask> <li>
<mask> <Trans>install_decices_router_list_1</Trans>
<mask> </li>
<mask> <li>
<mask> <Trans>install_decices_router_list_2</Trans>
<mask> </li>
<mask> <li>
</s> Fixed validation and added toasts </s> remove <Trans>install_decices_router_desc</Trans>
</s> add <Trans>install_devices_router_desc</Trans> </s> remove <Trans>install_decices_router_list_2</Trans>
</s> add <Trans>install_devices_router_list_2</Trans> </s> remove <Trans>install_decices_router_list_3</Trans>
</s> add <Trans>install_devices_router_list_3</Trans> </s> remove <Trans>install_decices_router</Trans>
</s> add <Trans>install_devices_router</Trans> </s> remove disabled={this.props.submitting || this.props.pristine}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a7416f9c34c3fc1df3b3ececb2e9c77923059685 | client/src/install/Setup/Devices.js |
<Trans>install_devices_router_list_2</Trans> | <mask> <li>
<mask> <Trans>install_decices_router_list_1</Trans>
<mask> </li>
<mask> <li>
<mask> <Trans>install_decices_router_list_2</Trans>
<mask> </li>
<mask> <li>
<mask> <Trans>install_decices_router_list_3</Trans>
<mask> </li>
<mask> </ol>
</s> Fixed validation and added toasts </s> remove <Trans>install_decices_router_list_3</Trans>
</s> add <Trans>install_devices_router_list_3</Trans> </s> remove <Trans>install_decices_router_list_1</Trans>
</s> add <Trans>install_devices_router_list_1</Trans> </s> remove <Trans>install_decices_router_desc</Trans>
</s> add <Trans>install_devices_router_desc</Trans> </s> remove <Trans>install_decices_router</Trans>
</s> add <Trans>install_devices_router</Trans> </s> remove disabled={this.props.submitting || this.props.pristine}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a7416f9c34c3fc1df3b3ececb2e9c77923059685 | client/src/install/Setup/Devices.js |
<Trans>install_devices_router_list_3</Trans> | <mask> <li>
<mask> <Trans>install_decices_router_list_2</Trans>
<mask> </li>
<mask> <li>
<mask> <Trans>install_decices_router_list_3</Trans>
<mask> </li>
<mask> </ol>
<mask> </div>
<mask> </div>
<mask> <div label="Windows">
</s> Fixed validation and added toasts </s> remove <Trans>install_decices_router_list_2</Trans>
</s> add <Trans>install_devices_router_list_2</Trans> </s> remove <Trans>install_decices_router_list_1</Trans>
</s> add <Trans>install_devices_router_list_1</Trans> </s> remove <Trans>install_decices_router_desc</Trans>
</s> add <Trans>install_devices_router_desc</Trans> </s> remove <Trans>install_decices_router</Trans>
</s> add <Trans>install_devices_router</Trans> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a7416f9c34c3fc1df3b3ececb2e9c77923059685 | client/src/install/Setup/Devices.js |
invalid, | <mask> interfaceIp,
<mask> dnsIp,
<mask> } = props;
<mask>
<mask> return (
<mask> <form className="setup__step" onSubmit={handleSubmit}>
</s> Fixed validation and added toasts </s> remove submitting,
</s> add </s> remove const { install } = state;
const props = { install };
</s> add const { install, toasts } = state;
const props = { install, toasts }; | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a7416f9c34c3fc1df3b3ececb2e9c77923059685 | client/src/install/Setup/Settings.js |
<Controls invalid={invalid} /> | <mask> <p className="setup__desc">
<mask> <Trans>install_settings_dns_desc</Trans> <strong>{dnsIp}</strong>
<mask> </p>
<mask> </div>
<mask> <Controls />
<mask> </form>
<mask> );
<mask> };
<mask>
<mask> Settings.propTypes = {
</s> Fixed validation and added toasts </s> remove <Controls submitting={submitting} pristine={pristine} />
</s> add <Controls pristine={pristine} invalid={invalid} /> </s> remove pristine: PropTypes.bool.isRequired,
submitting: PropTypes.bool.isRequired,
</s> add invalid: PropTypes.bool.isRequired, </s> remove const { install } = state;
const props = { install };
</s> add const { install, toasts } = state;
const props = { install, toasts }; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/a7416f9c34c3fc1df3b3ececb2e9c77923059685 | client/src/install/Setup/Settings.js |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.