Commit Graph

26 Commits

Author SHA1 Message Date
lifenjoiner 9b2c674744
Base on clientProto value explicitly to dereference clientAddr (#2393)
There are variants local_doh and trampoline for internal flow.
2023-05-13 11:22:52 +02:00
Frank Denis df3fb0c9f8 Keep lines short
$ golines -w -m 120 --shorten-comments .
2022-03-23 17:48:48 +01:00
Frank Denis ac0b9cdfe8 In the query log, consider everything that's not UDP as TCP
Fixes #1589
2021-01-21 14:35:06 +01:00
Frank Denis 4eab88c017 plugin_dns64: don't send queries to self
Fixes #1477
2020-09-17 00:44:37 +02:00
Frank Denis 8dd4612ea7 Don't use Lumberjack for non-regular files
Fixes #1407
2020-07-08 13:48:04 +02:00
Frank Denis 10710def50 Make loggers io.Writer implementations, not directly lumberjack objects 2020-07-08 11:36:58 +02:00
Frank Denis 19647e03a6 Overwrite the server name only when we need to send an upstream query 2020-03-13 17:52:09 +01:00
Dragonfir3 c17637c026
Don't log a server for blocked names by pattern (#1218)
* Update plugins.go

* reason update moved after reject confirmed

added boolean for direct rejects

* remove server with direct rejects

name pattern blocked cases
2020-03-13 17:50:38 +01:00
Frank Denis 4fd54a4919 Store the normalized qName in the plugin state
We now enforce the fact that a query always include a question.
It holds true for all practical use cases of dnscrypt-proxy.

This avoids quite a lot of redundant code in plugins, and is faster.
2019-12-17 10:11:41 +01:00
Frank Denis bfd74185f5 Don't prevent DNS queries from being answered if the partition is full 2019-12-09 12:55:26 +01:00
Frank Denis 7f42123e06 Don't log a server for cached responses (again) 2019-09-11 14:34:18 +02:00
Frank Denis 3d3b5bbc00 Don't log a server name for synthetic responses and cloaking 2019-09-11 14:28:33 +02:00
Frank Denis 30f2a4fd6b Misc fixes
- Set LBEstimator to true by default
- Shuffle the servers list at startup
- Add the server name to the query log
2019-06-03 16:49:06 +02:00
Frank Denis ec1b03b026 Renamed "hit" to "cached", and add the duration unit in TSV logs 2019-06-03 13:16:59 +02:00
Ferdinand Holzer 4e76cd2245 Rename cacheHit to hit in ltsv log 2019-05-28 23:14:28 +02:00
Ferdinand Holzer 14b464e56d Log whether response was served from cache 2019-05-28 23:14:28 +02:00
Ferdinand Holzer af096f8488 Remove request forwarding measurement from log 2019-05-28 23:14:28 +02:00
Ferdinand Holzer da2e4b0b4b Change duration output in query log to milliseconds (#836) 2019-05-26 21:53:15 +02:00
Ferdinand Holzer eab77ff871 Enhance logging (#834)
* Enhance query logging

Add request duration, and forward duration if applicable.

* Also measure requests forwarded based on forwarding_rules
2019-05-26 21:16:47 +02:00
Frank Denis 977dcad826 Improved return codes 2018-06-04 23:18:28 +02:00
Frank Denis 3bbdf93095 Log return codes in LTSV qeruylog files
DNS return codes are not enough; we need to change this to something
more expressive.

In particular, we can't use them to distinguish between a server block,
a blacklist block, and a plugin block such as the IPv6 blocker.
2018-06-04 21:35:07 +02:00
Frank Denis b643a816cc Add automatic log files rotation
Fixes #172
2018-03-02 10:34:00 +01:00
Frank Denis 066db6a080 Replace logged_qtypes with ignored_qtypes 2018-01-20 13:27:37 +01:00
Frank Denis 7103229609 Add a logged_qtypes feature to log only some query types 2018-01-19 12:57:47 +01:00
Frank Denis b9c43c8ef3 Add the ability to log blocked queries 2018-01-17 17:03:42 +01:00
Frank Denis 0dcf2c9e06 Split plugins into individual files 2018-01-16 18:21:17 +01:00