aboutsummaryrefslogtreecommitdiff
path: root/environment.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2026-02-03 03:58:01 +0700
committerShulhan <ms@kilabit.info>2026-02-03 03:59:04 +0700
commitd30b17c4db1392c19b11c3af7a47051f8dd6568a (patch)
tree4b3f0ec995c60203261269f883a48097138b855c /environment.go
parent58678a935adbf324c4a36dbddcc286f6a6f4f655 (diff)
downloadrescached-d30b17c4db1392c19b11c3af7a47051f8dd6568a.tar.xz
all: add option to set minimum TTL
In the rescached.cfg, we add option where user can force the minimum TTL in the DNS answer. This option is not a standard and not recommended used in public facing network. It should be used only for personal and private network.
Diffstat (limited to 'environment.go')
-rw-r--r--environment.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/environment.go b/environment.go
index 7df8bcd..af2e364 100644
--- a/environment.go
+++ b/environment.go
@@ -82,6 +82,13 @@ type Environment struct {
dns.ServerOptions
+ // MinimumTTL force the TTL in the answer to this value.
+ // The value is in seconds, default to 0 (disabled).
+ // Note that this option is not standard and obviously not recommended
+ // for resolver facing public networks.
+ // It should be used only in personal or private network.
+ MinimumTTL uint32 `ini:"rescached::minimum_ttl"`
+
Debug int `ini:"rescached::debug"`
}