37 Commits
Author SHA1 Message Date
Dimitri Herzog 06555e04de fix(metrics): bound reason label cardinality for blocked responses (#2114) 2026-06-15 19:32:57 +00:00
Yevhen Pavlov 3075c3810c refactor: clean up obsolete Go syntax (#1951) 2025-12-03 06:54:53 +01:00
Dimitri Herzog b29eab48ac feat: add SOA records to NXDOMAIN responses for RFC 2308 compliance (#1895)
Enables proper negative caching by DNS clients and makes blockTTL functional for NXDOMAIN mode.

Closes #1874
2025-10-18 22:11:29 +02:00
Dimitri Herzog d0681ae6d3 feat: enhance error messages with more context (#1894) 2025-10-18 20:51:28 +02:00
Dimitri Herzog 9d4a58c72d fix: allow list group initialization with partial source failures (#1889)
* fix: allow list group initialization with partial source failures

When multiple list sources are configured for a blocking group, a
transient error (e.g., timeout) on one source no longer fails the
entire group if other sources loaded successfully.

Previously, any TransientError would cause the entire group to fail
initialization, even when other sources in the group had successfully
loaded entries. This left users without any DNS blocking functionality.

Now, groups succeed if at least one source loads successfully. Failed
sources will be retried on the next refresh cycle, maintaining blocking
functionality with available lists.

Fixes #1825

* fix: race condition

* fix lint error
2025-10-17 22:05:10 +02:00
Dimitri Herzog 353b4e5b81 build: add additional linters 2025-08-08 23:20:29 +02:00
Dimitri Herzog 6f91f54aa8 test: create e2e test for custom DNS (#1720) 2025-03-02 22:31:57 +01:00
ThinkChaos 6aae002ca7 refactor: add : prefix to ports during config unmarshaling 2024-09-04 16:12:29 +00:00
Terrance 4eff0b3b00 Add support for SRV and TXT in custom DNS zones (#1588)
* Add support for SRV and TXT in custom DNS zones

* Add tests for SRV and TXT in custom DNS zones

* Appease the linter
2024-08-27 01:33:00 +02:00
ThinkChaos d5b6ee93b5 fix: use proxy env vars via Go default HTTP Transport values
Don't build `http.Transport` instances from scratch, but start from
`http.DefaultTransport` and override what is needed.
2024-04-10 09:43:57 -04:00
BenandBen McHone b8b4dc323a feat: support CNAME records in customDNS mappings (#1352)
Co-authored-by: Ben McHone <[email protected]>
2024-01-29 11:22:03 -05:00
ThinkChaos c5cc1120a9 squash: remove TmpFolder.ReadDir and partially revert querylog test 2023-12-01 15:53:11 -05:00
ThinkChaos 8c7b89cbb3 refactor(tests): remove TmpFile.Error to centralize error checks 2023-12-01 15:53:11 -05:00
ThinkChaos 891d0fba74 refactor(tests): move DeferCleanup into helper functions 2023-12-01 15:53:11 -05:00
Kwitsch 976d6198f1 Refactoring server.go (#1277)
* made Stop context aware

* added error check

* context aware OnRequest

* linter fix

* fixed some flakiness in tests

* made DoGetRequest context aware

* this doesn't belong there and produces flakyness
2023-11-28 07:02:51 +01:00
Kwitsch d37d18348f EDNS: Client Subnet (#1007)
* added util for handling EDNS0 options

* disable caching if the request contains a netmask size greater than 1

* added config section for ECS handling and validation for it

*added ecs_resolver for enhancing and cleaning subnet and client IP information
2023-11-20 16:56:56 +01:00
ThinkChaos b498bc5094 feat(lists): add support for wildcard lists using a custom Trie (#1233) 2023-11-17 15:58:35 +01:00
Kwitsch 6c000090b1 Unit test refactoring & devcontainer enhancement(#1245)
* Whietlist dot imports for test packages

* improved generate-lcov script

* moved mock_call_sequence to helpertest

* removed default config for markdown

* generate seperate lcov.info for each directory

* path fix in lcov generation script

* ginkgo -> v2.13.1

* fixed redundant strings

* added exampleComKey

* added folder name to finish message

* hide lcov.info in devcontainer

* coverage plugin is bugged if lcov file is excluded

* moved all lcov files to coverage folder

* added requested toos #1251
2023-11-15 16:42:53 +01:00
Kwitsch 8ece708fe9 devcontainer & unit test refactoring (#1220)
* extension cleanup & added ginkgo watch

* added gcov2lcov

* added test explorer and reworked scripts

* go mod tidy

* use package cache volume

* script rework

* defined tasks

* defined launch

* don't try to convert if test was canceld

* generate lcov only in devcontainer

* disable coverage upload on forks

* wip: make lcov

* fixed unit tests for parallel

* parallel test for lists

* fix serve test for parallel

* parallel test fixes

* deleted accident commit

* wip: make lcov

* restructured settings location

* start script refactoring

* added GetProcessPort

* fixed parallel ports

* race fix

* changed port for github runner binding

* fixed local list var in test

* more local vars in tests fix

* less local vars

* run test & race parallel

* removed invalid error check

* fixed error  check

* less local variables

* fixed timing problem

* removed gcov2lcov

* added generate-lcov

* added GINKGO_PROCS to makefile

* fixed workflow

* run generate-lcov on save *.go

* added tooltitude
2023-11-11 11:58:31 -05:00
Dimitri Herzog f98859325e fix: use different TTL of multiple records in answer 2023-09-25 22:12:25 +02:00
ThinkChaos 56633da0a7 feat(sudn): refactor and expand supported special use domains RFCs 2023-07-14 17:38:13 -04:00
Dimitri Herzog 53a7d4fccc Test refactoring (#798)
* test: refactor tests

* chore: fix possible race condition in cache
2022-12-29 14:58:25 +01:00
KwitschandThinkChaos 9abeaeddea Added gofumpt (#805)
* fix linter errors

* added gofumpt

* Makefile cleanup

* gofumpt run

* Update Makefile

Co-authored-by: ThinkChaos <[email protected]>

* go mod tidy

* fmt + lint

* go mod tidy

Co-authored-by: ThinkChaos <[email protected]>
2022-12-26 22:11:45 +01:00
Dimitri Herzog f78a57a94d chore(build): add additional linters (#774)
* chore(build): add nolintlint linter

* chore(build): add usestdlibvars linter
2022-11-29 21:58:26 +01:00
Dimitri Herzog fb0810f18d build(tests): e2e integration tests with docker and testcontainers (#753) 2022-11-24 21:54:52 +01:00
Dimitri Herzog 421807fc22 chore: update golangci-lint (#631) 2022-08-19 22:04:35 +02:00
Kwitsch 9c80a5f9a9 test: use dynamic unit test data (#624) 2022-08-06 22:44:26 +02:00
Dimitri Herzog a903565cb0 set content-type header for HTTP endpoints (#581) 2022-06-29 22:36:54 +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 dca82623a1 Storing the query log in the database (#258) 2021-09-08 21:38:34 +02:00
Dimitri Herzog 919512959b use full-qualified name as module 2021-08-27 13:41:36 +02: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 9aecf0b2af Changed assert output 2021-02-26 11:53:04 +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 0ec6c8af9c Test rewrite (Ginkgo), Refactorings 2020-05-04 22:20:13 +02:00
Dimitri Herzog 3cbc4e0719 tests refactoring 2020-01-14 22:32:30 +01:00