Commit graph

81 commits

Author SHA1 Message Date
Eugene Bujak
751be05a31 API filtering/add_url -- accept JSON instead of name=value lines 2018-10-11 18:33:56 +03:00
Eugene Bujak
413228e6ec API backend -- implement ability to turn toggle all protection in one go, helpful to temporarily disable all kinds of filtering 2018-10-10 20:13:03 +03:00
Eugene Bujak
903b20dcab Remove dead code 2018-10-10 15:47:08 +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
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
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
19e76b6938 Add API call to reset stats 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
7d7360c700 Web UI API -- Give out 24-hour stat instead of last 3 minutes. 2018-10-03 22:44:50 +03:00
Eugene Bujak
7b7f713880 Be less noisy during long periods of time 2018-09-28 18:08:26 +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
a65a40c6be Update /status to return currently set upstream DNS servers. 2018-09-25 19:53:36 +03:00
Eugene Bujak
bd0fa4cc4f Fix 'index out of range' panic when adding a filter URL that has empty line in contents 2018-09-25 18:23:02 +03:00
Eugene Bujak
c3f6a96f2f Add API endpoint to fetch version.json from github.io 2018-09-20 20:02:25 +03:00
Eugene Bujak
e733c19504 Implement API to test for upstream DNS servers. 2018-09-19 19:12:09 +03:00
Eugene Bujak
4548eb8d11 Implement simple basic auth.
Closes #326.
2018-09-18 20:59:41 +03:00
Eugene Bujak
076c9de68e Fix many lint warnings found by gometalinter 2018-09-14 18:40:05 +03:00
Eugene Bujak
5c6aa910ef Fix a missed argument that breaks go test (which invokes go vet and fails if that fails) 2018-09-14 14:47:27 +03:00
Eugene Bujak
3b44efc8e3 /add_url -- it fetches the URL and checks if contents are valid filter, fails if it is not, and returns number of rules if it is 2018-09-14 04:33:54 +03:00
Eugene Bujak
7094ed4f28 Fixup of previous commit -- errand keystroke crept in 2018-09-07 17:59:24 +03:00
Eugene Bujak
f623c3d909 API /stats_top -- sort top entries by value 2018-09-07 17:50:03 +03:00
Eugene Bujak
8198b65f29 API /stats_top -- show only top entries for last 3 minutes 2018-09-07 17:49:33 +03:00
Eugene Bujak
04562dece3 Rewrite how historical stats are stored and calculated.
Closes #310.
2018-09-06 02:11:36 +03:00
Eugene Bujak
fe397943d6 After filters were redownloaded and deemed to be fresh, tell coredns server to reload 2018-09-06 02:09:05 +03:00
Eugene Bujak
f2621c4a9a Remove debug logging during checks if coredns is alive 2018-09-06 02:04:16 +03:00
Eugene Bujak
859f1590dd Be more atomic during writing of files -- this prevents other processes from seeing empty or impartial files 2018-09-06 02:03:03 +03:00
Eugene Bujak
33fbccf0ba Move starting of coredns server into separate function 2018-09-06 02:00:44 +03:00
Eugene Bujak
30553c6a9a Show 50 top blocked/requestsed/clients instead of 3.
Closes #312
2018-08-31 18:21:07 +03:00
Eugene Bujak
ed4077a969 Initial commit 2018-08-30 17:25:33 +03:00