nametoip

package module
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

README

nametoip

nametoip is a plugin for CoreDNS that returns IP addresses encoded in hostnames. It is intended for local development, home labs etc... It provides functionality similar to services like nip.io and sslip.io.

It provides the following encodings:

  • Dot notation. eg:
    • 10.2.3.4.example.com resolves to 10.2.3.4
  • Dash notation. eg:
    • 10-2-3-4.example.com resolves to 10.2.3.4
  • Hex notation. eg:
    • 0a020304.example.com resolves to 10.2.3.4
  • Above encodings allow for arbitrary prefixes and subdomains. eg:
    • a.big.hello-world-10-2-3-4.example.com resolves to 10.2.3.4

For now, only private IPs are supported as this plugin is intended to support scenarios such as home labs, local development etc...

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NameToIp

type NameToIp struct {
	Next    plugin.Handler
	Origins []string
	// contains filtered or unexported fields
}

func (NameToIp) Name

func (n NameToIp) Name() string

func (NameToIp) Ready

func (n NameToIp) Ready() bool

func (NameToIp) ServeDNS

func (n NameToIp) ServeDNS(ctx context.Context, writer dns.ResponseWriter, msg *dns.Msg) (int, error)

Jump to

Keyboard shortcuts

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