diff options
Diffstat (limited to 'cmd/resolver/main.go')
| -rw-r--r-- | cmd/resolver/main.go | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/cmd/resolver/main.go b/cmd/resolver/main.go index fac894c..7126651 100644 --- a/cmd/resolver/main.go +++ b/cmd/resolver/main.go @@ -93,7 +93,9 @@ func main() { func help() { fmt.Println(` -= resolver: command line interface for DNS and rescached server += resolver + +resolver is command line interface for DNS and rescached server == Usage @@ -130,6 +132,8 @@ The following options affect the commands operation. == Commands +=== QUERY + query <domain / ip-address> [type] [class] Query the domain or IP address with optional type and/or class. @@ -144,6 +148,9 @@ query <domain / ip-address> [type] [class] Valid class are either IN, CS, HS. Default value is IN. + +=== MANAGING BLOCK.D + block.d disable <name> Disable specific hosts on block.d. @@ -159,6 +166,9 @@ block.d update <name> On success, the hosts file will be updated and the server will be restarted. + +=== MANAGING CACHES + caches Fetch and print all caches from rescached server. @@ -174,6 +184,9 @@ caches remove <string> Remove the domain name from rescached caches. If the parameter is "all", it will remove all caches. + +=== MANAGING ENVIRONMENT + env Fetch the current server environment and print it as JSON format to @@ -185,6 +198,9 @@ env update <path-to-file / "-"> If the argument is "-", the new environment is read from stdin. If the environment is valid, the server will be restarted. + +=== MANAGING HOSTS.D + hosts.d create <name> Create new hosts file inside the hosts.d directory with specific file @@ -199,6 +215,9 @@ hosts.d get <name> Get the content of hosts file inside the hosts.d directory by file name. + +=== MANAGING RECORD IN HOSTS.D + hosts.d rr add <name> <domain> <value> Insert a new record and save it to the hosts file identified by @@ -213,6 +232,8 @@ hosts.d rr delete <name> <domain> == Examples +=== QUERY + Query the IPv4 address for kilabit.info, $ resolver query kilabit.info @@ -236,6 +257,9 @@ name server kilabit.info, $ resolver -insecure -ns=https://kilabit.info/dns-query query kilabit.info + +=== MANAGING CACHES + Inspect the rescached's caches on server at http://127.0.0.1:5380, $ resolver -server=http://127.0.0.1:5380 caches @@ -252,6 +276,9 @@ Remove all caches in the server, $ resolver caches remove all + +=== MANAGING ENVIRONMENT + Fetch and print current server environment, $ resolver env @@ -264,6 +291,9 @@ Update the server environment by reading JSON from standard input, $ cat /tmp/env.json | resolver env update - + +=== MANAGING HOSTS.D + Create new hosts file named "myhosts" inside the hosts.d directory, $ resolver hosts.d create myhosts @@ -294,6 +324,9 @@ Get the content of hosts file named "myhosts" inside the hosts.d directory, } ] + +=== MANAGING RECORD IN HOSTS.D + Add new record "127.0.0.1 my.hosts" to hosts file named "hosts", $ resolver hosts.d rr add hosts my.hosts 127.0.0.1 |
