Compare commits
9 Commits
v0.108.0-b
...
v0.108.0-b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fb332dfc2a | ||
|
|
15e229620b | ||
|
|
d18219395a | ||
|
|
2bb04094e1 | ||
|
|
8b8ae8ffad | ||
|
|
36517fc21b | ||
|
|
5f696da9dc | ||
|
|
62da8f4974 | ||
|
|
acf539b11d |
36
CHANGELOG.md
36
CHANGELOG.md
@@ -14,11 +14,11 @@ and this project adheres to
|
||||
<!--
|
||||
## [v0.108.0] - TBA
|
||||
|
||||
## [v0.107.38] - 2023-09-20 (APPROX.)
|
||||
## [v0.107.39] - 2023-09-27 (APPROX.)
|
||||
|
||||
See also the [v0.107.38 GitHub milestone][ms-v0.107.38].
|
||||
See also the [v0.107.39 GitHub milestone][ms-v0.107.39].
|
||||
|
||||
[ms-v0.107.38]: https://github.com/AdguardTeam/AdGuardHome/milestone/73?closed=1
|
||||
[ms-v0.107.39]: https://github.com/AdguardTeam/AdGuardHome/milestone/74?closed=1
|
||||
|
||||
NOTE: Add new changes BELOW THIS COMMENT.
|
||||
-->
|
||||
@@ -29,6 +29,25 @@ NOTE: Add new changes ABOVE THIS COMMENT.
|
||||
|
||||
|
||||
|
||||
## [v0.107.38] - 2023-09-11
|
||||
|
||||
See also the [v0.107.38 GitHub milestone][ms-v0.107.38].
|
||||
|
||||
### Fixed
|
||||
|
||||
- Incorrect original answer when a response is filtered ([#6183]).
|
||||
- Comments in the *Fallback DNS servers* field in the UI ([#6182]).
|
||||
- Empty or default Safe Browsing and Parental Control settings ([#6181]).
|
||||
- Various UI issues.
|
||||
|
||||
[#6181]: https://github.com/AdguardTeam/AdGuardHome/issues/6181
|
||||
[#6182]: https://github.com/AdguardTeam/AdGuardHome/issues/6182
|
||||
[#6183]: https://github.com/AdguardTeam/AdGuardHome/issues/6183
|
||||
|
||||
[ms-v0.107.38]: https://github.com/AdguardTeam/AdGuardHome/milestone/73?closed=1
|
||||
|
||||
|
||||
|
||||
## [v0.107.37] - 2023-09-07
|
||||
|
||||
See also the [v0.107.37 GitHub milestone][ms-v0.107.37].
|
||||
@@ -219,6 +238,10 @@ See also the [v0.107.36 GitHub milestone][ms-v0.107.36].
|
||||
- Client hostnames not resolving when upstream server responds with zero-TTL
|
||||
records ([#6046]).
|
||||
|
||||
### Removed
|
||||
|
||||
- Go 1.19 support, as it has reached end of life.
|
||||
|
||||
[#6046]: https://github.com/AdguardTeam/AdGuardHome/issues/6046
|
||||
[#6049]: https://github.com/AdguardTeam/AdGuardHome/issues/6049
|
||||
|
||||
@@ -2464,11 +2487,12 @@ See also the [v0.104.2 GitHub milestone][ms-v0.104.2].
|
||||
|
||||
|
||||
<!--
|
||||
[Unreleased]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.38...HEAD
|
||||
[v0.107.38]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.37...v0.107.38
|
||||
[Unreleased]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.39...HEAD
|
||||
[v0.107.39]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.38...v0.107.39
|
||||
-->
|
||||
|
||||
[Unreleased]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.37...HEAD
|
||||
[Unreleased]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.38...HEAD
|
||||
[v0.107.38]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.37...v0.107.38
|
||||
[v0.107.37]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.36...v0.107.37
|
||||
[v0.107.36]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.35...v0.107.36
|
||||
[v0.107.35]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.34...v0.107.35
|
||||
|
||||
@@ -532,6 +532,8 @@
|
||||
"statistics_retention_confirm": "Вы ўпэўнены, што хочаце змяніць тэрмін захоўвання статыстыкі? Пры памяншэнні інтэрвалу, некаторыя даныя могуць быць страчаны",
|
||||
"statistics_cleared": "Статыстыка паспяхова вычышчана",
|
||||
"statistics_enable": "Уключыць статыстыку",
|
||||
"ignore_domains_desc_stats": "Запыты, якія адпавядаюць гэтым правілам, не запісваюцца ў статыстыку",
|
||||
"ignore_domains_desc_query": "Запыты, якія адпавядаюць гэтым правілам, не запісваюцца ў часопіс запытаў",
|
||||
"interval_hours": "{{count}} гадзіна",
|
||||
"interval_hours_plural": "{{count}} гадзін",
|
||||
"filters_configuration": "Налада фільтраў",
|
||||
|
||||
@@ -537,8 +537,8 @@
|
||||
"statistics_enable": "Povolit statistiky",
|
||||
"ignore_domains": "Ignorované domény (oddělené novým řádkem)",
|
||||
"ignore_domains_title": "Ignorované domény",
|
||||
"ignore_domains_desc_stats": "Dotazy pro tyto domény se do statistik nezapisují",
|
||||
"ignore_domains_desc_query": "Dotazy pro tyto domény se do záznamu dotazů nezapisují",
|
||||
"ignore_domains_desc_stats": "Dotazy odpovídající těmto pravidlům se do statistik nezapisují",
|
||||
"ignore_domains_desc_query": "Dotazy odpovídající těmto pravidlům se do protokolu dotazů nezapisují",
|
||||
"interval_hours": "Hodiny: {{count}}",
|
||||
"interval_hours_plural": "Hodiny: {{count}}",
|
||||
"filters_configuration": "Konfigurace filtrů",
|
||||
|
||||
@@ -537,8 +537,8 @@
|
||||
"statistics_enable": "Aktivér statistikker",
|
||||
"ignore_domains": "Ignorerede domæner (adskilt af ny linje)",
|
||||
"ignore_domains_title": "Ignorerede domæner",
|
||||
"ignore_domains_desc_stats": "Forespørgsler til disse domæner opføres ikke i statistikken",
|
||||
"ignore_domains_desc_query": "Forespørgsler til disse domæner opføres ikke i forespørgselsloggen",
|
||||
"ignore_domains_desc_stats": "Forespørgsler, der matcher disse regler, skrives ikke til statistikken",
|
||||
"ignore_domains_desc_query": "Forespørgsler, der matcher disse regler, skrives ikke til forespørgselsloggen",
|
||||
"interval_hours": "{{count}} time",
|
||||
"interval_hours_plural": "{{count}} timer",
|
||||
"filters_configuration": "Filteropsætninger",
|
||||
|
||||
@@ -537,8 +537,8 @@
|
||||
"statistics_enable": "Statistiken aktivieren",
|
||||
"ignore_domains": "Ignorierte Domains (durch Zeilenumbruch getrennt)",
|
||||
"ignore_domains_title": "Ignorierte Domains",
|
||||
"ignore_domains_desc_stats": "Abfragen für diese Domains werden nicht in die Statistik aufgenommen",
|
||||
"ignore_domains_desc_query": "Abfragen für diese Domains werden nicht in das Abfrageprotokoll aufgenommen",
|
||||
"ignore_domains_desc_stats": "Anfragen, die diesen Regeln entsprechen, werden nicht in die Statistik aufgenommen",
|
||||
"ignore_domains_desc_query": "Anfragen, die diesen Regeln entsprechen, werden nicht in das Anfragenprotokoll aufgenommen",
|
||||
"interval_hours": "{{count}} Stunde",
|
||||
"interval_hours_plural": "{{count}} Stunden",
|
||||
"filters_configuration": "Filterkonfiguration",
|
||||
|
||||
@@ -537,8 +537,8 @@
|
||||
"statistics_enable": "Habilitar estadísticas",
|
||||
"ignore_domains": "Dominios ignorados (separados por una nueva línea)",
|
||||
"ignore_domains_title": "Dominios ignorados",
|
||||
"ignore_domains_desc_stats": "Las consultas para estos dominios no aparecen en las estadísticas",
|
||||
"ignore_domains_desc_query": "Las consultas para estos dominios no aparecen en el registro de consultas",
|
||||
"ignore_domains_desc_stats": "Las consultas que coinciden con estas reglas no aparecen en las estadísticas",
|
||||
"ignore_domains_desc_query": "Las consultas que coinciden con estas reglas no aparecen en el registro de consultas",
|
||||
"interval_hours": "{{count}} hora",
|
||||
"interval_hours_plural": "{{count}} horas",
|
||||
"filters_configuration": "Configuración de filtros",
|
||||
|
||||
@@ -537,8 +537,8 @@
|
||||
"statistics_enable": "Ota tilastointi käyttöön",
|
||||
"ignore_domains": "Ohitettavat verkkotunnukset (erotettu rivinvaihdolla)",
|
||||
"ignore_domains_title": "Ohitettavat verkkotunnukset",
|
||||
"ignore_domains_desc_stats": "Näihin verkkotunnuksiin lähetettyjä pyyntöjä ei tallenneta tilastoihin.",
|
||||
"ignore_domains_desc_query": "Näihin verkkotunnuksiin lähetettyjä pyyntöjä ei tallenneta pyyntöhistoriaan.",
|
||||
"ignore_domains_desc_stats": "Sääntöihin sopivat kyselyt eivät kirjoitu tilastoihin",
|
||||
"ignore_domains_desc_query": "Sääntöihin sopivat kyselyt eivät tallennu kyselylokiin",
|
||||
"interval_hours": "{{count}} tunti",
|
||||
"interval_hours_plural": "{{count}} tuntia",
|
||||
"filters_configuration": "Suodatinten määritys",
|
||||
|
||||
@@ -537,8 +537,8 @@
|
||||
"statistics_enable": "Omogući statistiku",
|
||||
"ignore_domains": "Zanemarene domene (odvojene novim retkom)",
|
||||
"ignore_domains_title": "Zanemarene domene",
|
||||
"ignore_domains_desc_stats": "Upiti za ove domene ne upisuju se u statistiku",
|
||||
"ignore_domains_desc_query": "Upiti za te domene nisu zapisani u zapisnik upita",
|
||||
"ignore_domains_desc_stats": "Upiti koji odgovaraju ovim pravilima ne upisuju se u statistiku",
|
||||
"ignore_domains_desc_query": "Upiti koji odgovaraju ovim pravilima ne upisuju se u zapisnik upita",
|
||||
"interval_hours": "{{count}} sata/i",
|
||||
"interval_hours_plural": "{{count}} sata/i",
|
||||
"filters_configuration": "Postavke filtara",
|
||||
|
||||
@@ -537,8 +537,8 @@
|
||||
"statistics_enable": "Statisztikák engedélyezése",
|
||||
"ignore_domains": "Figyelmen kívül hagyott domainek (újsorral elválasztva)",
|
||||
"ignore_domains_title": "Figyelmen kívül hagyott domainek",
|
||||
"ignore_domains_desc_stats": "Az ezekre a tartományokra vonatkozó lekérdezések nem kerülnek a statisztikákba",
|
||||
"ignore_domains_desc_query": "Az ezekhez a tartományokhoz tartozó lekérdezések nem kerülnek a lekérdezési naplóba",
|
||||
"ignore_domains_desc_stats": "Az ezeknek a szabályoknak megfelelő lekérdezések nem kerülnek be a statisztikákba",
|
||||
"ignore_domains_desc_query": "Az ezeknek a szabályoknak megfelelő lekérdezések nem kerülnek a lekérdezési naplóba",
|
||||
"interval_hours": "{{count}} óra",
|
||||
"interval_hours_plural": "{{count}} óra",
|
||||
"filters_configuration": "Szűrők beállításai",
|
||||
|
||||
@@ -527,6 +527,8 @@
|
||||
"statistics_retention_confirm": "Apakah Anda yakin ingin mengubah retensi statistik? Jika Anda menurunkan nilai interval, beberapa data akan hilang",
|
||||
"statistics_cleared": "Statistik berhasil dihapus",
|
||||
"statistics_enable": "Aktifkan statistik",
|
||||
"ignore_domains_desc_stats": "Kueri yang cocok dengan aturan ini tidak ditulis ke statistik",
|
||||
"ignore_domains_desc_query": "Kueri yang cocok dengan aturan ini tidak ditulis ke log kueri",
|
||||
"interval_hours": "{{count}} jam",
|
||||
"interval_hours_plural": "{{count}} jam",
|
||||
"filters_configuration": "Konfigurasi filter",
|
||||
|
||||
@@ -537,8 +537,8 @@
|
||||
"statistics_enable": "統計を有効にする",
|
||||
"ignore_domains": "無視するドメイン(それぞれ改行で区切ってください)",
|
||||
"ignore_domains_title": "無視するドメイン",
|
||||
"ignore_domains_desc_stats": "これらのドメインへのクエリは統計に書き込まれません。",
|
||||
"ignore_domains_desc_query": "これらのドメインへのクエリはクエリログに書き込まれません。",
|
||||
"ignore_domains_desc_stats": "これらのルールに一致するクエリは統計に書き込まれません。",
|
||||
"ignore_domains_desc_query": "これらのルールに一致するクエリはクエリログに書き込まれません。",
|
||||
"interval_hours": "{{count}}時間",
|
||||
"interval_hours_plural": "{{count}}時間",
|
||||
"filters_configuration": "フィルタ設定",
|
||||
|
||||
@@ -537,8 +537,8 @@
|
||||
"statistics_enable": "통계 활성화",
|
||||
"ignore_domains": "무시된 도메인(줄 바꿈으로 구분)",
|
||||
"ignore_domains_title": "무시된 도메인",
|
||||
"ignore_domains_desc_stats": "이러한 도메인에 대한 쿼리는 통계에 기록되지 않습니다.",
|
||||
"ignore_domains_desc_query": "이러한 도메인에 대한 쿼리는 쿼리 로그에 기록되지 않습니다.",
|
||||
"ignore_domains_desc_stats": "이러한 규칙과 일치하는 쿼리는 통계에 기록되지 않습니다.",
|
||||
"ignore_domains_desc_query": "이러한 규칙과 일치하는 쿼리는 쿼리 로그에 기록되지 않습니다.",
|
||||
"interval_hours": "{{count}} 시간",
|
||||
"interval_hours_plural": "{{count}} 시간",
|
||||
"filters_configuration": "필터 구성",
|
||||
|
||||
@@ -537,8 +537,8 @@
|
||||
"statistics_enable": "Statistieken inschakelen",
|
||||
"ignore_domains": "Genegeerde domeinen (gescheiden door nieuwe regel)",
|
||||
"ignore_domains_title": "Genegeerde domeinen",
|
||||
"ignore_domains_desc_stats": "Zoekopdrachten voor deze domeinen worden niet naar de statistieken geschreven",
|
||||
"ignore_domains_desc_query": "Zoekopdrachten voor deze domeinen worden niet naar het zoeklogboek geschreven",
|
||||
"ignore_domains_desc_stats": "Zoekopdrachten die aan deze regels voldoen, worden niet naar de statistieken geschreven",
|
||||
"ignore_domains_desc_query": "Zoekopdrachten die aan deze regels voldoen, worden niet naar het zoeklogboek geschreven",
|
||||
"interval_hours": "{{count}} uur",
|
||||
"interval_hours_plural": "{{count}} uren",
|
||||
"filters_configuration": "Filters instellingen",
|
||||
|
||||
@@ -537,8 +537,8 @@
|
||||
"statistics_enable": "Włącz statystyki",
|
||||
"ignore_domains": "Ignorowane domeny (każda w nowym wierszu)",
|
||||
"ignore_domains_title": "Ignorowane domeny",
|
||||
"ignore_domains_desc_stats": "Zapytania dla tych domen nie są zapisywane do statystyk",
|
||||
"ignore_domains_desc_query": "Zapytania dla tych domen nie są zapisywane do dziennika",
|
||||
"ignore_domains_desc_stats": "Zapytania pasujące do tych reguł nie są zapisywane w statystykach",
|
||||
"ignore_domains_desc_query": "Zapytania pasujące do tych reguł nie są zapisywane w dzienniku zapytań",
|
||||
"interval_hours": "{{count}} godzina",
|
||||
"interval_hours_plural": "{{count}} godziny",
|
||||
"filters_configuration": "Konfiguracja filtrów",
|
||||
|
||||
@@ -537,8 +537,8 @@
|
||||
"statistics_enable": "Ativar estatísticas",
|
||||
"ignore_domains": "Domínios ignorados (separados por nova linha)",
|
||||
"ignore_domains_title": "Domínios ignorados",
|
||||
"ignore_domains_desc_stats": "As consultas para esses domínios não são gravadas nas estatísticas",
|
||||
"ignore_domains_desc_query": "As consultas para esses domínios não são gravadas no registro de consulta",
|
||||
"ignore_domains_desc_stats": "As consultas que correspondem a essas regras não são gravadas nas estatísticas",
|
||||
"ignore_domains_desc_query": "As consultas que correspondem a essas regras não são gravadas no registro de consultas",
|
||||
"interval_hours": "{{count}} hora",
|
||||
"interval_hours_plural": "{{count}} horas",
|
||||
"filters_configuration": "Configuração de filtros",
|
||||
|
||||
@@ -537,8 +537,8 @@
|
||||
"statistics_enable": "Ativar estatísticas",
|
||||
"ignore_domains": "Domínios ignorados (separados por nova linha)",
|
||||
"ignore_domains_title": "Domínios ignorados",
|
||||
"ignore_domains_desc_stats": "As consultas para estes domínios não aparecem nas estatísticas",
|
||||
"ignore_domains_desc_query": "As consultas para estes domínios não aparecem no registo de consultas",
|
||||
"ignore_domains_desc_stats": "As consultas que correspondem a essas regras não são gravadas nas estatísticas",
|
||||
"ignore_domains_desc_query": "As consultas que correspondem a essas regras não são gravadas no registo de consultas",
|
||||
"interval_hours": "{{count}} hora",
|
||||
"interval_hours_plural": "{{count}} horas",
|
||||
"filters_configuration": "Definição dos filtros",
|
||||
|
||||
@@ -537,8 +537,8 @@
|
||||
"statistics_enable": "Activați statisticile",
|
||||
"ignore_domains": "Domenii ignorate (separate prin linie nouă)",
|
||||
"ignore_domains_title": "Domenii ignorate",
|
||||
"ignore_domains_desc_stats": "Interogările pentru aceste domenii nu sunt scrise în statistici",
|
||||
"ignore_domains_desc_query": "Interogările pentru aceste domenii nu sunt scrise în jurnalul de interogări",
|
||||
"ignore_domains_desc_stats": "Interogările care corespund acestor reguli nu sunt scrise în statistici",
|
||||
"ignore_domains_desc_query": "Interogările care corespund acestor reguli nu sunt scrise în jurnalul de interogări",
|
||||
"interval_hours": "{{count}} oră",
|
||||
"interval_hours_plural": "{{count}} ore",
|
||||
"filters_configuration": "Configurația filtrelor",
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
"local_ptr_no_default_resolver": "AdGuard Home не смог определить подходящие приватные обратные DNS-резолверы для этой системы.",
|
||||
"local_ptr_placeholder": "Введите по одному адресу на строчку",
|
||||
"resolve_clients_title": "Включить запрашивание доменных имён для IP-адресов клиентов",
|
||||
"resolve_clients_desc": "Определять доменные имена клиентов через PTR-запросы к соответствующим серверам (приватные DNS-серверы для локальных клиентов, upstream-сервер для клиентов с публичным IP-адресом).",
|
||||
"resolve_clients_desc": "Определять доменные имена клиентов через PTR-запросы к соответствующим серверам (приватные DNS-серверы для локальных клиентов, upstream-серверы для клиентов с публичным IP-адресом).",
|
||||
"use_private_ptr_resolvers_title": "Использовать приватные обратные DNS-резолверы",
|
||||
"use_private_ptr_resolvers_desc": "Посылать обратные DNS-запросы для локально обслуживаемых адресов на указанные серверы. Если отключено, AdGuard Home будет отвечать NXDOMAIN на все подобные PTR-запросы, кроме запросов о клиентах, уже известных по DHCP, /etc/hosts и так далее.",
|
||||
"check_dhcp_servers": "Проверить DHCP-серверы",
|
||||
@@ -537,8 +537,8 @@
|
||||
"statistics_enable": "Включить статистику",
|
||||
"ignore_domains": "Игнорируемые домены (построчно)",
|
||||
"ignore_domains_title": "Игнорируемые домены",
|
||||
"ignore_domains_desc_stats": "Запросы для этих доменов не записываются в статистику",
|
||||
"ignore_domains_desc_query": "Запросы для этих доменов не записываются в журнал запросов",
|
||||
"ignore_domains_desc_stats": "Запросы, соответствующие этим правилам, не записываются в статистику",
|
||||
"ignore_domains_desc_query": "Запросы, соответствующие этим правилам, не записываются в журнал запросов",
|
||||
"interval_hours": "{{count}} час",
|
||||
"interval_hours_plural": "{{count}} часов",
|
||||
"filters_configuration": "Настройка фильтров",
|
||||
|
||||
@@ -537,8 +537,8 @@
|
||||
"statistics_enable": "Zapnúť štatistiku",
|
||||
"ignore_domains": "Ignorované domény (oddelené novým riadkom)",
|
||||
"ignore_domains_title": "Ignorované domény",
|
||||
"ignore_domains_desc_stats": "Dopyty pre tieto domény sa nezapisujú do štatistík",
|
||||
"ignore_domains_desc_query": "Dopyty pre tieto domény sa nezapisujú do denníka dopytov",
|
||||
"ignore_domains_desc_stats": "Dopyty zodpovedajúce týmto pravidlám sa nezapisujú do štatistík",
|
||||
"ignore_domains_desc_query": "Dopyty zodpovedajúce týmto pravidlám sa nezapisujú do denníka dopytov",
|
||||
"interval_hours": "{{count}} hodina",
|
||||
"interval_hours_plural": "{{count}} hodín",
|
||||
"filters_configuration": "Konfigurácia filtrov",
|
||||
|
||||
@@ -537,8 +537,8 @@
|
||||
"statistics_enable": "Omogoči statistiko",
|
||||
"ignore_domains": "Prezrte domene (ločene z novo vrstico)",
|
||||
"ignore_domains_title": "Prezrte domene",
|
||||
"ignore_domains_desc_stats": "Poizvedbe za te domene niso zapisane v statistiko",
|
||||
"ignore_domains_desc_query": "Poizvedbe za te domene niso zapisane v dnevnik poizvedb",
|
||||
"ignore_domains_desc_stats": "Poizvedbe, ki ustrezajo tem pravilom, se ne zapišejo v statistiko",
|
||||
"ignore_domains_desc_query": "Poizvedbe, ki ustrezajo tem pravilom, se ne zapišejo v dnevnik poizvedb",
|
||||
"interval_hours": "{{count}} ur",
|
||||
"interval_hours_plural": "{{count}} ur",
|
||||
"filters_configuration": "Nastavitve filtrov",
|
||||
|
||||
@@ -537,8 +537,8 @@
|
||||
"statistics_enable": "Uključi statistiku",
|
||||
"ignore_domains": "Zanemari domene (razdvojene novom linijom)",
|
||||
"ignore_domains_title": "Zanemareni domeni",
|
||||
"ignore_domains_desc_stats": "Upiti za ove domene nisu upisani u statistiku",
|
||||
"ignore_domains_desc_query": "Upiti za ove domene nisu upisani u evidenciju upita",
|
||||
"ignore_domains_desc_stats": "Upiti koji se podudaraju sa ovim pravilima nisu upisani u statistiku",
|
||||
"ignore_domains_desc_query": "Upiti koji se podudaraju sa ovim pravilima nisu upisani u evidenciju upita",
|
||||
"interval_hours": "{{count}} čas",
|
||||
"interval_hours_plural": "{{count}} časova",
|
||||
"filters_configuration": "Konfiguracija filtera",
|
||||
|
||||
@@ -536,8 +536,8 @@
|
||||
"statistics_enable": "Aktivera statistik",
|
||||
"ignore_domains": "Ignorerade domäner (avgränsade med ny rad)",
|
||||
"ignore_domains_title": "Ignorerade domäner",
|
||||
"ignore_domains_desc_stats": "Förfrågningar för dessa domäner skrivs inte till statistiken",
|
||||
"ignore_domains_desc_query": "Förfrågningar för dessa domäner skrivs inte till frågeloggningen",
|
||||
"ignore_domains_desc_stats": "Förfrågningar som matchar dessa regler skrivs inte till statistiken",
|
||||
"ignore_domains_desc_query": "Förfrågningar som matchar dessa regler skrivs inte till förfrågningsloggen",
|
||||
"interval_hours": "{{count}} timme",
|
||||
"interval_hours_plural": "{{count}} timmar",
|
||||
"filters_configuration": "Filterinställningar",
|
||||
|
||||
@@ -537,8 +537,8 @@
|
||||
"statistics_enable": "İstatistikleri etkinleştir",
|
||||
"ignore_domains": "Yok sayılan alan adları (yeni satırla ayrılmış)",
|
||||
"ignore_domains_title": "Yok sayılan alan adları",
|
||||
"ignore_domains_desc_stats": "Bu alan adları için yapılan sorgular istatistiklere yazılmaz",
|
||||
"ignore_domains_desc_query": "Bu alan adları için yapılan sorgular sorgu günlüğüne yazılmaz",
|
||||
"ignore_domains_desc_stats": "Bu kurallarla eşleşen sorgular istatistiklere yazılmaz",
|
||||
"ignore_domains_desc_query": "Bu kurallarla eşleşen sorgular sorgu günlüğüne yazılmaz",
|
||||
"interval_hours": "{{count}} saat",
|
||||
"interval_hours_plural": "{{count}} saat",
|
||||
"filters_configuration": "Filtre yapılandırması",
|
||||
|
||||
@@ -537,8 +537,8 @@
|
||||
"statistics_enable": "Увімкнути статистику",
|
||||
"ignore_domains": "Ігноровані домени (по одному на рядок)",
|
||||
"ignore_domains_title": "Ігноровані домени",
|
||||
"ignore_domains_desc_stats": "Запити для цих доменів в статистику не пишуться",
|
||||
"ignore_domains_desc_query": "Запити для цих доменів не записуються до журналу запитів",
|
||||
"ignore_domains_desc_stats": "Запити, які відповідають цим правилам, в статистику не пишуться",
|
||||
"ignore_domains_desc_query": "Запити, які відповідають цим правилам, не записуються до журналу запитів",
|
||||
"interval_hours": "{{count}} година",
|
||||
"interval_hours_plural": "{{count}} годин(и)",
|
||||
"filters_configuration": "Конфігурація фільтрів",
|
||||
|
||||
@@ -537,8 +537,8 @@
|
||||
"statistics_enable": "Bật thống kê",
|
||||
"ignore_domains": "Các miền bị bỏ qua (cách nhau bởi dòng mới)",
|
||||
"ignore_domains_title": "Các miền bị bỏ qua",
|
||||
"ignore_domains_desc_stats": "Các truy vấn cho các miền này sẽ không được ghi vào thống kê",
|
||||
"ignore_domains_desc_query": "Các truy vấn cho các miền này sẽ không được ghi vào nhật ký truy vấn",
|
||||
"ignore_domains_desc_stats": "Các truy vấn phù hợp với các quy tắc này không được ghi vào số liệu thống kê",
|
||||
"ignore_domains_desc_query": "Các truy vấn khớp với các quy tắc này không được ghi vào nhật ký truy vấn",
|
||||
"interval_hours": "{{count}} giờ",
|
||||
"interval_hours_plural": "{{count}} giờ",
|
||||
"filters_configuration": "Cấu hình bộ lọc",
|
||||
|
||||
@@ -537,8 +537,8 @@
|
||||
"statistics_enable": "启用统计数据",
|
||||
"ignore_domains": "忽略的网域(以换行符分隔)",
|
||||
"ignore_domains_title": "被忽略的网域",
|
||||
"ignore_domains_desc_stats": "这些网域的查询不在统计信息",
|
||||
"ignore_domains_desc_query": "这些网域的查询不在查询日志记录",
|
||||
"ignore_domains_desc_stats": "匹配这些规则的查询不在统计信息",
|
||||
"ignore_domains_desc_query": "匹配这些规则的查询不在查询日志",
|
||||
"interval_hours": "{{count}} 小时",
|
||||
"interval_hours_plural": "{{count}} 小时",
|
||||
"filters_configuration": "过滤器配置",
|
||||
|
||||
@@ -537,8 +537,8 @@
|
||||
"statistics_enable": "啟用統計資料",
|
||||
"ignore_domains": "忽略的網域(以換行符分隔)",
|
||||
"ignore_domains_title": "被忽略的網域",
|
||||
"ignore_domains_desc_stats": "這些網域的查詢不在統計資料",
|
||||
"ignore_domains_desc_query": "這些網域的查詢不在查詢記錄",
|
||||
"ignore_domains_desc_stats": "符合這些規則的查詢不會被記錄在統計資料中",
|
||||
"ignore_domains_desc_query": "符合這些規則的查詢不會被寫入查詢記錄中",
|
||||
"interval_hours": "{{count}} 小時",
|
||||
"interval_hours_plural": "{{count}} 小時",
|
||||
"filters_configuration": "過濾器配置",
|
||||
|
||||
@@ -72,31 +72,16 @@ export const Modal = ({
|
||||
const onFormSubmit = (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
if (currentDay) {
|
||||
const newSchedule = schedule;
|
||||
const newSchedule = schedule;
|
||||
|
||||
Array.from(days).forEach((day) => {
|
||||
newSchedule[day] = {
|
||||
start: startTime,
|
||||
end: endTime,
|
||||
};
|
||||
});
|
||||
|
||||
onSubmit(newSchedule);
|
||||
} else {
|
||||
const newSchedule = {
|
||||
time_zone: timezone,
|
||||
Array.from(days).forEach((day) => {
|
||||
newSchedule[day] = {
|
||||
start: startTime,
|
||||
end: endTime,
|
||||
};
|
||||
});
|
||||
|
||||
Array.from(days).forEach((day) => {
|
||||
newSchedule[day] = {
|
||||
start: startTime,
|
||||
end: endTime,
|
||||
};
|
||||
});
|
||||
|
||||
onSubmit(newSchedule);
|
||||
}
|
||||
onSubmit(newSchedule);
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -133,7 +118,7 @@ export const Modal = ({
|
||||
>
|
||||
{getShortDayName(t, day)}
|
||||
</button>
|
||||
)) }
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className="schedule__time-wrap">
|
||||
|
||||
4
go.mod
4
go.mod
@@ -17,7 +17,7 @@ require (
|
||||
github.com/google/gopacket v1.1.19
|
||||
github.com/google/renameio/v2 v2.0.0
|
||||
github.com/google/uuid v1.3.1
|
||||
github.com/insomniacslk/dhcp v0.0.0-20230906122924-c71a6be05968
|
||||
github.com/insomniacslk/dhcp v0.0.0-20230908212754-65c27093e38a
|
||||
github.com/josharian/native v1.1.1-0.20230202152459-5c7d0dd6ab86
|
||||
github.com/kardianos/service v1.2.2
|
||||
github.com/mdlayher/ethernet v0.0.0-20220221185849-529eae5b6118
|
||||
@@ -48,7 +48,7 @@ require (
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
|
||||
github.com/golang/mock v1.6.0 // indirect
|
||||
github.com/google/pprof v0.0.0-20230906154834-20cde9067b3b // indirect
|
||||
github.com/google/pprof v0.0.0-20230907193218-d3ddc7976beb // indirect
|
||||
github.com/mdlayher/socket v0.5.0 // indirect
|
||||
github.com/onsi/ginkgo/v2 v2.12.0 // indirect
|
||||
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
|
||||
|
||||
8
go.sum
8
go.sum
@@ -43,16 +43,16 @@ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8=
|
||||
github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo=
|
||||
github.com/google/pprof v0.0.0-20230906154834-20cde9067b3b h1:AIwVPxYWRaz7GetyrRj3ShUL5hr7WeuqF52G0g8Hne8=
|
||||
github.com/google/pprof v0.0.0-20230906154834-20cde9067b3b/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik=
|
||||
github.com/google/pprof v0.0.0-20230907193218-d3ddc7976beb h1:LCMfzVg3sflxTs4UvuP4D8CkoZnfHLe2qzqgDn/4OHs=
|
||||
github.com/google/pprof v0.0.0-20230907193218-d3ddc7976beb/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik=
|
||||
github.com/google/renameio/v2 v2.0.0 h1:UifI23ZTGY8Tt29JbYFiuyIU3eX+RNFtUwefq9qAhxg=
|
||||
github.com/google/renameio/v2 v2.0.0/go.mod h1:BtmJXm5YlszgC+TD4HOEEUFgkJP3nLxehU6hfe7jRt4=
|
||||
github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4=
|
||||
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714 h1:/jC7qQFrv8CrSJVmaolDVOxTfS9kc36uB6H40kdbQq8=
|
||||
github.com/insomniacslk/dhcp v0.0.0-20230906122924-c71a6be05968 h1:uBiv5/8x42J7myumCdFuDOc5HnEXRK6eOtefwvE6+TQ=
|
||||
github.com/insomniacslk/dhcp v0.0.0-20230906122924-c71a6be05968/go.mod h1:zmdm3sTSDP3vOOX3CEWRkkRHtKr1DxBx+J1OQFoDQQs=
|
||||
github.com/insomniacslk/dhcp v0.0.0-20230908212754-65c27093e38a h1:S33o3djA1nPRd+d/bf7jbbXytXuK/EoXow7+aa76grQ=
|
||||
github.com/insomniacslk/dhcp v0.0.0-20230908212754-65c27093e38a/go.mod h1:zmdm3sTSDP3vOOX3CEWRkkRHtKr1DxBx+J1OQFoDQQs=
|
||||
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||
github.com/josharian/native v1.0.0/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w=
|
||||
github.com/josharian/native v1.0.1-0.20221213033349-c1e37c09b531/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w=
|
||||
|
||||
@@ -54,7 +54,7 @@ func TestServer_handleDHCPStatus(t *testing.T) {
|
||||
assert.JSONEq(t, b.String(), w.Body.String())
|
||||
}
|
||||
|
||||
// defaultResponse is a helper that returs the response with default
|
||||
// defaultResponse is a helper that returns the response with default
|
||||
// configuration.
|
||||
defaultResponse := func() *dhcpStatusResponse {
|
||||
conf4 := defaultV4ServerConf()
|
||||
|
||||
@@ -614,6 +614,7 @@ func (s *Server) Prepare(conf *ServerConfig) (err error) {
|
||||
// setupFallbackDNS initializes the fallback DNS servers.
|
||||
func (s *Server) setupFallbackDNS() (err error) {
|
||||
fallbacks := s.conf.FallbackDNS
|
||||
fallbacks = stringutil.FilterOut(fallbacks, IsCommentOrEmpty)
|
||||
if len(fallbacks) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -372,6 +372,27 @@ func TestServer_timeout(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestServer_Prepare_fallbacks(t *testing.T) {
|
||||
srvConf := &ServerConfig{
|
||||
Config: Config{
|
||||
FallbackDNS: []string{
|
||||
"#tls://1.1.1.1",
|
||||
"8.8.8.8",
|
||||
},
|
||||
EDNSClientSubnet: &EDNSClientSubnet{Enabled: false},
|
||||
},
|
||||
}
|
||||
|
||||
s, err := NewServer(DNSCreateParams{})
|
||||
require.NoError(t, err)
|
||||
|
||||
err = s.Prepare(srvConf)
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, s.dnsProxy.Fallbacks)
|
||||
|
||||
assert.Len(t, s.dnsProxy.Fallbacks.Upstreams, 1)
|
||||
}
|
||||
|
||||
func TestServerWithProtectionDisabled(t *testing.T) {
|
||||
s := createTestServer(t, &filtering.Config{
|
||||
BlockingMode: filtering.BlockingModeDefault,
|
||||
|
||||
@@ -11,6 +11,7 @@ import (
|
||||
"github.com/AdguardTeam/dnsproxy/proxy"
|
||||
"github.com/AdguardTeam/golibs/log"
|
||||
"github.com/AdguardTeam/golibs/netutil"
|
||||
"github.com/AdguardTeam/urlfilter/rules"
|
||||
"github.com/miekg/dns"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
@@ -140,15 +141,15 @@ func (s *Server) filterRewritten(
|
||||
|
||||
// checkHostRules checks the host against filters. It is safe for concurrent
|
||||
// use.
|
||||
func (s *Server) checkHostRules(host string, rrtype uint16, setts *filtering.Settings) (
|
||||
r *filtering.Result,
|
||||
err error,
|
||||
) {
|
||||
func (s *Server) checkHostRules(
|
||||
host string,
|
||||
rrtype rules.RRType,
|
||||
setts *filtering.Settings,
|
||||
) (r *filtering.Result, err error) {
|
||||
s.serverLock.RLock()
|
||||
defer s.serverLock.RUnlock()
|
||||
|
||||
var res filtering.Result
|
||||
res, err = s.dnsFilter.CheckHostRules(host, rrtype, setts)
|
||||
res, err := s.dnsFilter.CheckHostRules(host, rrtype, setts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -156,20 +157,21 @@ func (s *Server) checkHostRules(host string, rrtype uint16, setts *filtering.Set
|
||||
return &res, err
|
||||
}
|
||||
|
||||
// filterDNSResponse checks each resource record of the response's answer
|
||||
// section from pctx and returns a non-nil res if at least one of canonical
|
||||
// names or IP addresses in it matches the filtering rules.
|
||||
func (s *Server) filterDNSResponse(
|
||||
pctx *proxy.DNSContext,
|
||||
setts *filtering.Settings,
|
||||
) (res *filtering.Result, err error) {
|
||||
// filterDNSResponse checks each resource record of answer section of
|
||||
// dctx.proxyCtx.Res. It sets dctx.result and dctx.origResp if at least one of
|
||||
// canonical names, IP addresses, or HTTPS RR hints in it matches the filtering
|
||||
// rules, as well as sets dctx.proxyCtx.Res to the filtered response.
|
||||
func (s *Server) filterDNSResponse(dctx *dnsContext) (err error) {
|
||||
setts := dctx.setts
|
||||
if !setts.FilteringEnabled {
|
||||
return nil, nil
|
||||
return nil
|
||||
}
|
||||
|
||||
for _, a := range pctx.Res.Answer {
|
||||
var res *filtering.Result
|
||||
pctx := dctx.proxyCtx
|
||||
for i, a := range pctx.Res.Answer {
|
||||
host := ""
|
||||
var rrtype uint16
|
||||
var rrtype rules.RRType
|
||||
switch a := a.(type) {
|
||||
case *dns.CNAME:
|
||||
host = strings.TrimSuffix(a.Target, ".")
|
||||
@@ -195,18 +197,19 @@ func (s *Server) filterDNSResponse(
|
||||
log.Debug("dnsforward: checked %s %s for %s", dns.Type(rrtype), host, a.Header().Name)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if res == nil {
|
||||
continue
|
||||
} else if res.IsFiltered {
|
||||
return fmt.Errorf("filtering answer at index %d: %w", i, err)
|
||||
} else if res != nil && res.IsFiltered {
|
||||
dctx.result = res
|
||||
dctx.origResp = pctx.Res
|
||||
pctx.Res = s.genDNSFilterMessage(pctx, res)
|
||||
|
||||
log.Debug("dnsforward: matched %q by response: %q", pctx.Req.Question[0].Name, host)
|
||||
|
||||
return res, nil
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
return nil, nil
|
||||
return nil
|
||||
}
|
||||
|
||||
// removeIPv6Hints deletes IPv6 hints from RR values.
|
||||
|
||||
@@ -328,26 +328,34 @@ func TestHandleDNSRequest_filterDNSResponse(t *testing.T) {
|
||||
Addr: &net.UDPAddr{IP: net.IP{127, 0, 0, 1}, Port: 1},
|
||||
}
|
||||
|
||||
res, rErr := s.filterDNSResponse(pctx, &filtering.Settings{
|
||||
ProtectionEnabled: true,
|
||||
FilteringEnabled: true,
|
||||
})
|
||||
require.NoError(t, rErr)
|
||||
dctx := &dnsContext{
|
||||
proxyCtx: pctx,
|
||||
setts: &filtering.Settings{
|
||||
ProtectionEnabled: true,
|
||||
FilteringEnabled: true,
|
||||
},
|
||||
}
|
||||
|
||||
fltErr := s.filterDNSResponse(dctx)
|
||||
require.NoError(t, fltErr)
|
||||
|
||||
res := dctx.result
|
||||
if tc.wantRule == "" {
|
||||
assert.Nil(t, res)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
want := &filtering.Result{
|
||||
wantResult := &filtering.Result{
|
||||
IsFiltered: true,
|
||||
Reason: filtering.FilteredBlockList,
|
||||
Rules: []*filtering.ResultRule{{
|
||||
Text: tc.wantRule,
|
||||
}},
|
||||
}
|
||||
assert.Equal(t, want, res)
|
||||
|
||||
assert.Equal(t, wantResult, res)
|
||||
assert.Equal(t, resp, dctx.origResp)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -749,6 +749,7 @@ func (s *Server) handleTestUpstreamDNS(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
req.Upstreams = stringutil.FilterOut(req.Upstreams, IsCommentOrEmpty)
|
||||
req.FallbackDNS = stringutil.FilterOut(req.FallbackDNS, IsCommentOrEmpty)
|
||||
req.PrivateUpstreams = stringutil.FilterOut(req.PrivateUpstreams, IsCommentOrEmpty)
|
||||
|
||||
upsNum := len(req.Upstreams) + len(req.FallbackDNS) + len(req.PrivateUpstreams)
|
||||
|
||||
@@ -577,6 +577,14 @@ func TestServer_HandleTestUpstreamDNS(t *testing.T) {
|
||||
badUps + ` over tcp: dns: id mismatch`,
|
||||
},
|
||||
name: "fallback_broken",
|
||||
}, {
|
||||
body: map[string]any{
|
||||
"fallback_dns": []string{goodUps, "#this.is.comment"},
|
||||
},
|
||||
wantResp: map[string]any{
|
||||
goodUps: "OK",
|
||||
},
|
||||
name: "fallback_comment_mix",
|
||||
}}
|
||||
|
||||
for _, tc := range testCases {
|
||||
|
||||
@@ -671,11 +671,11 @@ func (s *Server) processLocalPTR(dctx *dnsContext) (rc resultCode) {
|
||||
}
|
||||
|
||||
// Apply filtering logic
|
||||
func (s *Server) processFilteringBeforeRequest(ctx *dnsContext) (rc resultCode) {
|
||||
func (s *Server) processFilteringBeforeRequest(dctx *dnsContext) (rc resultCode) {
|
||||
log.Debug("dnsforward: started processing filtering before req")
|
||||
defer log.Debug("dnsforward: finished processing filtering before req")
|
||||
|
||||
if ctx.proxyCtx.Res != nil {
|
||||
if dctx.proxyCtx.Res != nil {
|
||||
// Go on since the response is already set.
|
||||
return resultCodeSuccess
|
||||
}
|
||||
@@ -684,8 +684,8 @@ func (s *Server) processFilteringBeforeRequest(ctx *dnsContext) (rc resultCode)
|
||||
defer s.serverLock.RUnlock()
|
||||
|
||||
var err error
|
||||
if ctx.result, err = s.filterDNSRequest(ctx); err != nil {
|
||||
ctx.err = err
|
||||
if dctx.result, err = s.filterDNSRequest(dctx); err != nil {
|
||||
dctx.err = err
|
||||
|
||||
return resultCodeError
|
||||
}
|
||||
@@ -857,7 +857,6 @@ func (s *Server) processFilteringAfterResponse(dctx *dnsContext) (rc resultCode)
|
||||
log.Debug("dnsforward: started processing filtering after resp")
|
||||
defer log.Debug("dnsforward: finished processing filtering after resp")
|
||||
|
||||
pctx := dctx.proxyCtx
|
||||
switch res := dctx.result; res.Reason {
|
||||
case filtering.NotFilteredAllowList:
|
||||
return resultCodeSuccess
|
||||
@@ -871,6 +870,7 @@ func (s *Server) processFilteringAfterResponse(dctx *dnsContext) (rc resultCode)
|
||||
return resultCodeSuccess
|
||||
}
|
||||
|
||||
pctx := dctx.proxyCtx
|
||||
pctx.Req.Question[0], pctx.Res.Question[0] = dctx.origQuestion, dctx.origQuestion
|
||||
if len(pctx.Res.Answer) > 0 {
|
||||
rr := s.genAnswerCNAME(pctx.Req, res.CanonName)
|
||||
@@ -880,13 +880,13 @@ func (s *Server) processFilteringAfterResponse(dctx *dnsContext) (rc resultCode)
|
||||
|
||||
return resultCodeSuccess
|
||||
default:
|
||||
return s.filterAfterResponse(dctx, pctx)
|
||||
return s.filterAfterResponse(dctx)
|
||||
}
|
||||
}
|
||||
|
||||
// filterAfterResponse returns the result of filtering the response that wasn't
|
||||
// explicitly allowed or rewritten.
|
||||
func (s *Server) filterAfterResponse(dctx *dnsContext, pctx *proxy.DNSContext) (res resultCode) {
|
||||
func (s *Server) filterAfterResponse(dctx *dnsContext) (res resultCode) {
|
||||
// Check the response only if it's from an upstream. Don't check the
|
||||
// response if the protection is disabled since dnsrewrite rules aren't
|
||||
// applied to it anyway.
|
||||
@@ -894,17 +894,12 @@ func (s *Server) filterAfterResponse(dctx *dnsContext, pctx *proxy.DNSContext) (
|
||||
return resultCodeSuccess
|
||||
}
|
||||
|
||||
result, err := s.filterDNSResponse(pctx, dctx.setts)
|
||||
err := s.filterDNSResponse(dctx)
|
||||
if err != nil {
|
||||
dctx.err = err
|
||||
|
||||
return resultCodeError
|
||||
}
|
||||
|
||||
if result != nil {
|
||||
dctx.result = result
|
||||
dctx.origResp = pctx.Res
|
||||
}
|
||||
|
||||
return resultCodeSuccess
|
||||
}
|
||||
|
||||
@@ -282,6 +282,12 @@ type statsConfig struct {
|
||||
Enabled bool `yaml:"enabled"`
|
||||
}
|
||||
|
||||
// Default block host constants.
|
||||
const (
|
||||
defaultSafeBrowsingBlockHost = "standard-block.dns.adguard.com"
|
||||
defaultParentalBlockHost = "family-block.dns.adguard.com"
|
||||
)
|
||||
|
||||
// config is the global configuration structure.
|
||||
//
|
||||
// TODO(a.garipov, e.burkov): This global is awful and must be removed.
|
||||
@@ -389,6 +395,9 @@ var config = &configuration{
|
||||
Schedule: schedule.EmptyWeekly(),
|
||||
IDs: []string{},
|
||||
},
|
||||
|
||||
ParentalBlockHost: defaultParentalBlockHost,
|
||||
SafeBrowsingBlockHost: defaultSafeBrowsingBlockHost,
|
||||
},
|
||||
DHCP: &dhcpd.ServerConfig{
|
||||
LocalDomainName: "lan",
|
||||
|
||||
@@ -359,9 +359,6 @@ func setupDNSFilteringConf(conf *filtering.Config) (err error) {
|
||||
pcService = "parental control"
|
||||
defaultParentalServer = `https://family.adguard-dns.com/dns-query`
|
||||
pcTXTSuffix = `pc.dns.adguard.com.`
|
||||
|
||||
defaultSafeBrowsingBlockHost = "standard-block.dns.adguard.com"
|
||||
defaultParentalBlockHost = "family-block.dns.adguard.com"
|
||||
)
|
||||
|
||||
conf.EtcHosts = Context.etcHosts
|
||||
@@ -398,8 +395,15 @@ func setupDNSFilteringConf(conf *filtering.Config) (err error) {
|
||||
CacheSize: conf.SafeBrowsingCacheSize,
|
||||
})
|
||||
|
||||
if conf.SafeBrowsingBlockHost != "" {
|
||||
conf.SafeBrowsingBlockHost = defaultSafeBrowsingBlockHost
|
||||
// Protect against invalid configuration, see #6181.
|
||||
//
|
||||
// TODO(a.garipov): Validate against an empty host instead of setting it to
|
||||
// default.
|
||||
if conf.SafeBrowsingBlockHost == "" {
|
||||
host := defaultSafeBrowsingBlockHost
|
||||
log.Info("%s: warning: empty blocking host; using default: %q", sbService, host)
|
||||
|
||||
conf.SafeBrowsingBlockHost = host
|
||||
}
|
||||
|
||||
parUps, err := upstream.AddressToUpstream(defaultParentalServer, upsOpts)
|
||||
@@ -415,8 +419,15 @@ func setupDNSFilteringConf(conf *filtering.Config) (err error) {
|
||||
CacheSize: conf.ParentalCacheSize,
|
||||
})
|
||||
|
||||
if conf.ParentalBlockHost != "" {
|
||||
conf.ParentalBlockHost = defaultParentalBlockHost
|
||||
// Protect against invalid configuration, see #6181.
|
||||
//
|
||||
// TODO(a.garipov): Validate against an empty host instead of setting it to
|
||||
// default.
|
||||
if conf.ParentalBlockHost == "" {
|
||||
host := defaultParentalBlockHost
|
||||
log.Info("%s: warning: empty blocking host; using default: %q", pcService, host)
|
||||
|
||||
conf.ParentalBlockHost = host
|
||||
}
|
||||
|
||||
conf.SafeSearchConf.CustomResolver = safeSearchResolver{}
|
||||
|
||||
@@ -72,7 +72,7 @@ type Entry struct {
|
||||
Time time.Duration
|
||||
}
|
||||
|
||||
// validate returs an error if entry is not valid.
|
||||
// validate returns an error if entry is not valid.
|
||||
func (e *Entry) validate() (err error) {
|
||||
switch {
|
||||
case e.Result == 0:
|
||||
@@ -295,7 +295,7 @@ func loadUnitFromDB(tx *bbolt.Tx, id uint32) (udb *unitDB) {
|
||||
return udb
|
||||
}
|
||||
|
||||
// deserealize assigns the appropriate values from udb to u. u must not be nil.
|
||||
// deserialize assigns the appropriate values from udb to u. u must not be nil.
|
||||
// It's safe for concurrent use.
|
||||
func (u *unit) deserialize(udb *unitDB) {
|
||||
if udb == nil {
|
||||
|
||||
@@ -113,9 +113,9 @@ func (u *Updater) Update(firstRun bool) (err error) {
|
||||
log.Info("updater: updating")
|
||||
defer func() {
|
||||
if err != nil {
|
||||
log.Error("updater: failed: %v", err)
|
||||
log.Info("updater: failed")
|
||||
} else {
|
||||
log.Info("updater: finished")
|
||||
log.Info("updater: finished successfully")
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -240,18 +240,24 @@ func (u *Updater) unpack() error {
|
||||
|
||||
// check returns an error if the configuration file couldn't be used with the
|
||||
// version of AdGuard Home just downloaded.
|
||||
func (u *Updater) check() error {
|
||||
func (u *Updater) check() (err error) {
|
||||
log.Debug("updater: checking configuration")
|
||||
|
||||
err := copyFile(u.confName, filepath.Join(u.updateDir, "AdGuardHome.yaml"))
|
||||
err = copyFile(u.confName, filepath.Join(u.updateDir, "AdGuardHome.yaml"))
|
||||
if err != nil {
|
||||
return fmt.Errorf("copyFile() failed: %w", err)
|
||||
}
|
||||
|
||||
const format = "executing configuration check command: %w %d:\n" +
|
||||
"below is the output of configuration check:\n" +
|
||||
"%s" +
|
||||
"end of the output"
|
||||
|
||||
cmd := exec.Command(u.updateExeName, "--check-config")
|
||||
err = cmd.Run()
|
||||
if err != nil || cmd.ProcessState.ExitCode() != 0 {
|
||||
return fmt.Errorf("exec.Command(): %s %d", err, cmd.ProcessState.ExitCode())
|
||||
out, err := cmd.CombinedOutput()
|
||||
code := cmd.ProcessState.ExitCode()
|
||||
if err != nil || code != 0 {
|
||||
return fmt.Errorf(format, err, code, out)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
@@ -30,7 +30,7 @@ const (
|
||||
twoskyURI = "https://twosky.int.agrd.dev/api/v1"
|
||||
|
||||
readLimit = 1 * 1024 * 1024
|
||||
uploadTimeout = 10 * time.Second
|
||||
uploadTimeout = 20 * time.Second
|
||||
)
|
||||
|
||||
// blockerLangCodes is the codes of languages which need to be fully translated.
|
||||
|
||||
Reference in New Issue
Block a user