* RedisConfig -> Redis
* moved redis config to seperate file
* bugfix in config test during parallel processing
* implement config.Configurable in Redis config
* use Context in GetRedisCache
* use Context in New
* caching resolver test fix
* use Context in PublishEnabled
* use Context in getResponse
* remove ctx field
* bugfix in api interface test
* propperly close channels
* set ruler for go files from 80 to 111
* line break because function length is to long
* only execute redis.New if it is enabled in config
* stabilized flaky tests
* Update config/redis.go
Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com>
* Update config/redis_test.go
Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com>
* Update config/redis_test.go
Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com>
* Update config/redis_test.go
Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com>
* Update config/redis.go
Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com>
* Update config/redis_test.go
Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com>
* fix ruler
* redis test refactoring
* vscode setting cleanup
* removed else if chain
* Update redis_test.go
* context race fix
* test fail on missing seintinel servers
* cleanup context usage
* cleanup2
* context fixes
* added context util
* disabled nil context rule for tests
* copy paste error ctxSend -> CtxSend
* use util.CtxSend
* fixed comment
* fixed flaky test
* failsafe and tests
---------
Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com>
* 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
* fix(tests): properly silence log output
Using `init` allows it to also work for benchmarks.
And `log.Silence` was sometimes getting overridden by `log.init`.
* squash: fix(server): don't setup the logger again
* 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
* Added fork sync workflow(syncs the main branch with upstream every 30 minutes)
* Added monthly workflow run deletion(all skipped or canceld and runs older than 30days will be deleted)
* Removed Docker image build for main branch on forks
* Added documentation how to enable sync and docker build workflows
* refactor: make `config.Duration` a struct with `time.Duration` embed
Allows directly calling `time.Duration` methods.
* refactor(HostsFileResolver): don't copy individual config items
The idea is to make adding configuration options easier, and searching
for references straight forward.
* refactor: move config printing to struct and use a logger
Using a logger allows using multiple levels so the whole configuration
can be printed in trace/verbose mode, but only important parts are
shown by default.
* squash: rename `Cast` to `ToDuration`
* squash: revert `Duration` to a simple wrapper ("new type" pattern)
* squash: `Duration.IsZero` tests
* squash: refactor resolvers to rely on their config directly if possible
* squash: implement `IsEnabled` and `LogValues` for all resolvers
* refactor: use go-enum `--values` to simplify getting all log fields
* refactor: simplify `QType` unmarshaling
* squash: rename `ValueLogger` to `Configurable`
* squash: rename `UpstreamConfig` to `ParallelBestConfig`
* squash: rename `RewriteConfig` to `RewriterConfig`
* squash: config tests
* squash: resolver tests
* squash: add `ForEach` test and improve `Chain` ones
* squash: simplify implementing `config.Configurable`
* squash: minor changes for better coverage
* squash: more `UnmarshalYAML` -> `UnmarshalText`
* refactor: move `config.Upstream` into own file
* refactor: add `Resolver.Type` method
* squash: add `log` method to `typed` to use `Resolover.Type` as prefix
* squash: tweak startup config logging
* squash: add `LogResolverConfig` tests
* squash: make sure all options of type `Duration` use `%s`
Unify the hosts file parsing between the hosts resolver and lists so
the resolver supports more data sources than local files.
Lists' group cache is now re-used if refresh fails.
Also improve lookups in hosts:
Instead of iterating through all hosts+aliases for each A/AAAA query,
we can do a single lookup.
For PTR we search through only the hosts with an IP version that matches
the question. And compare IPs instead of building the reverse DNS name
for each IP in the hosts database.
To declutter the global top level config options i propose the grouping of ports and logging options as child options of top level options.
New structure:
ports:
dns: 43
http: 4000
https: 4443
tls: 853
log:
level: warn
format: json
privacy: true
timestamp: false
* Added more data to template data, and push the version to server.go in the makefile
* moving version and build time to util package, added build time to the web interface
Co-authored-by: Dimitri Herzog <dimitri.herzog@gmail.com>