Commit Graph

55 Commits

Author SHA1 Message Date
Andrey Meshkov
54bdacdde2 Fix review comments: NextFilterId collisions 2018-10-30 17:16:20 +03:00
Andrey Meshkov
0e065a2e61 Added more logging to the plugin 2018-10-30 12:57:16 +03:00
Andrey Meshkov
591065aa3a Added filterId to the querylog
Updated the openapi.yaml accordingly
Some minor refactoring/renaming
Fix other review comments
2018-10-30 12:24:59 +03:00
Andrey Meshkov
760e3596b6 Fix review comments
Fixed coredns plugin tests
Check that user filter is not empty
2018-10-30 11:01:09 +03:00
Andrey Meshkov
32d4e80c93 Fix #371 #421
Filters are now saved to a file
Also, they're loaded from the file on startup
Filter ID is not passed to the CoreDNS plugin config (server-side AG DNS must be changed accordingly)
Some minor refactoring, unused functions removed
2018-10-30 02:17:24 +03:00
Andrey Meshkov
abb51ddb8a Add ErrAlreadyExists 2018-10-29 16:17:18 +03:00
Andrey Meshkov
2b2a797cf7 Moved hosts-syntax matching to DnsFilter 2018-10-29 15:46:58 +03:00
A.J. Ruckman
b3840b5790 minor tweaks 2018-10-22 22:51:51 +03:00
Eugene Bujak
5437a9d3a6 Do not use port 8618, it's a leftover from a time when we had two binaries.
Should fix 378 but needs testing from users having the problem since couldn't reproduce it here yet.
2018-10-17 18:55:27 +03:00
Eugene Bujak
f0823f1195 Fixup of previous commit. 2018-10-15 19:34:31 +03:00
Eugene Bujak
1ed9faa0c2 Fix API returning wrong average request time 2018-10-15 19:30:10 +03:00
Eugene Bujak
3e2a3afc52 Rename from 'Adguard DNS' to 'AdGuard Home'. 2018-10-15 16:02:19 +03:00
Andrey Meshkov
aa691a068a Fix #368 2018-10-15 14:31:21 +03:00
Andrey Meshkov
e356540872 fix crash 2018-10-12 20:36:57 +03:00
Eugene Bujak
5192e95a0d coredns plugin -- remove debug logging 2018-10-12 17:11:57 +03:00
Eugene Bujak
bad88961e9 WIP -- single binary -- works, replies to DNS, but need to check what got broken 2018-10-12 17:11:57 +03:00
Eugene Bujak
8d13770b0d Remove unneeded debug prints 2018-10-11 18:33:56 +03:00
Eugene Bujak
4995c1a1a8 Hotfix -- fix querylog verifier that got broken by 5ae2a32d6e 2018-10-11 18:06:33 +03:00
Eugene Bujak
5ae2a32d6e coredns querylog -- since we read entire querylog json once at startup, fill querylog cache from it and then rotate it on each incoming DNS query 2018-10-10 19:44:07 +03:00
Eugene Bujak
a5d1053520 Cache DNS lookups when resolving safebrowsing or parental servers, also cache replacement hostnames as well. 2018-10-10 19:10:38 +03:00
Andrey Meshkov
90bef94500 Fix strings 2018-10-10 17:24:12 +03:00
Eugene Bujak
5533b434da coredns plugin -- give out to browser last entries from querylog file, not first 2018-10-10 00:23:15 +03:00
Eugene Bujak
eb5f66ad9e coredns plugin -- Increase querylog given out to web UI from 1000 to 5000. 2018-10-09 22:53:19 +03:00
Eugene Bujak
ca794aed63 querylog file -- disable gzip compression 2018-10-09 05:02:16 +03:00
Eugene Bujak
37f6d38c49 Implement online stats calculation in coredns plugin instead of scraping prometheus. 2018-10-09 04:45:05 +03:00
Eugene Bujak
7dea729656 Fix build failure of coredns plugin introduced by previous merge 2018-10-08 20:35:22 +03:00
Eugene Bujak
a15f21ca1c code review -- move constants into named constants 2018-10-08 20:04:36 +03:00
Eugene Bujak
a15c59e24e coredns plugin -- Cache /querylog API result 2018-10-08 19:51:43 +03:00
Eugene Bujak
763dcc46e9 coredns plugin -- Final fix for deadlock during coredns reload 2018-10-08 17:49:08 +03:00
Eugene Bujak
3109529dbb coredns plugin -- change rlock to lock when loading top stats to avoid doing it in parallel 2018-10-08 17:14:11 +03:00
Eugene Bujak
2c84cd6448 coredns plugin -- Fix deadlock during coredns reload 2018-10-08 17:07:45 +03:00
Eugene Bujak
182fa37e5f querylog API -- when manually generating json, don't forget to escape strings 2018-10-08 05:07:02 +03:00
Eugene Bujak
ea1125f57d coredns plugin -- don't reload from querylog on SIGUSR, we already have it in memory 2018-10-08 04:24:37 +03:00
Eugene Bujak
a2434d4574 coredns plugin -- Calculate top for domains, clients and blocked both from querylog and running requests.
This moves the functionality from frontend to coredns plugin.
2018-10-07 23:42:17 +03:00
Eugene Bujak
3b1faa1365 Fix more race conditions found by race detector 2018-10-07 21:24:22 +03:00
Eugene Bujak
dc1042c3e9 Querylog -- Omit empty fields when writing json 2018-10-07 02:21:47 +03:00
Eugene Bujak
a63fe958ae Querylog -- Read from querylog files when answering to /querylog API, it now survives restarts. 2018-10-07 02:21:33 +03:00
Eugene Bujak
2244c21b76 Fix race conditions found by go's race detector 2018-10-07 02:21:27 +03:00
Eugene Bujak
2c33905a79 Querylog -- Implement file writing and update /querylog handler for changed structures. 2018-10-07 02:21:12 +03:00
Eugene Bujak
3a7a80f15f coredns plugin -- fix SHOULD NOT HAPPEN spam when incoming request is for root servers 2018-10-05 07:36:03 +03:00
Eugene Bujak
57ade2c3c3 Increase querylog size from 1000 to 10000 -- that'll use 32MB of memory. 2018-10-03 22:44:57 +03:00
Eugene Bujak
c7790a8d9f coredns plugin -- Add option "blocked_ttl" that can change default nxdomain response TTL 2018-09-26 18:38:06 +03:00
Eugene Bujak
09a39cce03 Allow disabling of filtering but keeping querylog, safebrowsing, safesearch and parental working. 2018-09-25 19:26:26 +03:00
Eugene Bujak
ea320f5ee3 Fix test failures introduced by previous commit afd1fe21f6. 2018-09-25 19:12:50 +03:00
Eugene Bujak
620212ad37 coredns -- don't try to be smart and replace 127.0.0.1 with NXDOMAIN yet -- need research on that first 2018-09-25 18:34:01 +03:00
Eugene Bujak
076c9de68e Fix many lint warnings found by gometalinter 2018-09-14 18:40:05 +03:00
Eugene Bujak
aa2e5500e7 coredns plugin -- do not filter out non-FQDN's -- otherwise it breaks serving /etc/hosts 2018-09-11 17:57:20 +03:00
Eugene Bujak
3b9aaff861 coredns plugin metrics -- deduplicate code 2018-09-07 16:10:11 +03:00
Eugene Bujak
c7a5275d42 coredns plugin -- convert logic into switch, logging unexpected non-covered cases 2018-09-06 02:09:57 +03:00
Eugene Bujak
876854d403 coredns plugin -- on server reload, metrics disappeared, therefore they must be registered on each reload instead of once 2018-09-06 02:08:49 +03:00