Commit Graph

139 Commits

Author SHA1 Message Date
Dimitri Herzog a4b89537db
update golangci-lint (#510)
* update golangci-lint

* enable gomnd linter

* enable asciicheck linter

* enable bidichk linter

* enable durationcheck linter

* enable errchkjson linter

* enable errorlint linter

* enable exhaustive linter

* enable gomoddirectives linter

* enable gomodguard guard

* enable grouper linter

* enable grouper and ifshort linters

* enable importas linter

* enable makezero linter

* enable nestif linter

* enable nilerr linter

* enable nilnil linter

* enable nlreturn linter

* enable nolintlint linter

* enable predeclared linter

* enable sqlclosecheck linter

* enable tenv linter

* enable wastedassign linter
2022-05-10 09:09:50 +02:00
Dimitri Herzog 41febafd41
chore: test cleanup and refactoring (#509)
test: added additional assertions, introduced channels for bus event tests, refactoring, eliminating race conditions in tests, enable race check in tests
2022-05-06 22:34:08 +02:00
Dimitri Herzog 53814a2208
chore: refactoring list cache, extracting download functionality (#508) 2022-05-06 17:57:33 +02:00
Dimitri Herzog 0a7e46a0d4
test: added additional assertions, introduced channels for bus event tests, refactoring (#501) 2022-04-26 10:43:23 +02:00
ThinkChaos 62c7816ab3
Support of DoH/DoT as bootstrap DNS (#485) 2022-04-22 22:12:35 +02:00
Dimitri Herzog 28789ee7fe
filtering of queries (#450) (#474) 2022-04-01 08:58:09 +02:00
Dimitri Herzog 27f9c8b9a0 chore: improved error logging 2022-03-31 22:29:36 +02:00
Dimitri Herzog 81b896a01d chore: increased test timeout 2022-03-31 22:27:45 +02:00
Dimitri Herzog 2bb2f97f8f
CustomDNS: parameter "filterUnmappedTypes" to allow/disable forwarding to the upstream resolver (#467) 2022-03-22 22:15:31 +01:00
ThinkChaos f8b6e59ef4
Add rewrite support to custom DNS (#449)
This commit extracts rewriting logic from `ConditionalUpstreamResolver`
into the new `RewriterResolver`, and uses that to enable rewriting for
the `CustomDNSResolver`.
`RewriterResolver` wraps a resolver and applies the rewrite to the
request that is forwarded to the inner resolver.

It also introduces a new optional interface: `NamedResolver`.
This allows a `Resolver` to choose what its user friendly name is,
instead of always being its type name.
2022-03-17 22:30:21 +01:00
ThinkChaos 27c8cbf2b7
Update to gingko v2 (#447) 2022-03-03 11:27:27 +01:00
Dimitri Herzog f9369d8fe0 Use full qualified client name as group name (#329) 2022-02-22 10:55:26 +01:00
Dimitri Herzog 759f55d89c
Rewrite DNS response cache (#378) (#413) 2022-01-20 16:45:29 +01:00
Kwitsch 8921a16433
[Feature] Conditional forwarding of all queries for unqualified hostnames (#363) (#409) 2022-01-19 22:26:39 +01:00
Kwitsch ee451f8b36
Sync blocking enable/disable over redis (#377) (#403)
Co-authored-by: Dimitri Herzog <dimitri.herzog@gmail.com>
2022-01-19 22:03:41 +01:00
FileGo c176b02ac9
Support Postgresql database for query log (#348)
Co-authored-by: Dimitri Herzog <dimitri.herzog@gmail.com>
2022-01-07 21:42:06 +01:00
FileGo b43c7aa2cb
Enable resolving hosts file (#362)
fixes #362 

Co-authored-by: Dimitri Herzog <dimitri.herzog@gmail.com>
2022-01-04 15:40:09 +01:00
Dimitri Herzog cdec99567a updated retry-go 2021-12-24 22:40:06 +01:00
Dimitri Herzog d7bf373b52 Replace all sleeps in tests with "eventually" from gomega (#379) 2021-12-22 22:21:04 +01:00
Dimitri Herzog ccc6f888e3 externalize retry parameters for query log 2021-12-21 22:03:02 +01:00
Kwitsch d3611fb444
FR: DNS cache sync between multiple blocky instances (#344) (#365) 2021-12-21 17:06:16 +01:00
Dimitri Herzog 61ca25c64c sanitize log output 2021-12-20 22:37:32 +01:00
ThinkChaos 69dc38308c
Allow configuring multiple listen addresses for each port (#372) 2021-12-20 22:13:07 +01:00
ThinkChaos cbcd09c898
Allow configuring custom DNS TTL (#370) 2021-12-16 21:38:01 +01:00
Dimitri Herzog 4b85eedc86 Replace retry implementation with retry-go 2021-12-13 22:10:14 +01:00
Dimitri Herzog 9b4752442e Retry to establish db connection for query log (#351) 2021-12-13 22:10:14 +01:00
Kwitsch 2f79086742
Make retry for list download configurable (#308) (#338)
* DownloadAttempts & DownloadCooldown added to BlockingConfig

* implementation of downloadAttempts & downloadCooldown

* extended NewListCache call

* unit test fix(use old default values)

* documentation of downloadAttempts & downloadCooldown

* linter error(line length)
2021-11-14 21:34:09 +01:00
Kwitsch bd1886d8fa
Allow to define different client names for the same group (#251) (#337)
* comama seperated client names

(cherry picked from commit cdb009d0c8e14b2be25b6a8beb563017c603f674)

* blocking_resolver unittest

(cherry picked from commit cb059deb282bcc614939dc021041c0b35665a84e)

* linter errors reduced

* unit test for group merge
2021-11-14 21:28:52 +01:00
Dimitri Herzog e882fa0a39
Fallback when using mysql or file as query log (#318) (#336) 2021-11-11 08:52:21 +01:00
FileGo 98cf484517
Option to disable the query log (#333) 2021-11-10 21:54:32 +01:00
Dimitri Herzog 9b9596970c Improved configuration output (duration format, etc.) 2021-11-07 21:35:16 +01:00
Kwitsch 3adad4a9f9
Configurable caching for negative results (NXDOMAIN) (#287) (#330)
Changes:
- added cache.cacheTimeNegative (time.Duration)
- if not configured the default cache time stays at 30 min
- if set to a value below zero caching of negative responses is disabled
2021-11-06 22:14:02 +01:00
Dimitri Herzog f823db19c7 Refactoring default parameters in configuration 2021-11-05 23:00:54 +01:00
Dimitri Herzog c5c35015cf changed order in client names resolving 2021-10-18 22:44:11 +02:00
Dimitri Herzog 2aed746d2f introduced "failStartOnListError" parameter (#310) 2021-10-14 21:53:54 +02:00
Dimitri Herzog a90fb5d1c2
Extract client name from the URL (DoH and DoT) (#317)
* Extract client name from the URL (DoH and DoT) #304

* improved tests
2021-10-13 22:47:14 +02:00
Dimitri Herzog cd767960a5 introduced go-multierror to handle multiple errors 2021-10-13 22:45:32 +02:00
Dimitri Herzog 57036aa088 fixed golangci-lint issues 2021-10-13 21:40:18 +02:00
Kwitsch e5b44f49ca
application startup should fail if initial download of a single list failed (#310) (#313)
application startup should fail if initial download of a single list failed
2021-10-13 21:30:14 +02:00
Dimitri Herzog c2fb389cf7 Improve caching of prefetched domains (#290) 2021-09-27 22:52:37 +02:00
Dimitri Herzog ae9b12f15a Configurable upstream lookup timeout (#256) 2021-09-19 22:49:38 +02:00
Dimitri Herzog 925c6f97eb Make list download timeout configurable (#254) 2021-09-15 07:41:20 +02:00
Dimitri Herzog 43bd5684a1 Remove stats resolver (#266) 2021-09-13 22:32:34 +02:00
Dimitri Herzog e6ca89607a write database entries async in bulk 2021-09-13 22:06:21 +02:00
Dimitri Herzog 91b975b0dc Change configuration format for duration (#263) 2021-09-12 21:29:03 +02:00
Dimitri Herzog ee8f041938 refactoring: generate enums 2021-09-11 21:31:03 +02:00
Dimitri Herzog d318e2cddd renamed IPv6Checker to IPV6DisablingResolver 2021-09-09 21:44:49 +02:00
Dimitri Herzog dca82623a1 Storing the query log in the database (#258) 2021-09-08 21:38:34 +02:00
Dimitri Herzog 63735546bb moving model types to the separate package 2021-09-08 21:38:34 +02:00
Gonzalo Arreche c866b71860 Fix go lint issues 2021-09-07 08:34:00 +02:00