Commit Graph

3418 Commits

Author SHA1 Message Date
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 0440ef016a stats -- Clamp number of rotations to sane value and prevent from going into (very long) loop 2018-10-08 05:55:33 +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 4ecb84f9ad Fix some lint warnings 2018-10-07 23:43:24 +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 0ee112e8a0 querylog -- Add querylog files to gitignore 2018-10-07 02:21:27 +03:00
Eugene Bujak 656d092ad6 if coredns unexpectedly quits, restart it 2018-10-07 02:21:27 +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 16fd1359cd Merge pull request #53 in DNS/adguard-dns from bugfix/shoult_not_happen_spam to master
* commit '3a7a80f15f0180836077b4f63e504a659133adbb':
  coredns plugin -- fix SHOULD NOT HAPPEN spam when incoming request is for root servers
  Makefile -- update pprof plugin to survive coredns reloads
2018-10-05 17:12:24 +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 5b9a5fff97 Makefile -- update pprof plugin to survive coredns reloads 2018-10-05 07:25:44 +03:00
Eugene Bujak 3f8450337f Merge pull request #52 in DNS/adguard-dns from feature/persistent-stats to master
* commit '19e76b693803220dffcd0a1fb1fe1e654309a11a':
  Add API call to reset stats
  Periodically flush stats.json
  Web UI -- persistent stats by writing them into stats.json at exit
2018-10-04 14:53:05 +03:00
Eugene Bujak 19e76b6938 Add API call to reset stats 2018-10-04 14:29:17 +03:00
Eugene Bujak 856e26edcf Periodically flush stats.json 2018-10-04 14:29:17 +03:00
Eugene Bujak 51ec58b0ce Web UI -- persistent stats by writing them into stats.json at exit 2018-10-04 14:29:16 +03:00
Eugene Bujak c6eabb5b67 Merge pull request #51 in DNS/adguard-dns from feature/regexp_leak to master
* commit '1cc1e3749df6ccefb741232d7949fd5893d84f66':
  dnsfilter -- lazily initialize safebrowsing and parental lookup cache
  dnsfilter -- avoid using regexps when simple suffix match is enough.
2018-10-04 13:52:31 +03:00
Eugene Bujak 1cc1e3749d dnsfilter -- lazily initialize safebrowsing and parental lookup cache 2018-10-04 13:38:52 +03:00
Eugene Bujak cb97a254a5 dnsfilter -- avoid using regexps when simple suffix match is enough.
This covers 96.98% of all adguard dns rules.
2018-10-04 13:19:43 +03:00
Eugene Bujak 9e939e5754 Merge pull request #49 in DNS/adguard-dns from features/memleak-test to master
* commit '3aac7e7bc9b4bb3ecff697b7748499a14bc64a0d':
  Add a test to demonstrate huge memory usage due from having too many regexps
2018-10-04 12:51:09 +03:00
Eugene Bujak b72d6f68e6 Merge pull request #47 in DNS/adguard-dns from feature/349 to master
* commit '57ade2c3c3804d24857a45a8ab31c10534154dc7':
  Increase querylog size from 1000 to 10000 -- that'll use 32MB of memory.
  Web UI API -- Give out 24-hour stat instead of last 3 minutes.
2018-10-04 12:16:43 +03:00
Eugene Bujak 3aac7e7bc9 Add a test to demonstrate huge memory usage due from having too many regexps 2018-10-04 02:06:23 +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 7d7360c700 Web UI API -- Give out 24-hour stat instead of last 3 minutes. 2018-10-03 22:44:50 +03:00
Ildar Kamalov 8c76e17b1b Merge pull request #46 in DNS/adguard-dns from feature/332 to master
* commit '991574f236ba691548839104a4218d749fbef10a':
  Fix row original
  Add query log filtering
2018-10-03 12:38:14 +03:00
Ildar Kamalov 991574f236 Fix row original 2018-10-02 18:30:34 +03:00
Ildar Kamalov d7596fe860 Add query log filtering
Closes #322
2018-10-02 18:14:41 +03:00
Eugene Bujak 0c3c8dba9b Merge pull request #43 in DNS/adguard-dns from feature/341 to master
* commit 'e20bfe9d08d6c60c8f37ec49dcda2f446bdf0ce5':
  Replace line endings on save
  Add "block" and "unblock" buttons to the Query Log
2018-09-28 20:07:38 +03:00
Eugene Bujak 04e9f74435 Merge pull request #45 in DNS/adguard-dns from less-chatty to master
* commit '7b7f7138806b0b743d4fb1c4fef3c40f513be8b4':
  Be less noisy during long periods of time
2018-09-28 20:04:25 +03:00
Eugene Bujak 7b7f713880 Be less noisy during long periods of time 2018-09-28 18:08:26 +03:00
Ildar Kamalov e20bfe9d08 Replace line endings on save 2018-09-28 17:47:34 +03:00
Ildar Kamalov c40f7b4d5c Add "block" and "unblock" buttons to the Query Log 2018-09-28 16:30:52 +03:00
Eugene Bujak d7039d9222 Merge pull request #42 in DNS/adguard-dns from feature/344 to master
* commit '2c720350006f607958540a672d2fa4cf927010bb':
  Add list of upstream servers
2018-09-26 18:55:28 +03:00
Eugene Bujak 3282a45978 Merge pull request #41 in DNS/adguard-dns from feature/346 to master
* commit '98994916b58faddb210b0776bdd7b5b6de43a8dc':
  Code review request -- set safebrowsing default to disabled
  web backend -- generate corefile with blocked_ttl config parameter
  coredns plugin -- Add option "blocked_ttl" that can change default nxdomain response TTL
  Makefile -- avoid stale copy of this repo inside build/gopath
2018-09-26 18:52:30 +03:00
Eugene Bujak 98994916b5 Code review request -- set safebrowsing default to disabled 2018-09-26 18:41:45 +03:00
Eugene Bujak f1ae5d78d2 web backend -- generate corefile with blocked_ttl config parameter
Closes #346.
2018-09-26 18:38:35 +03:00
Ildar Kamalov 2c72035000 Add list of upstream servers
Closes #344
2018-09-26 18:38:06 +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 c9e10c9de7 Makefile -- avoid stale copy of this repo inside build/gopath 2018-09-26 18:38:06 +03:00
Eugene Bujak de7b2d5e6b Merge pull request #40 in DNS/adguard-dns from feature/347 to master
* commit 'ff86d6b7dc31e463651c11f02330630e35676e05':
  Set default servers to tls://1.1.1.1 and tls://1.0.0.1
2018-09-26 18:00:34 +03:00
Eugene Bujak ff86d6b7dc Set default servers to tls://1.1.1.1 and tls://1.0.0.1
Also add support for tls:// in webUI API
2018-09-26 17:47:23 +03:00
Eugene Bujak 3afd8fccc7 Merge pull request #39 in DNS/adguard-dns from feature/333 to master
* commit '2cf22898dd1418d1659340a95c94c8c9a6a7cf04':
  Add button to the dashboard page for enable/disable filtering
2018-09-26 17:24:30 +03:00
Ildar Kamalov 2cf22898dd Add button to the dashboard page for enable/disable filtering
Closes #333
2018-09-26 17:12:31 +03:00
Eugene Bujak 381b96a4b1 Merge pull request #38 in DNS/adguard-dns from bugfix/344 to master
* commit 'a65a40c6beb00176f46e7187ba0c4b678b17f6d8':
  Update /status to return currently set upstream DNS servers.
  web UI -- Fix engrish when checking upstream DNS servers succeeds
2018-09-25 20:54:35 +03:00
Eugene Bujak a65a40c6be Update /status to return currently set upstream DNS servers. 2018-09-25 19:53:36 +03:00