Commit Graph

212 Commits

Author SHA1 Message Date
ThinkChaos ef8c008249 docs: use relative links for Grafana dashboards
Ensure the linked file matches the current blocky version, not what's
in main, which is no longer the same since switch to single branch dev.
2024-04-11 18:33:09 -04:00
ThinkChaos bcd1381e18 feat: update list config and code to use "allow/deny" language 2024-04-11 18:33:09 -04:00
ThinkChaos d83b7432d4 refactor(log): use `logrus.Level` directly and document `trace` level 2024-03-19 19:10:07 -04:00
ThinkChaos f5bd69cf12 docs(installation): style and minor content tweaks 2024-03-18 12:44:56 -04:00
ThinkChaos 5242fb68ad docs(installation): move "frontend" and add "lists updater" to projects 2024-03-18 12:44:56 -04:00
ThinkChaos 2ecdfd8d78 docs(installation): remove Kubernetes and cleanup list 2024-03-18 12:44:56 -04:00
Ben 9f633f18d0
feat: Support defining records by dns zone format (#1360)
* feat: Support zonefile configuration for custom dns mapping

* docs: Update configuration.md

* Rename var to ok

* Linter fixes

* Remove hashes in test describe description

* Implement PR comments; zoneFileMapping -> zone, initialize with proper sizes

* Remove custom CNAME parsing

* Utilize TTL defined in zone file

* Link to wikipedia's example file

* Test to confirm that a relative zone entry without an $ORIGIN returns an error

* Write a test covering the $INCLUDE directive

* Write a test confirming that a dns zone can result in more than 1 RR

* Linting

* fix: Use proper matchers in CustomDNS Zone tests; Update configuration.md description

* Pull in config directory to support relative $INCLUDE

* Added tests to ensure the ability to use both bare filenames as well as relative filenames when using the $INCLUDE directive

* Shorten test description (Linting error)

* Move Assignment of z.RRs to the end of the UnmarshallYAML function

* Moved tests for relative $INCLUDE zones to config_test. Added test case when config param passed to blocky is a directory

* Corrected test case to _actually_ test againt bare file names
2024-02-09 17:28:58 +01:00
Rahil Bhimjiani 92b93893c7 docs: add links for Gentoo package
Signed-off-by: Rahil Bhimjiani <me@rahil.rocks>
2024-01-30 10:12:04 -05:00
Ben b8b4dc323a
feat: support CNAME records in customDNS mappings (#1352)
Co-authored-by: Ben McHone <ben@mchone.dev>
2024-01-29 11:22:03 -05:00
Shizun Ge d2cb593d32
fix(grafana): move panel around. keep related panels in the same row. (#1344)
When on mobile phone, there is only one column, and the panels display row by row.
2024-01-29 12:33:15 +01:00
Shizun Ge 95bd01360b
feat: do not hardcode the job name in the grafana dashboard.(#1326) 2024-01-17 17:01:21 +01:00
DerRockWolf 999a16847f
Fix docs: upstream spelling (#1333)
* Fix docs upstream spelling

* Update configuration.md
2024-01-10 10:06:33 -05:00
ThinkChaos 2db0bd9c6b fix(docs): update `hostsFile` to use "sources" 2023-12-05 20:52:46 -05:00
ThinkChaos b2fa627a46 fix(docs): remove note that slipped in 2023-12-05 20:52:46 -05:00
ThinkChaos a7f2ca208b fix(docs): make custom DNS matching recursively more explicit 2023-12-05 20:52:46 -05:00
ThinkChaos 7a3c054b43 feat: add `upstreams.init.strategy`
Replaces `startVerifyUpstream` and behaves just like
`blocking.loading.strategy`.

We use the bootstrap resolver for any requests that arrive before the
upstreams are initialized.
2023-12-05 20:52:46 -05:00
Kwitsch 11543356b6
Bugfix in ECS forward (#1290)
* fixed override bug in forward

* set prettier as default formatter for yaml

* added ecs to example config
2023-12-03 14:29:31 -05:00
ThinkChaos 9760735f3a refactor(config): move `dohUserAgent` to `upstreams.userAgent`
That way it can be accessed without using `GetConfig`
2023-11-23 08:45:18 -05:00
ThinkChaos b386e22ebe refactor: embed `Upstreams` in `UpstreamGroup` to make values accessible
Move `startVerifyUpstream` to `upstreams.startVerify` so it's accessible
via `UpstreamGroup` and we don't need to pass `startVerify` to all
resolver constructors that call `NewUpstreamResolver`.

Also has the nice benefit of greatly reducing the usage of `GetConfig`.
2023-11-23 08:45:18 -05:00
ThinkChaos 7feaba48c7
fix(docs): clarify `blocky_error_total` (#1270)
* fix(docs): clarify `blocky_error_total`

* squash: remove period to match other lines
2023-11-22 15:16:19 +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
DerRockWolf 94663eeaeb
feat: add upstream strategy `random` (#1221)
Also simplify code by getting rid of `resolversPerClient` and all surrounding logic.
2023-11-18 15:42:14 -05:00
ThinkChaos b498bc5094
feat(lists): add support for wildcard lists using a custom Trie (#1233) 2023-11-17 15:58:35 +01:00
Dimitri Herzog d77f0ed54f
feat: add API endpoint to flush the DNS Cache (#1178) 2023-09-30 16:13:01 -04:00
ThinkChaos 44f5982fde
docs: make config option names lower-case (#1145) 2023-09-14 16:51:23 +02:00
Dimitri Herzog b1d014017b feat(querylog): add flushInterval parameter 2023-09-14 15:06:10 +02:00
Dimitri Herzog 72d747c16f
feat: API-first approach for REST interface (#1129)
* feat: embed OpenAPI definition file

* feat: use OpenAPI generated server and client

* feat: provide OpenAPI interface documentation

* chore(test): add additional tests
2023-09-09 19:30:55 +02:00
DerRockWolf c112e86740
feat: add upstream strategy `strict` (#1093) 2023-08-21 09:50:23 +02:00
ThinkChaos 639fba5323 refactor(config): allow more configuration for `upstreams`
Rename the `upstream` option to `upstreams.groups` so we can have
more `upstreams` options.
2023-08-01 15:01:40 -04:00
ThinkChaos 56633da0a7 feat(sudn): refactor and expand supported special use domains RFCs 2023-07-14 17:38:13 -04:00
anonion 6028a64aa9 Update prometheus_grafana.md with correct grafana config 2023-07-14 09:19:27 +02:00
ThinkChaos cfc3699ab5 feat: support multiple hosts files 2023-07-07 09:16:20 -04:00
73567876543783 f20480989c
Update deprecated port specification in example config (#1042)
Co-authored-by: bas <bas@fakemail.com>
2023-06-13 16:15:16 +02:00
ThinkChaos 795f3ddf93
fix: configuration for FQDN only resolver (#1025) 2023-05-15 10:24:07 -04:00
log-to-code 8d48a21aea
Add homebrew link to the installation docs (#995) 2023-04-15 23:56:29 +02:00
mandrav 015b565137
Add maxErrorsPerFile blocking configuration (#986)
* Add maxErrorsPerFile blocking configuration

The default max errors per file of 5 is too small IMHO.
This commit makes this number user-configurable.

* squash: fix lint

* squash: docs

* squash: change type to int to allow -1

* squash: test that the `maxErrorsPerFile` is actually used

---------

Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com>
2023-04-12 20:43:49 +02:00
Kwitsch 68a8476e48
chore(build): Automation workflows (#972)
* 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
2023-04-03 16:33:16 +02:00
Dimitri Herzog c9f0355266 chore: mirror git repo to codeberg 2023-03-13 14:04:18 +01:00
Dimitri Herzog 2c108dabb8 chore: change branch name to "main" (#744) 2023-03-07 17:25:04 +01:00
Dimitri Herzog 12ebe2aac6 Merge branch 'development' 2023-03-07 16:05:09 +01:00
ThinkChaos e47a8b7f60 feat(bootstrap): support IP only encrypted DNS
Also make `tcp+udp` upstreams use any IPs provided.
2023-01-18 18:57:55 +01:00
ThinkChaos a79459987b feat(bootstrap): support multiple upstreams
If more than one upstream is configured, they are raced via
a `ParallelBestResolver`.
2023-01-18 18:57:55 +01:00
Suhaib Malik 9be0d64885
CONFIG_FILE -> BLOCKY_CONFIG_FILE (#784) 2022-12-04 17:59:53 +01:00
Kwitsch b73cd3b5ba
Config restructuring (#771)
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
2022-12-02 21:55:40 +01:00
Dimitri Herzog 2b49c2048f
feat(querylog): define which information should be logged (#765) (#766) 2022-11-26 22:12:56 +01:00
Kwitsch d4813a6448
feat(queryLog): log instance hostname to distinguish log entries in multi-instance installation(#319) (#756)
* added hostname to util

* added HostnameString

* some leftover debug output?

* added hostname to querylog

* add optional volume mounts to documentation

* changed documentation
2022-11-24 21:39:58 +01:00
Kwitsch c19d4bd60d
feat: Support for redis sentinel(#632)
Co-authored-by: Dimitri Herzog <dimitri.herzog@gmail.com>
2022-11-24 14:37:48 +01:00
Dimitri Herzog fac872b6e2 @0xERR0R chore(docs): minor changes
Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com>
2022-11-23 20:47:59 +01:00
Dimitri Herzog 2b0c377702 chore(docs): minor format changes, typos 2022-11-23 20:47:59 +01:00
Tobias Muellerleile a04a4180c3 Fix docs for connectIPVersion param 2022-11-14 21:35:35 +01:00