Commit Graph

138 Commits

Author SHA1 Message Date
Frank Olbricht
de4c9cf2f0 Fix network-selection in DoT listener (#450) 2025-04-10 09:21:28 +02:00
Frank Olbricht
f568cac644 Tweak more log levels (#437) 2025-02-16 13:36:28 +01:00
Frank Olbricht
67589fd303 Re-align log-levels with logrus (#435) 2025-02-09 14:20:18 +01:00
Leonard Walter
d211310184 ODoH listener (#430)
* added ODoH listener

* Implemented feedback from folbricht on odoh-listener

* added some minor security enhancements to the odoh proxy

* catch error when config load fails

* remove debugging lines

* switch back to universal "/" handler on DoH listener
2025-02-01 11:32:12 +01:00
Frank Olbricht
4032867773 Implement GeoIP blocking based on ASN (#330)
* Implement GeoIP blocking based on ASN

* update logger
2025-01-15 06:22:43 +01:00
Frank Olbricht
32723dc0a5 New ip-version option for listeners (#356)
* New ip-version option for listeners

* make ip-version optional
2025-01-14 07:06:54 +01:00
Frank Olbricht
318e984ae4 Support blocking based on MAC-address (#401) 2025-01-14 07:06:13 +01:00
Frank Olbricht
0e8cf48b09 New use-ecs option in client-blocklist (#351) 2025-01-14 06:56:12 +01:00
Frank Olbricht
3d75a4e7f7 Implement 'query-log' (#410)
* Implement 'query-log'

* use slog to produce logs

* Support JSON output for query-log
2025-01-14 06:46:54 +01:00
Ali
e51f51e1bc move from logrus to slog (#422)
* Migrate from logrus to slog

* fully removing logrus

* should be working now

* Update pipeline.go

Co-authored-by: Frank Olbricht <frank.olbricht@gmail.com>

* Update response-blocklist-name.go

Co-authored-by: Frank Olbricht <frank.olbricht@gmail.com>

* added null logger

* Update pipeline.go

---------

Co-authored-by: Frank Olbricht <frank.olbricht@gmail.com>
2025-01-13 08:43:30 +01:00
Frank Olbricht
2868dbd615 Re-add support for Oblivious DNS (#426)
* Revert "Remove ODOH due to broken dependency (#425)"

This reverts commit 8eecee85ec.

* switch back to updated version of cloudflare/odoh-go that fixes broken dependencies (#427)

---------

Co-authored-by: Leonard Walter <50204487+LeonardWalter@users.noreply.github.com>
2025-01-13 08:39:34 +01:00
Frank Olbricht
8eecee85ec Remove ODOH due to broken dependency (#425)
* Revert "Fixing problems with cloudflare/odoh-go  (#423)"

This reverts commit eed9ea8911.

* Revert "Support for Oblivious DNS client (#118)"

This reverts commit 72e4730046.
2025-01-11 09:11:37 +01:00
Frank Olbricht
72e4730046 Support for Oblivious DNS client (#118)
* Support for Oblivious DNS client

* Update to the ODoH client (#418)

* fixing context problem

* Updated the ODoH client

* allowing ODoH client to send queries without a proxy

* added missing code to load pre configured ODoH server config key

* added missing support for ODoH servers not on port 443

* Implemented feedback on ODoH client

---------

Co-authored-by: Leonard Walter <50204487+LeonardWalter@users.noreply.github.com>
2024-12-24 09:39:21 +09:00
Frank Olbricht
de8637bc0a Remove leftover debug code (#415) 2024-11-30 13:15:11 +01:00
Frank Olbricht
d87839a84f Give EDNS0-EDE templates access to blocklist matches (#403)
* Give EDNS0-EDE templates access to blocklist matches

* undo testing change
2024-08-11 08:06:13 +02:00
Frank Olbricht
4c6a9d76cb Update docs to explain usage of static-template EDE (#402)
* Update docs to explain usage of static-template EDE

* doc
2024-07-25 13:08:25 +02:00
Frank Olbricht
9cbec3f2ea Fix comment to use correct enable-0rtt not Use0RTT (#400) 2024-07-03 10:03:50 +02:00
Frank Olbricht
ea836d4bc3 New static-template group (#378)
* New static-template group

* example file
2024-06-22 14:05:22 +02:00
Frank Olbricht
ced15dabce New ECS modifier option 'add-if-missing' (#389) 2024-06-22 14:03:25 +02:00
Frank Olbricht
a853239c00 Document how to use export Prometheus metrics (#386) 2024-06-01 18:34:56 +02:00
Leonard Walter
f2a08d62b3 Enabling 0-RTT for QUIC/H3 clients (#387)
* Updated the DoQ and DoH QUIC client to enable 0-RTT based on the guide from: https://quic-go.net/docs/http3/client/#using-0-rtt

* changed doq client to use DialEarly for 0-RTT support

* Added 0-RTT toggle - introduced the Use0RTT option to the configuration

* reverted the doqcliet DialEarly changes as they were not needed and had a bug.
Renamed the 0RTT toggle and updated the documentation.

* catching missconfig of 0-RTT and HTTP/2
2024-05-09 07:53:58 +02:00
Frank Olbricht
2247c67061 Add support for extended error codes in blocklist-v2 (#373)
* Add support for extended error codes in blocklist-v2

* Add EDE options to respons-blocklist and static-responder

* fix nil ptr

* simplify accessing the question
2024-04-21 11:53:20 +02:00
Frank Olbricht
e06ed844aa Support Extended Error Codes in static-responder (#347)
* Support Extended Error Codes in static-responder

* rename
2023-11-18 10:01:48 +01:00
Frank Olbricht
2e0610668b Implement Socks5 support (#317)
* Implement Socks5 support

* Support SOCKS5 for DoT

* Socks5 for DoH

* Return interface, not nil pointer of specific type

* Support resolving DNS server names locally instead of through the proxy

* Resolve IP4 only

* Fix go.mod after rebase

* Support LocalAddr directly in the SOCKS5 dialer

* Update docs for SOCKS5
2023-10-18 09:12:34 +02:00
Frank Olbricht
2e0f426b8d Support inverting the behavior of response-blocklist-ip / -name (#344)
* Support inverting the behavior of response-blocklist-ip / -name

* undo test code

* undo test code

* Fix nil ptr panic
2023-09-26 13:59:25 +02:00
Frank Olbricht
a1acb8caa5 Treat 'reset-after' time in random group as seconds (#333) 2023-09-04 18:56:52 +02:00
Frank Olbricht
ed132d812f Set ServerName for DoQ TLS validation explicitly (#329) 2023-08-31 08:42:02 +02:00
Frank Olbricht
bf8b46213d Implement Redis backend for cache (#315)
* Implement Redis backend for cache

* support reading from redis

* Allow configuring redis username

* support key-prefixes

* support retry options

* update redis
2023-06-08 07:42:28 +02:00
Frank Olbricht
94069a220b Implement memory backend with persistence (#300)
* Implement memory backend with persistence

* Save cache on SIGTERM

* Write to disk in an interval

* Also store expiry in cach file

---------

Co-authored-by: Charles Porth <charlieporth1@gmail.com>
2023-05-12 09:21:00 +09:00
Frank Olbricht
924eeddfcb New cache-rcode-max-ttl option for caches (#304) 2023-05-01 10:10:51 +02:00
Frank Olbricht
6f0f6a299e New 'allow-failure' flag for blocklist loaders (#294) 2023-03-26 12:45:54 +02:00
Frank Olbricht
961a297d5a New 'query-timeout' option for resolvers (#295)
* New 'query-timeout' option for resolvers

* docs
2023-03-26 12:04:41 +02:00
Frank Olbricht
64b22b9875 Revert "Merge pull request #259 from folbricht/issue-153" (#292)
This reverts commit c383a53be6, reversing
changes made to 3cd0d752f5.
2023-03-22 09:37:05 +01:00
Charlie Porth
bab1de439e Fixed and working - Date: Thu Feb 16 11:38:28 CST 2023 2023-02-16 11:38:28 -06:00
folbrich
2128e450ba example config 2023-01-26 12:00:37 +01:00
folbrich
e3ae13f953 Prefetch feature in cache 2023-01-26 11:55:20 +01:00
folbrich
8117a90cba Support routing by ListenerID or TLS server name 2022-12-28 10:51:54 +01:00
Frank Olbricht
b698888f3f Fix error in rate-limiter example config (#253) 2022-08-11 08:36:35 +02:00
Frank Olbricht
01eca5c1d2 Support selector functions for TTL modifier (#245)
* Support selector functions for TTL modifier

* docs

* Fix minor bugs and add 'random' selector
2022-08-09 16:04:22 +02:00
Frank Olbricht
d6a4e6087b Support no-tls option on DoH (TCP) servers (#239) 2022-07-16 12:05:39 +02:00
Jeroen Simonetti
bed4f30c83 Harden systemd service (#243)
This will use a dynamic uid choosen randomly at service start and
prevent subprocesses from gaining new capabilities.
https://www.freedesktop.org/software/systemd/man/systemd.exec.html#DynamicUser=

Signed-off-by: Jeroen Simonetti <jeroen@simonetti.nl>
2022-06-24 17:04:20 +02:00
Frank Olbricht
0874ba7fd5 Ability to route by DoH path (#240)
* Ability to route by DoH path

* Expand logging of matching routes
2022-06-23 11:17:18 +02:00
Frank Olbricht
395fcbcedb New element to log queries via syslog (#233)
* New element to log queries via syslog

* Replace syslog library

* fix query type/name order and add id

* option to log responses as well

* Fix log line and add log-request option

* Add query ID and answer numbers

* Fix format strings

* Synthesize NODATA state

* Add qtype to failed or empty responses

* Add docs

* Verbose option to log response types that weren't queries
2022-05-20 13:50:37 +02:00
Charles Porth
bfc10f7e71 Updated to include the service file 2022-03-16 12:59:18 -05:00
Charles Porth
919adc8066 rm exe and updated gitignore 2022-03-16 12:56:54 -05:00
Charles Porth
ef33b6bfbc Cobra made major lighter changes in 1.4 good idea to update as well 2022-03-16 12:14:40 -05:00
Charles Porth
2bfa3fd925 Updated libs to fix #218 2022-03-16 12:07:18 -05:00
Chris Buijs
35c9051e6d Add truncate option in static-responder to set TC bit (#211)
* Added "truncate" flag/config

* Update static.go

* Add truncate

* Truncate

* Update configuration.md

* Truncate Example

* Update static.go

* Add truncate

* Update static.go

* Update static.go

* Update static.go

* Update static.go

* Update static.go

* Update static.go

* Update static.go

* Update static.go

* Update static.go

* Update static.go

* Update static.go

* Update cmd/routedns/example-config/truncate.toml

Co-authored-by: Frank Olbricht <frank.olbricht@gmail.com>

* Update doc/configuration.md

Co-authored-by: Frank Olbricht <frank.olbricht@gmail.com>

* Revert to existing/original logic with truncate

* Update logging

Co-authored-by: Frank Olbricht <frank.olbricht@gmail.com>
2022-02-05 07:29:34 -07:00
Frank Olbricht
acc8842fad Support naming blocklists to help with logging (#201)
* Support naming blocklists to help with logging

* Support naming of lists in response blocklists too

* Add list name to client-blocklist as well
2022-01-09 07:44:53 -07:00
Charles Porth
a48eca521d Default ports feature (#195)
* Static ports file added

* Removed .idea

* Added options for default ports

* Fixed var name ty[e

* Added default port function

* Fixed methods to be proper go

* Fixed port method

* Added blank add part

* Fixed http

* Fixed port bool

* Update to use host instead

* Fixed improper imp,amentation

* Better version

* Soltion for { in address

* Starting commit

* Removed unneeded code

* Added forgotten function

* Test for default-ports feature and simplify the function

* missing test

Co-authored-by: folbrich <frank.olbricht@gmail.com>
2022-01-08 15:41:04 -07:00