AdGuardHome/internal/aghnet/hostscontainer.go

311 lines
8.3 KiB
Go
Raw Normal View History

Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
package aghnet
import (
"fmt"
"io"
"io/fs"
"net/netip"
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
"path"
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
"sync/atomic"
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
"github.com/AdguardTeam/AdGuardHome/internal/aghos"
"github.com/AdguardTeam/golibs/errors"
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
"github.com/AdguardTeam/golibs/hostsfile"
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
"github.com/AdguardTeam/golibs/log"
"golang.org/x/exp/maps"
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
"golang.org/x/exp/slices"
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
)
// DefaultHostsPaths returns the slice of paths default for the operating system
// to files and directories which are containing the hosts database. The result
// is intended to be used within fs.FS so the initial slash is omitted.
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
func DefaultHostsPaths() (paths []string) {
return defaultHostsPaths()
}
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
// MatchAddr returns the records for the IP address.
func (hc *HostsContainer) MatchAddr(ip netip.Addr) (recs []*hostsfile.Record) {
cur := hc.current.Load()
if cur == nil {
return nil
}
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
return cur.addrs[ip]
}
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
// MatchName returns the records for the hostname.
func (hc *HostsContainer) MatchName(name string) (recs []*hostsfile.Record) {
cur := hc.current.Load()
if cur != nil {
recs = cur.names[name]
}
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
return recs
}
// hostsContainerPrefix is a prefix for logging and wrapping errors in
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
// HostsContainer's methods.
const hostsContainerPrefix = "hosts container"
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
// Hosts is a map of IP addresses to the records, as it primarily stored in the
// [HostsContainer]. It should not be accessed for writing since it may be read
// concurrently, users should clone it before modifying.
//
// The order of records for each address is preserved from original files, but
// the order of the addresses, being a map key, is not.
//
// TODO(e.burkov): Probably, this should be a sorted slice of records.
type Hosts map[netip.Addr][]*hostsfile.Record
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
// HostsContainer stores the relevant hosts database provided by the OS and
// processes both A/AAAA and PTR DNS requests for those.
type HostsContainer struct {
// done is the channel to sign closing the container.
done chan struct{}
// updates is the channel for receiving updated hosts.
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
updates chan Hosts
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
// current is the last set of hosts parsed.
current atomic.Pointer[hostsIndex]
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
// fsys is the working file system to read hosts files from.
fsys fs.FS
// watcher tracks the changes in specified files and directories.
watcher aghos.FSWatcher
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
// patterns stores specified paths in the fs.Glob-compatible form.
patterns []string
}
// ErrNoHostsPaths is returned when there are no valid paths to watch passed to
// the HostsContainer.
const ErrNoHostsPaths errors.Error = "no valid paths to hosts files provided"
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
// NewHostsContainer creates a container of hosts, that watches the paths with
// w. listID is used as an identifier of the underlying rules list. paths
// shouldn't be empty and each of paths should locate either a file or a
// directory in fsys. fsys and w must be non-nil.
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
func NewHostsContainer(
fsys fs.FS,
w aghos.FSWatcher,
paths ...string,
) (hc *HostsContainer, err error) {
defer func() { err = errors.Annotate(err, "%s: %w", hostsContainerPrefix) }()
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
if len(paths) == 0 {
return nil, ErrNoHostsPaths
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
}
var patterns []string
patterns, err = pathsToPatterns(fsys, paths)
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
if err != nil {
return nil, err
} else if len(patterns) == 0 {
return nil, ErrNoHostsPaths
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
}
hc = &HostsContainer{
done: make(chan struct{}, 1),
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
updates: make(chan Hosts, 1),
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
fsys: fsys,
watcher: w,
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
patterns: patterns,
}
log.Debug("%s: starting", hostsContainerPrefix)
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
// Load initially.
if err = hc.refresh(); err != nil {
return nil, err
}
for _, p := range paths {
if err = w.Add(p); err != nil {
if !errors.Is(err, fs.ErrNotExist) {
return nil, fmt.Errorf("adding path: %w", err)
}
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
log.Debug("%s: %s is expected to exist but doesn't", hostsContainerPrefix, p)
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
}
}
go hc.handleEvents()
return hc, nil
}
// Close implements the [io.Closer] interface for *HostsContainer. It closes
// both itself and its [aghos.FSWatcher]. Close must only be called once.
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
func (hc *HostsContainer) Close() (err error) {
log.Debug("%s: closing", hostsContainerPrefix)
err = hc.watcher.Close()
if err != nil {
err = fmt.Errorf("closing fs watcher: %w", err)
// Go on and close the container either way.
}
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
close(hc.done)
return err
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
}
// Upd returns the channel into which the updates are sent.
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
func (hc *HostsContainer) Upd() (updates <-chan Hosts) {
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
return hc.updates
}
// pathsToPatterns converts paths into patterns compatible with fs.Glob.
func pathsToPatterns(fsys fs.FS, paths []string) (patterns []string, err error) {
for i, p := range paths {
var fi fs.FileInfo
fi, err = fs.Stat(fsys, p)
if err != nil {
if errors.Is(err, fs.ErrNotExist) {
continue
}
// Don't put a filename here since it's already added by fs.Stat.
return nil, fmt.Errorf("path at index %d: %w", i, err)
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
}
if fi.IsDir() {
p = path.Join(p, "*")
}
patterns = append(patterns, p)
}
return patterns, nil
}
// handleEvents concurrently handles the file system events. It closes the
// update channel of HostsContainer when finishes. It's used to be called
// within a separate goroutine.
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
func (hc *HostsContainer) handleEvents() {
defer log.OnPanic(fmt.Sprintf("%s: handling events", hostsContainerPrefix))
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
defer close(hc.updates)
ok, eventsCh := true, hc.watcher.Events()
for ok {
select {
case _, ok = <-eventsCh:
if !ok {
log.Debug("%s: watcher closed the events channel", hostsContainerPrefix)
continue
}
if err := hc.refresh(); err != nil {
log.Error("%s: %s", hostsContainerPrefix, err)
}
case _, ok = <-hc.done:
// Go on.
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
}
}
}
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
// sendUpd tries to send the parsed data to the ch.
func (hc *HostsContainer) sendUpd(recs Hosts) {
log.Debug("%s: sending upd", hostsContainerPrefix)
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
ch := hc.updates
select {
case ch <- recs:
// Updates are delivered. Go on.
case <-ch:
ch <- recs
log.Debug("%s: replaced the last update", hostsContainerPrefix)
case ch <- recs:
// The previous update was just read and the next one pushed. Go on.
default:
log.Error("%s: the updates channel is broken", hostsContainerPrefix)
}
}
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
// hostsIndex is a [hostsfile.Set] to enumerate all the records.
type hostsIndex struct {
// addrs maps IP addresses to the records.
addrs Hosts
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
// names maps hostnames to the records.
names map[string][]*hostsfile.Record
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
}
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
// walk is a file walking function for hostsIndex.
func (idx *hostsIndex) walk(r io.Reader) (patterns []string, cont bool, err error) {
return nil, true, hostsfile.Parse(idx, r, nil)
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
}
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
// type check
var _ hostsfile.Set = (*hostsIndex)(nil)
// Add puts the record for the IP address to the rules builder if needed.
// The first host is considered to be the canonical name for the IP address.
// hosts must have at least one name.
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
func (idx *hostsIndex) Add(rec *hostsfile.Record) {
idx.addrs[rec.Addr] = append(idx.addrs[rec.Addr], rec)
for _, name := range rec.Names {
idx.names[name] = append(idx.names[name], rec)
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
}
}
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
// equalRecs is an equality function for [*hostsfile.Record].
func equalRecs(a, b *hostsfile.Record) (ok bool) {
return a.Addr == b.Addr && a.Source == b.Source && slices.Equal(a.Names, b.Names)
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
}
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
// equalRecSlices is an equality function for slices of [*hostsfile.Record].
func equalRecSlices(a, b []*hostsfile.Record) (ok bool) { return slices.EqualFunc(a, b, equalRecs) }
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
// Equal returns true if indexes are equal.
func (idx *hostsIndex) Equal(other *hostsIndex) (ok bool) {
if idx == nil {
return other == nil
} else if other == nil {
return false
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
}
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
return maps.EqualFunc(idx.addrs, other.addrs, equalRecSlices)
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
}
// refresh gets the data from specified files and propagates the updates if
// needed.
//
// TODO(e.burkov): Accept a parameter to specify the files to refresh.
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
func (hc *HostsContainer) refresh() (err error) {
log.Debug("%s: refreshing", hostsContainerPrefix)
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
var addrLen, nameLen int
last := hc.current.Load()
if last != nil {
addrLen, nameLen = len(last.addrs), len(last.names)
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
}
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
idx := &hostsIndex{
addrs: make(Hosts, addrLen),
names: make(map[string][]*hostsfile.Record, nameLen),
}
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
_, err = aghos.FileWalker(idx.walk).Walk(hc.fsys, hc.patterns...)
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
if err != nil {
if len(idx.addrs) == 0 {
return fmt.Errorf("refreshing : %w", err)
} else {
log.Debug("%s: refreshing: %s", hostsContainerPrefix, err)
}
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
}
Pull request 1964: AG-23599 use hostsfile Merge in DNS/adguard-home from AG-23599-use-hostsfile to master Squashed commit of the following: commit 4766e67a9d5faa4bc89a2a935d187ce4829f7214 Merge: 38369360b 762e5be97 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Aug 22 16:33:54 2023 +0300 Merge branch 'master' into AG-23599-use-hostsfile commit 38369360b7d0e5c9ec373c5a06bac8792ca9cd69 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 18:09:15 2023 +0300 filtering: imp tests commit 1c4d4a9f9639f048173e1c949f39f9ecb6ed0347 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 14:00:10 2023 +0300 filtering: imp cognit, cyclo commit c50c33d7240c2812a715759fabf140e02184b729 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Aug 21 12:57:31 2023 +0300 filtering: imp code commit 92203b16719a717a2946c0401e166b1b38ddb7bc Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Aug 18 17:39:11 2023 +0300 all: imp code, docs commit 523e8cd50f9136feede657385b7274fa6ba64131 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 15:14:02 2023 +0300 all: fix ipv6 commit 6ce4537132615cbdc34a0b1f326fedd2b63c355d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Aug 17 14:17:27 2023 +0300 all: rm urlfilter from hosts commit d6666e851680c7e586325ea5970e0356ab919074 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 15:09:52 2023 +0300 WIP commit 4a2732960558bef6636d3c428bad4c7c830016ca Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Aug 16 14:47:13 2023 +0300 all: use hostsfile
2023-08-22 16:45:11 +03:00
// TODO(e.burkov): Serialize updates using time.
if !last.Equal(idx) {
hc.current.Store(idx)
hc.sendUpd(idx.addrs)
}
Pull request: 2499 merge rewrites vol.1 Merge in DNS/adguard-home from 2499-merge-rewrites-vol.1 to master Updates #2499. Squashed commit of the following: commit 6b308bc2b360cee8c22e506f31d62bacb4bf8fb3 Merge: f49e9186 2b635bf6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 19:23:07 2021 +0300 Merge branch 'master' into 2499-merge-rewrites-vol.1 commit f49e9186ffc8b7074d03c6721ee56cdb09243684 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 18:50:49 2021 +0300 aghos: fix fs events filtering commit 567dd646556606212af5dab60e3ecbb8fff22c25 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 14 16:50:37 2021 +0300 all: imp code, docs, fix windows commit 140c8bf519345eb54d0e7500a996fcf465353d71 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:41:53 2021 +0300 aghnet: use const commit bebf3f76bd394a498ccad812c57d4507c69529ba Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 19:32:37 2021 +0300 all: imp tests, docs commit 9bfdbb6eb454833135d616e208e82699f98e2562 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 18:42:20 2021 +0300 all: imp path more, imp docs commit ee9ea4c132a6b17787d150bf2bee703abaa57be3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 13 16:09:46 2021 +0300 all: fix windows, imp paths commit 6fac8338a81e9ecfebfc23a1adcb964e89f6aee6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 19:53:35 2021 +0300 all: imp code, docs commit da1ce1a2a3dd2be3fdff2412a6dbd596859dc249 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Oct 11 18:22:50 2021 +0300 aghnet: fix windows tests commit d29de359ed68118d71efb226a8433fac15ff5c66 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 21:02:14 2021 +0300 all: repl & imp commit 1356c08944cdbb85ce5532d90fe5b077219ce5ff Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Oct 8 01:41:19 2021 +0300 all: add tests, mv logic, added tmpfs commit f4b11adf8998bc8d9d955c5ac9f386f671bd5213 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Oct 7 14:26:30 2021 +0300 all: imp filewalker, refactor hosts container
2021-10-14 19:39:21 +03:00
return nil
}