Commit Graph

171 Commits

Author SHA1 Message Date
Dimitri Herzog 476dd7d0eb update go-enum to v0.4.0 2022-03-28 21:35:48 +02:00
Dimitri Herzog 78376058c2 test: added unmarshalling tests 2022-03-25 22:04:26 +01: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
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 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 68cc391e0d typo 2021-12-20 22:37:50 +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 c88ca4af85 Improve error message for wrong upstream definition #356 2021-12-11 22:28:44 +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
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 2aed746d2f introduced "failStartOnListError" parameter (#310) 2021-10-14 21:53:54 +02:00
Dimitri Herzog c22292eb19 DoT (DNS-over-TLS) server (#303) 2021-10-04 21:56:18 +02:00
Dimitri Herzog 9b6dc667f9 Ipv6 parsing error in upstream definition (#285) 2021-09-29 22:41:47 +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 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 dca82623a1 Storing the query log in the database (#258) 2021-09-08 21:38:34 +02:00
Gonzalo Arreche 9d33bcd3a1 Allow configuration of block time
When an address is blocked, it can be cached by the client. If we
then wish to allow that address, or just disable the blocking
feature, that client is not gonna be able to see that domain until
the previous domain expires.

The units of time for this setting is in seconds, since we might
want to set it to values around 5 or 10 seconds, depending on the
scenario. The default value for it is the value used before, so
ignoring this setting wont result on any change.
2021-09-06 21:46:35 +02:00
Dimitri Herzog 919512959b use full-qualified name as module 2021-08-27 13:41:36 +02:00
Dimitri Herzog 6a3baa5b95 obfuscate log output for user sensitive data to increase privacy (#225) 2021-08-23 22:34:48 +02:00
Dimitri Herzog 850baf0e47
bootstrapDNS not used for upstream DNS resolution (#242) (#246) 2021-08-21 23:19:30 +02:00
Dimitri Herzog 447821f646
Unable to set IP for http/https port (#221) (#226)
#221: Unable to set IP for http/https port
2021-06-28 07:51:46 +02:00
Dimitri Herzog 30ce749698
Make the number of cached domains configurable (#211)
* #200: Make the number of cached domains configurable
2021-05-17 21:56:39 +02:00
moyo 3770dd97cf
Make prefetch fully configurable (#198)
* make prefetch fully configurable

* add configuration output test
2021-05-03 22:29:26 +02:00
Dimitri Herzog 209024ed0b
#81: Configuration of different upstream DNS servers for different clients (#193)
#81: Configuration of different upstream DNS servers for different clients
2021-04-22 22:37:59 +02:00
Dimitri Herzog db64fc3f03 #182: disabled linting of config structure 2021-04-17 22:25:17 +02:00
Joseph Harnish 1ea60579a7
#182 - added config option for logTimestamp (#184)
* added config option for logTimestamp

* set default to be true
2021-04-17 22:23:51 +02:00
moyo 000bebafb3
Add support of disbale ipv6(AAAA) query (#171)
Add support of disbale ipv6(AAAA) query
2021-04-06 21:34:10 +02:00
Dimitri Herzog 399e8416aa #128: Domain rewrite in conditional resolver 2021-03-10 22:59:04 +01:00
Dimitri Herzog 5fe8bf95af #139: Multiple IP addresses for Custom DNS 2021-03-07 22:50:47 +01:00
Dimitri Herzog eaa4e30db4 update golangci-lint, fixint lint errors 2021-03-05 22:52:22 +01:00
Dimitri Herzog efb5ac37af #147: Blocky commands do not run without local ./config.yml file 2021-02-26 22:42:00 +01:00
Dimitri Herzog 21f9b90841 go fmt 2021-02-26 21:39:41 +01:00
donald-art 7ee2e7db64
public API documentation (#146)
* added doc comments

* added doc comments

* added doc comments

* added doc comments

* added doc comments

* added doc comments

* added doc comments

* added doc comments

* added doc comments

* added doc comments

* added doc comments

* added doc comments

* added doc comments

* added doc comments

* added doc comments

* added doc comments

* added doc comments

* added doc comments

* added doc comments

* added doc comments

* added doc comments

* added doc comments

* added doc comments

* added doc comments

* added doc comments

* added doc comments

* added doc comments
2021-02-26 13:45:57 +01:00
Dimitri Herzog 8f23f47a6d Renamed function, replaced global variable with function call, Initialize global logger only once, minor refactorings, fixed failing tests 2021-02-25 23:36:39 +01:00
nicolas-martin 3b0bbc5f6b use package logger instead of global 2021-02-22 17:28:48 -05:00
Dimitri Herzog 2d11aa13cb removed unreachable conditions 2021-02-08 22:59:01 +01:00
Dimitri Herzog 8a6884d3e8 improved port conversion 2021-02-04 22:27:02 +01:00
Dimitri Herzog e9fff3cef1 prefetching of often used queries 2021-01-16 22:24:05 +01:00
Dimitri Herzog 914a04e5b1 #79: Support for multiple conditional forwarders per domain 2020-12-27 23:40:27 +01:00
Dimitri Herzog 694fe646f6 #116: optional bind address for DNS port 2020-12-27 22:04:01 +01:00
Dimitri Herzog d8a6d689db #119: Error for upstream ipv6 address 2020-12-22 16:02:30 +01:00
Dimitri Herzog 3ffcda9f4d #75: json log output mode 2020-06-21 23:07:05 +02:00
Dimitri Herzog d1b3b929e4 #67: consider request protocol TCP/UDP on calling external DNS (AXFR fails most times) 2020-06-21 22:38:04 +02:00
Dimitri Herzog 3bd80242e8
DoH server support (#61)
#17: DoH server support
2020-05-23 22:54:51 +02:00
Dimitri Herzog 322006757d #55: Client name mapping 2020-05-17 21:50:40 +02:00
Dimitri Herzog 3801f3ebeb extracted regex to constant 2020-05-10 19:44:16 +02:00
Michael Egner 1e276599f9 IPv6 upstream support 2020-05-08 16:23:16 +02:00
Dimitri Herzog 0ec6c8af9c Test rewrite (Ginkgo), Refactorings 2020-05-04 22:20:13 +02:00
Dimitri Herzog 8367a043cf #15: use configurable DNS server to resolve 2020-03-11 22:52:27 +01:00
Dimitri Herzog 09e97eb160 Closes #20 2020-03-09 22:34:10 +01:00
Dimitri Herzog 43fa811809 removed print 2020-03-07 17:33:52 +01:00
Dimitri Herzog 673e208cdd fixes # 18: add additional prometheus metrics for dashboard 2020-03-06 23:00:14 +01:00
Rich7690 5eb7ad5275 Actually fix it this time 2020-02-25 21:34:40 +01:00
Rich7690 f849bf0263 Fixed codacy issues 2020-02-25 21:34:40 +01:00
Rich7690 f52bc29138 Add initial prometheus endpoint support. Fixes #4 2020-02-25 21:34:40 +01:00
Dimitri Herzog c2be2fd8a1 #6: Dns over HTTPS (DoH) 2020-02-17 22:06:10 +01:00
Dimitri Herzog 039414a366 added test 2020-02-13 22:11:29 +01:00
Dimitri Herzog 0061cf0c10 Provide additional configuration for caching, fixes #2 2020-02-10 21:44:51 +01:00
Dimitri Herzog 352986fa5d added refresh period configuration 2020-02-04 22:26:42 +01:00
Dimitri Herzog 0e5138be51 added additional tests 2020-01-18 22:51:30 +01:00
Dimitri Herzog 01a8a402dc initial commit 2020-01-12 18:23:35 +01:00