| Age | Commit message (Collapse) | Author |
|
All the server core functionalities (caches and forwarding) now
implemented inside "dns.Server". The main function of this package are
for reading options from configuration file (or from command line options)
and watching changes from system resolv.conf.
There are also some major changes on configuration file.
* "server.parent" option now use URI format instead of IP:PORT.
This will allow parent name servers to be UDP, TCP, and/or DoH
simultaneusly.
* "server.doh.parent" and "server.parent.connection" are removed,
redundant with new "server.parent" format.
* "cache.threshold" is renamed to "cache.prune_threshold".
|
|
Method update() on cacheworker basically contains one line statement.
Also, update the log format to print ID of query and response and
total caches.
|
|
This minimize one queue in server but slowing down the process because
each request will be handled sequentially.
|
|
Also, print total number of pruned records at the end of pruning.
|
|
|
|
|
|
The benchmark output give better performance using plain map with Mutex
rather than using sync.Map.
|
|
Instead of using channel, we call the remove function directly, which
minimize number of channel used on program.
|
|
|
|
|
|
This change also rename the addQueue field to upsertQueue to reflect
the process inside the channel and inside the function.
|
|
|
|
The field cacheThreshold is only used to initialize the cachesList.
|
|
In case parent server return "Server failure", we should not cache the
message, in case the next request may return OK status code.
|
|
|
|
|
|
|
|
Previously, we ignore response that have zero answer and zero TTL. This
caused domain that does not have IPv6 return empty answer but with success
code.
This commit accept any response as long as the response code in header is
0 (success).
|
|
|
|
Also, set the cache response received time to 0 if record is loaded from
local file (hosts or master file).
|
|
The Response struct has been deleted on lib/dns due to unused.
|
|
|
|
|
|
|
|
|
|
This is for consistent map key on caches.
|
|
|
|
|