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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址