recursor

package module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

README

recursor - coredns simple ip addresses resolver

recursor - determines IP addresses:

  • using defined static IP addresses
  • or resolves given hostname using an external resolver

Config Syntax

Corefile
recursor [json-config-file-path] [{
    [verbose true|false]

    resolver resolver-name {
        urls udp://10.0.0.1:53 udp://10.0.0.2:53
        [timeout_ms 10]
    }
 
    alias alias1.example.svc. {
        [ips 10.1.1.1 10.1.1.2]
        [hosts www.example.org www.example.com]
        [ttl 5]
        [resolver_name resolver-name]
    }

    alias alias2.example.svc. {
        [hosts www.example.org www.example.com]
        # system default resolver 
    }
}]
External JSON
{
  "verbose": true,
  "resolvers": {
    "resolver-name": {
      "urls": ["udp://10.0.0.1:53","udp://10.0.0.2:53"],
      "timeout_ms": 10
    }
  },
  "aliases": {
    "alias1.example.svc.": {
      "ips": ["10.1.1.1","10.1.1.2"],
      "hosts": ["www.example.org","www.example.com"],
      "ttl": 5,
      "resolver_name": "resolver-name"
    },
    "alias2.example.svc.": {
      "hosts": ["www.example.org","www.example.com"],
      "resolver_name": "default"
    }
  }
}

Try it

Look at some examples.

Helpful commands:

dig alias1.example.svc @127.0.0.1 -p 1053
nslookup -port=1053 -debug -type=A alias2.example.svc 127.0.0.1

TODO

  • opentracing

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL