summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-03-15Release rescached v4.3.0 (2022-03-15)v4.3.0Shulhan
This release re-licensing the rescached under GPL 3.0 or later. See https://kilabit.info/journal/2022/gpl/ for more information.
2022-03-15all: change the rescached license to GPL 3.0 or laterShulhan
See https://kilabit.info/journal/2022/gpl/ for more information.
2022-03-14go.mod: update all dependenciesShulhan
2022-02-09Release rescached v4.2.0 (2022-02-09)v4.2.0Shulhan
=== New features * www: implement functionality to remove cache by record name === Bug fixes * www: check for possible null on NameServers environment * www: fix caches record type showing "undefined" === Chores * all: fix format of all asciidoc files * cmd/rescached: add command "embed" and to run in development mode
2022-02-09_doc: add index file and symlinks to CHANGELOG and READMEShulhan
The idea is to be able to view all content of documentation inside the _doc file using the following command: _doc$ ciigo serve
2022-02-09all: fix format of all asciidoc filesShulhan
This is to make the adoc files parsed and rendered correctly by asciidocgo and asciidoc tools.
2022-02-09all: reformat CHANGELOG to make generated HTML readableShulhan
The CHANGELOG.adoc file is formatted using asciidoc markup. So, to make the rendered HTML readable, it must adhere to the asciidoc format, especially when formatting the list content.
2022-02-08all: update git submodule AURShulhan
2022-02-08go.mod: update module share to v0.34.0Shulhan
Changes, * lib/memfs: skip mount if the Root node has been initialized * lib/http: remove field memfs.Options in ServerOptions
2021-12-27cmd/resolver: realign struct optionsShulhan
This save the memory size from 80 to 72 bytes (-8 bytes).
2021-12-27cmd/rescached: add command "embed" and to run in development modeShulhan
This two commands is used internally for development. The "embed" command embed all files inside "_www" directory into Go file "memfs_generate.go". This command replace "internal/generate_memfs.go". The "dev" command run the rescached server in development mode using "cmd/rescached/rescached.cfg.test" as the configuration. The "dev" command listen on DNS port 5350, so to prevent conflict with live rescached server, we run script _bin/nft_dnstest_chain.sh to redirect UDP and TCP requests from port 53 to port 5350.
2021-12-25www: implement functionality to remove cache by record nameShulhan
In the web user interface (WUI), we have a button "Remove from cache" that displayed per record, but somehow this feature is not implemented, probably missing from commits due to rebase or I completely forgot about it. Anyway, this commit implement the feature to remove record from cache by clicking the button. On success, it will remove the removed record from search result. Fix #10
2021-12-25www: check for possible null on NameServers environmentShulhan
2021-12-25www: fix caches record type showing "undefined"Shulhan
Due to refactoring on DNS library, we forgot to rename the field QType to RType on the frontend. This cause the record type on caches showed on the page as "undefined".
2021-12-21all: move HTTP server option to EnvironmentShulhan
Previously, the options for HTTP server initialized internally, which make it uneasy to changes the default rescached instance when running in development mode. This commit move the HTTP server initialization inside the Environment init method. If its nil, the init will set the default HTTP server options along with the Memfs.
2021-12-19all: realign all structsShulhan
This minimize storage size allocated by * hostBlocks: from 88 to 80 bytes (-8 bytes) * Environment: from 344 to 288 bytes (-56 bytes)
2021-12-19all: refactoring Server initializationShulhan
Previously, we initialize the rescached Server by passing the path to configuration file and initialize the environment inside the server. This commit changes it to pass the instance of Environment. The idea is to allow creating and running rescached Server without creating configuration file first.
2021-12-19go.mod: update to latest share moduleShulhan
The latest share module remove the ContentEncoding from memfs EmbedOptions. This option turns out break the HTTP content negotiation [1] of accept-encoding header, if the HTTP server does not handle it properly, like in default Go HTTP server that we use on rescached server. Update #10. [1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation
2021-12-04Release rescached v4.1.0 (2021-12-03)v4.1.0Shulhan
== Breaking changes * all: remove using tcp scheme in config and documentation Using TCP for parent name server is discouraged, because most of server disallow keeping the connection alive. The valid use case for TCP connection is when server received truncated UDP answer. Using UDP as parent scheme, will automatically assume that the server also capable of handling query in TCP. This is required when client (for example, your browser) re-send the query after receiving truncated UDP answer. Any query received by rescached through TCP will forwarded to the parent name server as TCP too, using the same address and port defined in one of UDP parent. While at it, use Cloudflare DNS server as default in configuration and as example in documentation. == New features * Add support to save and load caches to/from storage upon restart rescached now able to save and load caches to local storage upon restart. On POSIX, the caches is stored in /var/cache/rescached/rescached.gob, encoded using gob. Update #9 == Bug fixes * make the TCP forwarders as complementary of UDP The TCP forwarders only active when client send the DNS request as TCP. When the server receive that request it should also forward the request as TCP not as UDP to prevent the truncated response. Another use case for TCP is when the response is truncated, the client will send the query back through TCP connection. The server should forward this request using TCP instead of UDP. == Enhancements * remove the fallback name servers (NS) from server options The original idea of fallback NS is to send the query to the one define in resolv.conf, instead of using the one defined by user in ServerOptions NameServers, when an error occured. But, most of error usually caused by network (disconnected, time out), so re-sending query to fallback NS does not have any effect if the network it self is not working. This changes remove the unnecessary and complex fallback NS from server. * Do not cache truncated answer Previously only answer with non-zero response code is ignored. This changes ignore also answer where response header is truncated.
2021-12-04all: sync with latest share moduleShulhan
This changes update the code based on refactoring on lib/dns package on share module.
2021-11-14all: remove using tcp scheme in config and documentationShulhan
Using TCP for parent name server is discouraged, because most of server disallow keeping the connection alive. The valid use case for TCP connection is when server received truncated UDP answer. Using UDP as parent scheme, will automatically assume that the server also capable of handling query in TCP. This is required when client (for example, your browser) re-send the query after receiving truncated UDP answer. Any query received by rescached through TCP will forwarded to the parent name server as TCP too, using the same address and port defined in one of UDP parent. While at it, use Cloudflare DNS server as default in configuration and as example in documentation.
2021-11-14all: update share moduleShulhan
The update bring new features and enhancements for DNS server. * add support to save and load caches to/from storage rescached now able to save and load caches to local storage upon restart. On POSIX, the caches is stored in /var/cache/rescached/rescached.gob, encoded using gob. Update #9 * remove the fallback name servers (NS) from server options The original idea of fallback NS is to send the query to the one define in resolv.conf, instead of using the one defined by user in ServerOptions NameServers, when an error occured. But, most of error usually caused by network (disconnected, time out), so re-sending query to fallback NS does not have any effect if the network it self is not working. This changes remove the unnecessary and complex fallback NS from server. * do not cache truncated answer Previously only answer with non-zero response code is ignored. This changes ignore also answer where response header is truncated. * lib/dns: make the TCP forwarders as complementary of UDP The TCP forwarders only active when client send the DNS request as TCP. When the server receive that request it should also forward the request as TCP not as UDP to prevent the truncated response. Another use case for TCP is when the response is truncated, the client will send the query back through TCP connection. The server should forward this request using TCP instead of UDP.
2021-11-14cmd/resolver: fix redundant new linesShulhan
2021-11-14Makefile: add deploy task, to differentiate with deploy-personal-serverShulhan
Previously, the deploy task is to deploy the new version of rescached to my personal, public server. To make the task names consistent with macos (install-macos, deploy-macos, ...), we rename the deploy to deploy-personal-server; and the deploy task is default to deploying to Linux.
2021-11-06all: update module share to v0.31.0Shulhan
2021-07-13go.mod: update to latest share moduleShulhan
Changes affected by update, * lib/http: changes on Endpoint.Call function signature * lib/http: changes on CORS configuration * lib/test: changes on the Assert function signature
2021-01-26Release rescached v4.0.0 (2021-01-25)v4.0.0Shulhan
== New features Rescached now have a web user interface (wui) that can be accessed at http://127.0.0.1:5380. The interface can be used to monitoring caches, managing caches, environment, blocked hosts, internal hosts files, and zone files. == Breaking changes * The `rescached::dir.hosts` now default to "/etc/rescached/hosts.d" * The `rescached::dir.master` now default to "/etc/rescached/zone.d"
2021-01-25rescached: set tls.allow_insecure option to trueShulhan
Since the default parent is DNS over TLS, https://18.136.35.199, which is run using self-signed certificate, we need to allow_insecure to true to make the forward can connect without error.
2021-01-24all: update the configurations and expired certificatesShulhan
Remove empty options in configurations to minimize confusion and comment options that have default values.
2021-01-24README: add section to show the screenshots and usage of web interfaceShulhan
The screenshots images point to the latest image in the master branch. In the man page, the screenshot will be displayed as text.
2021-01-24Makefile: add deploy-macos as PHONY taskShulhan
2021-01-24_www: fix the layout of hosts.d and zone.dShulhan
Instead of using px use em unit instead.
2021-01-24zone.d: pretty print the resource record (RR) valueShulhan
If the RR value is object print the value as "key=value,...".
2021-01-24zone.d: fix creating resource recordShulhan
Instead of relying on event "oninput" get the value of each record values from the input element itself. Also, convert type RR Type and MX Preferences to integer before passing it to backend.
2021-01-23Makefile: remove old memfs file on cleanShulhan
While at it fix the binaries path on uninstall-common.
2021-01-23all: include the generated Go source codeShulhan
This is to allow user to install the rescached program through `go install github.com/shuLhan/rescached-go/cmd/rescached`, without using make.
2021-01-23_www: wrap the search input field with form elementShulhan
This is to allow user to trigger search by pressing Enter key on the text input field without clicking button Search. While at it, display information when no matched records found on search.
2021-01-23Makefile: add task to deploy and restart the rescahed service on macosShulhan
Executing `make deploy-macos` will build the binaries and deploy it to DIR_BIN and stop the current running rescached service to allow it to restart automatically.
2021-01-23_www: add function to clear search resultShulhan
2021-01-23Makefile: force generate the templateShulhan
The $(wildcard ...) statements seems either does not works on macOS or it does not detech updated files.
2021-01-22_www: display the list of caches in front pageShulhan
When user open the rescached web interface, the front page will render and refresh the list of non-local caches per 10 seconds.
2021-01-20all: rewrite the web user interface and the APIsShulhan
2021-01-13Makefile: simplify the tasksShulhan
Let the go tools handling the timestamp on source and test source codes when running build and test.
2021-01-12all: update with latest share modulesShulhan
This changes affect how the memfs.New and GoGenenerate called, does not affect the user.
2020-09-08_www/.../Dashboard: display the RR value as JSON stringifyShulhan
While at it, add more DNS RR types for displaying in the dashboard.
2020-09-07rescached.cfg.test: add configuration to test in developmentShulhan
2020-09-07rescached.cfg: set default parent to DNS over TLSShulhan
2020-09-07_www/../Dashboard: check for possible null on the AnswerShulhan
2020-09-07_AUR: update with latest commitShulhan
* all: generate new .SRCINFO * PKGBUILD: remove asciidoctor from makedepends
2020-09-06cmd/rescached: set default debug level to 0Shulhan