diff options
| author | Shulhan <m.shulhan@gmail.com> | 2020-05-18 21:47:45 +0700 |
|---|---|---|
| committer | Shulhan <m.shulhan@gmail.com> | 2020-07-26 03:48:51 +0700 |
| commit | 7574bb6ebff609b9a2889fc573ce3edce256e030 (patch) | |
| tree | d4a118ef858d5916ed19e1fc93a4d02b9fe4b588 /cmd | |
| parent | 7b9cba12d356c6fa9ee3988b5c96f8718aafd5f1 (diff) | |
| download | rescached-7574bb6ebff609b9a2889fc573ce3edce256e030.tar.xz | |
all: implement the user interface to change configuration
This is the first web UI (wui) where user can change configuration on
the fly.
The wui is implemented using svelte.dev and can be accessed on
http://127.0.0.1:5380.
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/rescached/main.go | 21 | ||||
| -rw-r--r-- | cmd/rescached/rescached.cfg | 28 |
2 files changed, 22 insertions, 27 deletions
diff --git a/cmd/rescached/main.go b/cmd/rescached/main.go index 8d259f4..09f6e1d 100644 --- a/cmd/rescached/main.go +++ b/cmd/rescached/main.go @@ -33,9 +33,12 @@ func main() { log.Fatal(err) } - go run(rcd) + err = rcd.Start() + if err != nil { + log.Fatal(err) + } - if debug.Value >= 2 { + if debug.Value >= 3 { go debugRuntime() } @@ -60,17 +63,3 @@ func debugRuntime() { memHeap.DiffHeapObjects) } } - -func run(rcd *rescached.Server) { - defer func() { - err := recover() - if err != nil { - log.Println("panic: ", err) - } - }() - - err := rcd.Start() - if err != nil { - log.Println(err) - } -} diff --git a/cmd/rescached/rescached.cfg b/cmd/rescached/rescached.cfg index 9f403b0..0df343b 100644 --- a/cmd/rescached/rescached.cfg +++ b/cmd/rescached/rescached.cfg @@ -5,28 +5,34 @@ ## [rescached] -#dir.hosts=/etc/rescached/hosts.d -#dir.master=/etc/rescached/master.d -#file.resolvconf=/etc/rescached/resolv.conf -#debug=0 +dir.hosts= +dir.master= +file.resolvconf= +debug=0 [dns "server"] #parent=udp://18.136.35.199 #parent=tcp://18.136.35.199 -parent=https://kilabit.info/dns-query listen = 127.0.0.1:53 ## Uncomment line below if you want to serve DNS to other computers. #listen = 0.0.0.0:53 #http.port = 443 +http.port = 0 + #tls.port = 853 +tls.port = 0 + +#tls.certificate = /etc/rescached/localhost.cert.pem +tls.certificate = -#tls.certificate = /etc/rescached/localhost.cert.pem -#tls.private_key = /etc/rescached/localhost.key.pem -#tls.allow_insecure = false +#tls.private_key = /etc/rescached/localhost.key.pem +tls.private_key = -#doh.behind_proxy = false +tls.allow_insecure = false +doh.behind_proxy = false -#cache.prune_delay = 1h -#cache.prune_threshold = -1h +cache.prune_delay = 1h0m0s +cache.prune_threshold = -1h0m0s +parent = https://kilabit.info/dns-query |
